/*fern-site-stylesheet*/@font-face {
    font-family: 'Lumen Sans';
    src: url('/docs/_fern-files/ydc.docs.buildwithfern.com/bf929dd33997c343478905ebe48834cc7b4da756dfbe377fb5e43482b89b860b/assets/fonts/lumen_sans-400-webfont.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lumen Sans';
    src: url('/docs/_fern-files/ydc.docs.buildwithfern.com/7f6443295b0168200b35601d36bf9a50d6ee315e889b8aebbe06fc2e82222fc1/assets/fonts/lumen_sans-500-webfont.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lumen Sans';
    src: url('/docs/_fern-files/ydc.docs.buildwithfern.com/705d80834bfc74a958e723f98e079b775e4dfd61d8c3bec33203e723cf2ed887/assets/fonts/lumen_sans-600-webfont.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lumen Sans Fallback';
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
    size-adjust: 104.82%;
    ascent-override: 88.93%;
    descent-override: 24.36%;
    line-gap-override: 0.00%;
}

:root {
  --header-height: 60px;
  --header-height-real: 60px;
  --mobile-header-height-real: 60px;
  --content-width: 800px;
  --sidebar-width: 250px;
  --page-width: 100vw;
  --logo-height: 28px;
  --font-body: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-heading: 'Lumen Sans', 'Lumen Sans Fallback', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

:root {
  --typography-body-font-family: var(--font-body);
  --typography-heading-font-family: var(--font-heading);
  --typography-code-font-family: var(--font-code);
}


.light, :root {
  --accent-1: #fdfdff;
  --accent-2: #f7f9ff;
  --accent-3: #eef2fe;
  --accent-4: #e1e9ff;
  --accent-5: #d3deff;
  --accent-6: #c2d0ff;
  --accent-7: #acbdfa;
  --accent-8: #8fa2f1;
  --accent-9: #222b5f;
  --accent-10: #333f75;
  --accent-11: #5060a8;
  --accent-12: #222b5f;

  --accent-a1: #0000ff02;
  --accent-a2: #0040ff08;
  --accent-a3: #003cf011;
  --accent-a4: #0044ff1e;
  --accent-a5: #0040ff2c;
  --accent-a6: #003bff3d;
  --accent-a7: #0035f053;
  --accent-a8: #002ce070;
  --accent-a9: #000a46dd;
  --accent-a10: #000f53cc;
  --accent-a11: #001880af;
  --accent-a12: #000a46dd;

  --accent-contrast: #fff;
  --accent-surface: #f5f8ffcc;
  --accent-indicator: #222b5f;
  --accent-track: #222b5f;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --accent-1: oklch(99.4% 0.002 272.5);
      --accent-2: oklch(98.2% 0.0086 272.5);
      --accent-3: oklch(96.1% 0.0174 272.5);
      --accent-4: oklch(93.5% 0.0347 272.5);
      --accent-5: oklch(90.4% 0.0522 272.5);
      --accent-6: oklch(86.4% 0.0713 272.5);
      --accent-7: oklch(80.7% 0.0884 272.5);
      --accent-8: oklch(73% 0.1166 272.5);
      --accent-9: oklch(31.2% 0.0925 272.5);
      --accent-10: oklch(38.5% 0.0925 272.5);
      --accent-11: oklch(51% 0.1166 272.5);
      --accent-12: oklch(31.3% 0.0925 272.5);

      --accent-a1: color(display-p3 0.0196 0.0196 1 / 0.008);
      --accent-a2: color(display-p3 0.0196 0.2667 0.8784 / 0.032);
      --accent-a3: color(display-p3 0.0078 0.1922 0.8784 / 0.063);
      --accent-a4: color(display-p3 0.0039 0.2471 0.9333 / 0.114);
      --accent-a5: color(display-p3 0.0039 0.2196 0.9294 / 0.165);
      --accent-a6: color(display-p3 0.0039 0.1922 0.9333 / 0.228);
      --accent-a7: color(display-p3 0.0039 0.1647 0.8784 / 0.314);
      --accent-a8: color(display-p3 0.0039 0.1333 0.8157 / 0.424);
      --accent-a9: color(display-p3 0 0.0314 0.2549 / 0.859);
      --accent-a10: color(display-p3 0 0.051 0.298 / 0.793);
      --accent-a11: color(display-p3 0 0.0745 0.4667 / 0.675);
      --accent-a12: color(display-p3 0 0.0314 0.2549 / 0.859);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.9608 0.9725 1 / 0.8);
      --accent-indicator: oklch(31.2% 0.0925 272.5);
      --accent-track: oklch(31.2% 0.0925 272.5);
    }
  }
}


.light, :root {
  --grayscale-1: #fdfcfd;
  --grayscale-2: #faf9fb;
  --grayscale-3: #f2eff3;
  --grayscale-4: #eae7ec;
  --grayscale-5: #e3dfe6;
  --grayscale-6: #dbd8e0;
  --grayscale-7: #d0cdd7;
  --grayscale-8: #bcbac7;
  --grayscale-9: #8e8c99;
  --grayscale-10: #84828e;
  --grayscale-11: #65636d;
  --grayscale-12: #211f26;

  --grayscale-a1: #55005503;
  --grayscale-a2: #2b005506;
  --grayscale-a3: #30004010;
  --grayscale-a4: #20003618;
  --grayscale-a5: #20003820;
  --grayscale-a6: #14003527;
  --grayscale-a7: #10003332;
  --grayscale-a8: #08003145;
  --grayscale-a9: #05001d73;
  --grayscale-a10: #0500197d;
  --grayscale-a11: #0400119c;
  --grayscale-a12: #020008e0;

  --grayscale-contrast: #000;
  --grayscale-surface: #ffffffcc;
  --grayscale-indicator: #8e8c99;
  --grayscale-track: #8e8c99;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --grayscale-1: color(display-p3 0.991 0.988 0.992);
      --grayscale-2: color(display-p3 0.98 0.976 0.984);
      --grayscale-3: color(display-p3 0.946 0.938 0.952);
      --grayscale-4: color(display-p3 0.915 0.906 0.925);
      --grayscale-5: color(display-p3 0.886 0.876 0.901);
      --grayscale-6: color(display-p3 0.856 0.846 0.875);
      --grayscale-7: color(display-p3 0.814 0.804 0.84);
      --grayscale-8: color(display-p3 0.735 0.728 0.777);
      --grayscale-9: color(display-p3 0.555 0.549 0.596);
      --grayscale-10: color(display-p3 0.514 0.508 0.552);
      --grayscale-11: color(display-p3 0.395 0.388 0.424);
      --grayscale-12: color(display-p3 0.128 0.122 0.147);

      --grayscale-a1: #55005503;
      --grayscale-a2: #2b005506;
      --grayscale-a3: #30004010;
      --grayscale-a4: #20003618;
      --grayscale-a5: #20003820;
      --grayscale-a6: #14003527;
      --grayscale-a7: #10003332;
      --grayscale-a8: #08003145;
      --grayscale-a9: #05001d73;
      --grayscale-a10: #0500197d;
      --grayscale-a11: #0400119c;
      --grayscale-a12: #020008e0;

      --grayscale-contrast: #000;
      --grayscale-surface: color(display-p3 1 1 1 / 80%);
      --grayscale-indicator: color(display-p3 0.555 0.549 0.596);
      --grayscale-track: color(display-p3 0.555 0.549 0.596);
    }
  }
}


.dark {
  --accent-1: #1d2230;
  --accent-2: #1f2436;
  --accent-3: #26305c;
  --accent-4: #2b3776;
  --accent-5: #324088;
  --accent-6: #3a4997;
  --accent-7: #4354aa;
  --accent-8: #4c5fc4;
  --accent-9: #5368ee;
  --accent-10: #4e61c6;
  --accent-11: #9ab2ff;
  --accent-12: #d6e1ff;

  --accent-a1: #0023fd0d;
  --accent-a2: #003cfe14;
  --accent-a3: #3259fd41;
  --accent-a4: #3b5bff5f;
  --accent-a5: #4564ff74;
  --accent-a6: #506dfe86;
  --accent-a7: #5874ff9c;
  --accent-a8: #5c76ffba;
  --accent-a9: #566dfeec;
  --accent-a10: #5d77febd;
  --accent-a11: #9ab2ff;
  --accent-a12: #d6e1ff;

  --accent-contrast: #fff;
  --accent-surface: #1d264780;
  --accent-indicator: #5368ee;
  --accent-track: #5368ee;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --accent-1: oklch(25.3% 0.0282 271.8);
      --accent-2: oklch(26.5% 0.0346 271.8);
      --accent-3: oklch(32.3% 0.0796 271.8);
      --accent-4: oklch(36.4% 0.108 271.8);
      --accent-5: oklch(40.1% 0.1206 271.8);
      --accent-6: oklch(43.7% 0.1272 271.8);
      --accent-7: oklch(47.8% 0.1381 271.8);
      --accent-8: oklch(52.5% 0.1577 271.8);
      --accent-9: oklch(57.7% 0.2016 271.8);
      --accent-10: oklch(53.3% 0.1577 271.8);
      --accent-11: oklch(78.2% 0.1423 271.8);
      --accent-12: oklch(91.1% 0.049 271.8);

      --accent-a1: color(display-p3 0 0.1333 1 / 0.046);
      --accent-a2: color(display-p3 0.0275 0.2431 0.9961 / 0.074);
      --accent-a3: color(display-p3 0.2353 0.3647 1 / 0.239);
      --accent-a4: color(display-p3 0.2588 0.3686 1 / 0.354);
      --accent-a5: color(display-p3 0.3059 0.4078 1 / 0.432);
      --accent-a6: color(display-p3 0.3451 0.4392 0.9961 / 0.5);
      --accent-a7: color(display-p3 0.3765 0.4706 1 / 0.583);
      --accent-a8: color(display-p3 0.3922 0.4706 1 / 0.702);
      --accent-a9: color(display-p3 0.3686 0.4392 1 / 0.886);
      --accent-a10: color(display-p3 0.3961 0.4745 0.9961 / 0.712);
      --accent-a11: color(display-p3 0.6353 0.7098 1 / 0.973);
      --accent-a12: color(display-p3 0.8588 0.8941 1 / 0.987);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.1176 0.149 0.2667 / 0.5);
      --accent-indicator: oklch(57.7% 0.2016 271.8);
      --accent-track: oklch(57.7% 0.2016 271.8);
    }
  }
}


.dark {
  --grayscale-1: #121113;
  --grayscale-2: #1a191b;
  --grayscale-3: #232225;
  --grayscale-4: #2b292d;
  --grayscale-5: #323035;
  --grayscale-6: #3c393f;
  --grayscale-7: #49474e;
  --grayscale-8: #625f69;
  --grayscale-9: #6f6d78;
  --grayscale-10: #7c7a85;
  --grayscale-11: #b5b2bc;
  --grayscale-12: #eeeef0;

  --grayscale-a1: #00000000;
  --grayscale-a2: #f5f4f609;
  --grayscale-a3: #ebeaf814;
  --grayscale-a4: #eee5f81d;
  --grayscale-a5: #efe6fe25;
  --grayscale-a6: #f1e6fd30;
  --grayscale-a7: #eee9ff40;
  --grayscale-a8: #eee7ff5d;
  --grayscale-a9: #eae6fd6e;
  --grayscale-a10: #ece9fd7c;
  --grayscale-a11: #f5f1ffb7;
  --grayscale-a12: #fdfdffef;

  --grayscale-contrast: #fff;
  --grayscale-surface: rgba(0, 0, 0, 0.05);
  --grayscale-indicator: #6f6d78;
  --grayscale-track: #6f6d78;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --grayscale-1: color(display-p3 0.07 0.067 0.074);
      --grayscale-2: color(display-p3 0.101 0.098 0.105);
      --grayscale-3: color(display-p3 0.138 0.134 0.144);
      --grayscale-4: color(display-p3 0.167 0.161 0.175);
      --grayscale-5: color(display-p3 0.196 0.189 0.206);
      --grayscale-6: color(display-p3 0.232 0.225 0.245);
      --grayscale-7: color(display-p3 0.286 0.277 0.302);
      --grayscale-8: color(display-p3 0.383 0.373 0.408);
      --grayscale-9: color(display-p3 0.434 0.428 0.467);
      --grayscale-10: color(display-p3 0.487 0.48 0.519);
      --grayscale-11: color(display-p3 0.707 0.7 0.735);
      --grayscale-12: color(display-p3 0.933 0.933 0.94);

      --grayscale-a1: #00000000;
      --grayscale-a2: #f5f4f609;
      --grayscale-a3: #ebeaf814;
      --grayscale-a4: #eee5f81d;
      --grayscale-a5: #efe6fe25;
      --grayscale-a6: #f1e6fd30;
      --grayscale-a7: #eee9ff40;
      --grayscale-a8: #eee7ff5d;
      --grayscale-a9: #eae6fd6e;
      --grayscale-a10: #ece9fd7c;
      --grayscale-a11: #f5f1ffb7;
      --grayscale-a12: #fdfdffef;

      --grayscale-contrast: #fff;
      --grayscale-surface: color(display-p3 0 0 0 / 5%);
      --grayscale-indicator: color(display-p3 0.434 0.428 0.467);
      --grayscale-track: color(display-p3 0.434 0.428 0.467);
    }
  }
}

.light, :root {
  color-scheme: light;
  --accent: rgba(34, 43, 95, 1);
  --background: rgba(255, 255, 255, 1);
  --border: rgba(231, 232, 236, 1);
  --sidebar-background: rgba(249, 249, 251, 1);
  --header-background: rgba(249, 249, 251, 1);
  --card-background: rgba(255, 255, 255, 1);
  --theme-color: #fff;
}

.dark {
  color-scheme: dark;
  --accent: rgba(83, 104, 238, 1);
  --background: rgba(34, 34, 37, 1);
  --border: rgba(58, 58, 63, 1);
  --sidebar-background: rgba(16, 16, 18, 1);
  --header-background: rgba(16, 16, 18, 1);
  --card-background: rgba(34, 34, 37, 1);
  --theme-color: #222225;
}

/* Canvas Body Theme */
:root [data-body-theme="canvas"] .canvas-wrapper {
  display: flex;
  width: 100%;
  overflow: auto;
  height: 100%;
  border-radius: 16px 16px 16px 16px;
  justify-content: center;
  align-items: flex-start;
  margin-right: 12px;
  margin-bottom: 12px;
  height: calc(100vh - var(--header-height-real) - 12px);
  border: 1px solid var(--border);
  background-color: var(--card-background);
}

:root [data-body-theme="canvas"] body {
  overflow: hidden;
}


:root [data-body-theme="canvas"] #fern-toc {
  position: sticky;
  max-height: calc(100vh - var(--header-height-real) - 12px);
  overflow-y: auto;
  overflow-x: hidden;
  top: 0;
}

:root [data-body-theme="canvas"] #fern-toc:has(> *) {
  margin-right: 12px;
}

:root [data-body-theme="canvas"] .fern-layout-guide,
:root [data-body-theme="canvas"] .fern-layout-overview {
  width: 100%;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

:root [data-body-theme="canvas"] .fern-layout-reference {
  width: 100%;
  border: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

/* The sticky changelog day label offsets its top by the header height by default
   (window scroll). On canvas the scroll container already starts below the fixed
   header, so zero the offset to keep the date from pinning too early. */
:root [data-body-theme="canvas"] {
  --fern-changelog-sticky-top: 0px;
}

/* ============================================================================
   You.com docs design tokens
   ----------------------------------------------------------------------------
   Owner: fern/design-system/README.md ("Tokens"). Loaded first in the
   fern/docs.yml `css` list.

   Two layers:
   1. Raw values (--ydc-raw-*): brand and neutral constants. Never consume
      these from component or adapter CSS; use a semantic role instead.
   2. Semantic roles (--ydc-color-*, --ydc-font-*, --ydc-space-*, ...): what
      components, page patterns, and Fern adapters read.

   Theme: Fern sets `class="light|dark"` and an inline `color-scheme` on
   <html>. `light-dark()` resolves against that color-scheme where a token is
   used. Roles marked `@fern` reference a documented Fern theme variable
   generated from fern/docs.yml `colors`; `npm run check:design-system`
   verifies each mapping against the config.
   ============================================================================ */

:root {
    /* ---- Raw: neutrals (cool gray scale used by the docs shell) ---------- */
    --ydc-raw-white: #ffffff;
    --ydc-raw-gray-50: #f9f9fb;
    --ydc-raw-gray-75: #f5f5f6;
    --ydc-raw-gray-100: #f0f0f3;
    --ydc-raw-gray-150: #e7e8ec;
    --ydc-raw-gray-250: #cdced6;
    --ydc-raw-gray-300: #babbc5;
    --ydc-raw-gray-450: #8c8d97;
    --ydc-raw-gray-500: #81828c;
    --ydc-raw-gray-600: #62636b;
    --ydc-raw-gray-800: #3a3a3f;
    --ydc-raw-gray-850: #303135;
    --ydc-raw-gray-875: #292a2d;
    --ydc-raw-gray-900: #222225;
    --ydc-raw-gray-950: #101012;

    /* ---- Raw: action neutrals (DocsButton; untinted, intentionally off the
       cool gray scale) -------------------------------------------------- */
    --ydc-raw-action-white: #fcfcfc;
    --ydc-raw-action-gray-200: #d8d8d8;
    --ydc-raw-action-gray-850: #2a2a2f;
    --ydc-raw-action-gray-900: #202020;

    /* ---- Raw: brand indigo ---------------------------------------------- */
    --ydc-raw-indigo-50: #eef2fe;
    --ydc-raw-indigo-100: #d3deff;
    --ydc-raw-indigo-200: #acbdfa;
    --ydc-raw-indigo-450: #5b6de8;
    --ydc-raw-indigo-500: #4a5ee0;
    --ydc-raw-indigo-550: #4255ca;
    --ydc-raw-indigo-600: #4757c9;
    --ydc-raw-indigo-900: #222b5f;

    /* ---- Raw: status ------------------------------------------------------ */
    --ydc-raw-red-50: #ffebe9;
    --ydc-raw-red-200: #f8a8a0;
    --ydc-raw-red-450: #ef4444;
    --ydc-raw-red-500: #e13237;
    --ydc-raw-red-600: #d3232c;
    --ydc-raw-red-900: #661717;
    --ydc-raw-green-50: #e1f8ec;
    --ydc-raw-green-200: #75d3a8;
    --ydc-raw-green-450: #10b981;
    --ydc-raw-green-500: #00ad76;
    --ydc-raw-green-600: #008254;
    --ydc-raw-green-900: #0c3d2a;
    --ydc-raw-amber-200: #f9dd6d;
    --ydc-raw-amber-300: #f7d13c;
    --ydc-raw-amber-400: #f5c60b;
    --ydc-raw-amber-500: #b89408;
    --ydc-raw-amber-600: #7a6306;
    --ydc-raw-amber-900: #4c3902;

    /* ---- Raw: page-pattern palette (batch 03) ----------------------------
       Values the welcome, setup, showcase, integration, and examples
       patterns use today. Several sit next to the shell scale above (for
       example #646464 and #62636b); batch 01 recorded those as distinct
       source values, so they stay distinct until a convergence is approved. */
    --ydc-raw-black: #000000;
    --ydc-raw-neutral-50: #fafafc;
    --ydc-raw-neutral-75: #f5f5f5;
    --ydc-raw-neutral-150: #e8e8e8;
    --ydc-raw-neutral-500: #838383;
    --ydc-raw-neutral-600: #646464;
    --ydc-raw-neutral-850: #2f2f35;
    --ydc-raw-neutral-875: #26262b;
    --ydc-raw-indigo-300: #8c9bf5;
    --ydc-raw-indigo-400: #5368ee;
    --ydc-raw-indigo-350: #6475e4;
    --ydc-raw-indigo-25: #fafbff;
    --ydc-raw-gray-400: #a0a1ab;
    --ydc-raw-gray-200: #c9cad2;
    --ydc-raw-gray-700: #55565c;
    --ydc-raw-neutral-880: #25262c;
    /* Slate scale used by the integration and examples patterns. */
    --ydc-raw-slate-50: #f0f2fa;
    --ydc-raw-slate-75: #eef0f8;
    --ydc-raw-slate-200: #b4bcf5;
    --ydc-raw-slate-300: #b9bdd6;
    --ydc-raw-slate-600: #5a5f86;
    --ydc-raw-slate-700: #3b4478;
    --ydc-raw-slate-900: #292e48;
    /* Brand tag scale, mirroring the youdotcom-frontend Tag (blue-3, blue-6,
       blue-12 in each theme). */
    --ydc-raw-blue-3: #edf2ff;
    --ydc-raw-blue-6: #c0d0ff;
    --ydc-raw-blue-12: #212b60;
    --ydc-raw-blue-dark-3: #242e55;
    --ydc-raw-blue-dark-6: #39488d;
    --ydc-raw-blue-dark-12: #d7e1ff;
    /* Command line (AgentSetup), GitHub-style syntax pair. */
    --ydc-raw-command-text: #2b5581;
    --ydc-raw-command-text-dark: #9ecbff;
    --ydc-raw-command-program: #6f42c1;
    --ydc-raw-command-program-dark: #b392f0;
    /* Showcase syntax highlighting (Tailwind-style hues). */
    --ydc-raw-syntax-green: #059669;
    --ydc-raw-syntax-green-dark: #10b981;
    --ydc-raw-syntax-amber: #d97706;
    --ydc-raw-syntax-amber-dark: #fbbf24;
    --ydc-raw-syntax-gray: #6b7280;
    --ydc-raw-syntax-gray-dark: #9ca3af;
    --ydc-raw-syntax-pink: #e91e63;
    --ydc-raw-syntax-pink-dark: #f06292;
    --ydc-raw-syntax-blue: #2563eb;
    --ydc-raw-syntax-blue-dark: #60a5fa;
    --ydc-raw-syntax-purple: #7c3aed;
    --ydc-raw-syntax-purple-dark: #a78bfa;
    --ydc-raw-syntax-cyan: #0891b2;
    --ydc-raw-syntax-cyan-dark: #22d3ee;

    /* ---- Raw: translucent overlays --------------------------------------- */
    --ydc-raw-white-a10: rgba(255, 255, 255, 0.10);
    --ydc-raw-white-a16: rgba(255, 255, 255, 0.16);
    --ydc-raw-white-a20: rgba(255, 255, 255, 0.2);
    --ydc-raw-indigo-500-a8: rgba(74, 94, 224, 0.08);
    --ydc-raw-ink-a1: rgba(18, 22, 39, 0.01);
    --ydc-raw-ink-a2: rgba(18, 22, 39, 0.02);
    --ydc-raw-black-a3: rgba(0, 0, 0, 0.03);
    --ydc-raw-black-a4: rgba(0, 0, 0, 0.04);
    --ydc-raw-white-a8: rgba(255, 255, 255, 0.08);
    --ydc-raw-white-a4: rgba(255, 255, 255, 0.04);
    --ydc-raw-black-a5: rgba(25, 25, 25, 0.05);
    --ydc-raw-gray-150-a10: rgba(231, 232, 236, 0.1);
    --ydc-raw-indigo-500-a10: rgba(74, 94, 224, 0.1);
    --ydc-raw-indigo-500-a20: rgba(74, 94, 224, 0.2);
    --ydc-raw-indigo-900-a6: rgba(34, 43, 95, 0.06);
    --ydc-raw-indigo-400-a14: rgba(83, 104, 238, 0.14);

    /* ---- Color: page shell ------------------------------------------------ */
    /* @fern --sidebar-background (colors.sidebar-background) */
    --ydc-color-backdrop: var(--sidebar-background);
    /* @fern --background (colors.background) */
    --ydc-color-canvas: var(--background);
    /* Canvas outline. Dark differs from colors.border on purpose (#292a2d vs
       #3A3A3F); do not replace with --border. */
    --ydc-color-canvas-border: light-dark(var(--ydc-raw-gray-150), var(--ydc-raw-gray-875));
    /* @fern --border (colors.border) */
    --ydc-color-border: var(--border);
    --ydc-color-divider: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-800));

    /* ---- Color: text ------------------------------------------------------ */
    --ydc-color-text-primary: light-dark(var(--ydc-raw-gray-950), var(--ydc-raw-white));
    --ydc-color-text-secondary: light-dark(var(--ydc-raw-gray-600), var(--ydc-raw-gray-250));
    --ydc-color-text-tertiary: light-dark(var(--ydc-raw-gray-500), var(--ydc-raw-gray-450));
    /* Accent text. Dark differs from colors.accent-primary (#5368EE). */
    --ydc-color-text-accent: light-dark(var(--ydc-raw-indigo-900), var(--ydc-raw-indigo-200));

    /* ---- Color: badges ---------------------------------------------------- */
    --ydc-color-badge-grayscale-bg: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-800));
    --ydc-color-badge-grayscale-fg: light-dark(var(--ydc-raw-gray-600), var(--ydc-raw-gray-300));
    --ydc-color-badge-red-bg: light-dark(var(--ydc-raw-red-50), var(--ydc-raw-red-900));
    --ydc-color-badge-red-fg: light-dark(var(--ydc-raw-red-600), var(--ydc-raw-red-200));
    --ydc-color-badge-green-bg: light-dark(var(--ydc-raw-green-50), var(--ydc-raw-green-900));
    --ydc-color-badge-green-fg: light-dark(var(--ydc-raw-green-600), var(--ydc-raw-green-200));
    --ydc-color-badge-amber-bg: light-dark(var(--ydc-raw-amber-200), var(--ydc-raw-amber-900));
    --ydc-color-badge-amber-fg: light-dark(var(--ydc-raw-amber-600), var(--ydc-raw-amber-300));
    --ydc-color-badge-accent-bg: light-dark(var(--ydc-raw-indigo-50), var(--ydc-raw-indigo-600));
    --ydc-color-badge-accent-fg: light-dark(var(--ydc-raw-indigo-600), var(--ydc-raw-indigo-100));

    /* ---- Color: navigation and controls ----------------------------------- */
    --ydc-color-scrollbar-thumb: light-dark(var(--ydc-raw-gray-500), var(--ydc-raw-gray-450));
    --ydc-color-segmented-on-bg: light-dark(var(--ydc-raw-white), var(--ydc-raw-gray-800));
    --ydc-color-tabgroup-bg: light-dark(var(--ydc-raw-gray-75), var(--ydc-raw-gray-900));
    --ydc-color-nav-item-hover-bg: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-875));
    --ydc-color-nav-item-active-bg: light-dark(var(--ydc-raw-gray-150), var(--ydc-raw-gray-850));
    --ydc-color-search-bg: light-dark(var(--ydc-raw-white), var(--ydc-raw-gray-900));
    --ydc-color-ask-ai-bg: light-dark(var(--ydc-raw-white), var(--ydc-raw-gray-900));
    --ydc-color-ask-ai-bg-hover: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-850));

    /* Header Platform action hover and pressed fills. */
    --ydc-color-navbar-primary-bg-hover: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-white-a20));
    --ydc-color-navbar-primary-bg-pressed: light-dark(var(--ydc-raw-gray-150), var(--ydc-raw-white-a16));

    /* Announcement banner (batch 04): fixed brand indigo in both themes. */
    --ydc-color-announcement-bg: var(--ydc-raw-indigo-500);
    --ydc-color-announcement-fg: var(--ydc-raw-action-white);
    /* Header tabs (Figma Topbar): inactive and active text, active pill. */
    --ydc-color-tab-fg: light-dark(var(--ydc-raw-neutral-600), var(--ydc-raw-gray-250));
    --ydc-color-tab-fg-active: light-dark(var(--ydc-raw-action-gray-900), var(--ydc-raw-white));
    --ydc-color-tab-bg-active: light-dark(var(--ydc-raw-black-a5), var(--ydc-raw-gray-850));
    /* Header Platform button: inverted neutral fill. */
    --ydc-color-navbar-platform-bg: light-dark(var(--ydc-raw-action-gray-900), var(--ydc-raw-action-white));
    --ydc-color-navbar-platform-fg: light-dark(var(--ydc-raw-action-white), var(--ydc-raw-action-gray-900));
    /* Search field focus halo (10% of the light border gray in both themes). */
    --ydc-color-search-focus-halo: var(--ydc-raw-gray-150-a10);

    /* ---- Color: callouts and cards ---------------------------------------- */
    --ydc-color-callout-bg: light-dark(var(--ydc-raw-gray-50), var(--ydc-raw-gray-875));
    --ydc-color-callout-icon-warning: light-dark(var(--ydc-raw-amber-500), var(--ydc-raw-amber-400));
    --ydc-color-callout-icon-success: light-dark(var(--ydc-raw-green-500), var(--ydc-raw-green-450));
    --ydc-color-callout-icon-error: light-dark(var(--ydc-raw-red-500), var(--ydc-raw-red-450));
    --ydc-color-callout-icon-launch: light-dark(var(--ydc-raw-indigo-900), var(--ydc-raw-indigo-200));
    --ydc-color-callout-icon-tip: light-dark(var(--ydc-raw-green-500), var(--ydc-raw-green-450));
    --ydc-color-callout-icon-check: light-dark(var(--ydc-raw-green-500), var(--ydc-raw-green-450));
    --ydc-color-card-border-hover: light-dark(var(--ydc-raw-gray-250), var(--ydc-raw-gray-600));

    /* ---- Color: actions (DocsButton) -------------------------------------- */
    /* Fixed brand indigo in both themes. Differs from colors.accent-primary. */
    --ydc-color-action-primary-bg: var(--ydc-raw-indigo-500);
    --ydc-color-action-primary-bg-hover: light-dark(var(--ydc-raw-indigo-550), var(--ydc-raw-indigo-450));
    --ydc-color-action-primary-fg: var(--ydc-raw-action-white);
    --ydc-color-action-secondary-bg: light-dark(var(--ydc-raw-white), var(--ydc-raw-action-gray-850));
    --ydc-color-action-secondary-bg-hover: light-dark(var(--ydc-raw-indigo-500-a8), var(--ydc-raw-white-a10));
    --ydc-color-action-secondary-fg: light-dark(var(--ydc-raw-action-gray-900), var(--ydc-raw-white));
    --ydc-color-action-secondary-border: light-dark(var(--ydc-raw-action-gray-200), var(--ydc-raw-gray-800));
    --ydc-color-focus-ring: var(--ydc-raw-indigo-500);
    /* Outline action: compact installation links. Ghost action: section
       actions beside a WelcomeHeading. They differ only in text color and
       hover fill; batch 03 kept both until a convergence is approved. */
    --ydc-color-action-outline-fg: light-dark(var(--ydc-raw-action-gray-900), var(--ydc-raw-white));
    --ydc-color-action-outline-bg-hover: var(--ydc-color-surface-hover);
    --ydc-color-action-ghost-fg: var(--ydc-color-text-primary);
    --ydc-color-action-ghost-bg: var(--ydc-color-surface-card);

    /* Marketing action (BookDemoButton): the you.com "Book a Demo" CTA, read
       from the marketing site. Pure white text and a lighter hover than
       DocsButton primary; both are deliberate. */
    --ydc-color-action-marketing-bg: var(--ydc-raw-indigo-500);
    --ydc-color-action-marketing-bg-hover: var(--ydc-raw-indigo-350);
    --ydc-color-action-marketing-fg: var(--ydc-raw-white);
    /* GitHub star button. */
    --ydc-color-star-bg: light-dark(var(--ydc-raw-white), var(--ydc-raw-white-a8));
    --ydc-color-star-count-bg: light-dark(var(--ydc-raw-gray-50), var(--ydc-raw-white-a4));

    /* ---- Color: page-pattern surfaces and text (batch 03) ----------------- */
    /* @fern --card-background (colors.card-background) */
    --ydc-color-surface-card: var(--card-background);
    /* Raised panel inside a card: showcase code panel and language menu. */
    --ydc-color-surface-raised: light-dark(var(--ydc-raw-white), var(--ydc-raw-action-gray-850));
    /* Hover fill for rows, pickers, and outline actions on a card. */
    --ydc-color-surface-hover: light-dark(var(--ydc-raw-neutral-50), var(--ydc-raw-neutral-875));
    /* Secondary text in the welcome, setup, and showcase patterns. Distinct
       from --ydc-color-text-secondary (shell) on purpose. */
    --ydc-color-text-muted: light-dark(var(--ydc-raw-neutral-600), var(--ydc-raw-gray-450));
    /* Hovered or selected control text in the same patterns. */
    --ydc-color-text-emphasis: light-dark(var(--ydc-raw-action-gray-900), var(--ydc-raw-white));
    /* Welcome eyebrow and subheading. */
    --ydc-color-text-eyebrow: light-dark(var(--ydc-raw-blue-12), var(--ydc-raw-indigo-300));
    --ydc-color-text-subheading: light-dark(var(--ydc-raw-indigo-900), var(--ydc-raw-white));
    --ydc-color-logo-mark: light-dark(var(--ydc-raw-black), var(--ydc-raw-white));
    /* Brand-tinted card outline (AgentSetup). */
    --ydc-color-border-brand: light-dark(var(--ydc-raw-blue-6), var(--ydc-raw-gray-800));
    /* Pill toggles, view toggles, and the logo-wall grid lines. */
    --ydc-color-border-control: light-dark(var(--ydc-raw-neutral-150), var(--ydc-raw-gray-800));
    /* Pressed choice fill: 10% brand indigo, 20% on dark surfaces. */
    --ydc-color-choice-selected-bg: light-dark(var(--ydc-raw-indigo-500-a10), var(--ydc-raw-indigo-500-a20));
    /* Brand tag ("NEW"). */
    --ydc-color-tag-brand-bg: light-dark(var(--ydc-raw-blue-3), var(--ydc-raw-blue-dark-3));
    --ydc-color-tag-brand-border: light-dark(var(--ydc-raw-blue-6), var(--ydc-raw-blue-dark-6));
    --ydc-color-tag-brand-fg: light-dark(var(--ydc-raw-blue-12), var(--ydc-raw-blue-dark-12));

    /* ---- Color: integration and examples patterns (batch 03) -------------- */
    /* Supporting text in the integration directory, patterns, snapshots, and
       examples. Distinct from --ydc-color-text-muted and the shell's
       --ydc-color-text-secondary (batch 01 finding). */
    --ydc-color-text-supporting: light-dark(var(--ydc-raw-gray-600), var(--ydc-raw-gray-400));
    /* Recessed panel: pattern diagram steps and the guide snapshot. */
    --ydc-color-surface-subtle: light-dark(var(--ydc-raw-neutral-50), var(--ydc-raw-neutral-875));
    /* Hovered directory and examples card. */
    --ydc-color-surface-card-hover: light-dark(var(--ydc-raw-indigo-25), var(--ydc-raw-neutral-880));
    /* Hovered card, directory filter, and pattern choice outline. */
    --ydc-color-border-hover: light-dark(var(--ydc-raw-slate-300), var(--ydc-raw-slate-600));
    /* Hovered examples filter outline (a different gray, baseline). */
    --ydc-color-border-hover-neutral: light-dark(var(--ydc-raw-gray-200), var(--ydc-raw-gray-700));
    /* Pressed filter or pattern choice: inverted fill. */
    --ydc-color-choice-pressed-bg: light-dark(var(--ydc-raw-indigo-900), var(--ydc-raw-white));
    --ydc-color-choice-pressed-fg: light-dark(var(--ydc-raw-white), var(--ydc-raw-gray-950));
    /* API coverage tags. The snapshot's light fill is one step lighter. */
    --ydc-color-tag-api-bg: light-dark(var(--ydc-raw-slate-50), var(--ydc-raw-slate-900));
    --ydc-color-tag-api-bg-snapshot: light-dark(var(--ydc-raw-slate-75), var(--ydc-raw-slate-900));
    --ydc-color-tag-api-fg: light-dark(var(--ydc-raw-slate-700), var(--ydc-raw-slate-200));
    /* Examples API tags: translucent fills. */
    --ydc-color-tag-example-bg: light-dark(var(--ydc-raw-indigo-900-a6), var(--ydc-raw-indigo-400-a14));
    /* Diagram step run by You.com. */
    --ydc-color-step-brand-bg: var(--ydc-color-tag-api-bg);
    --ydc-color-step-brand-border: var(--ydc-color-tag-brand-border);
    /* Focus rings in the integration patterns (accent indigo, 3px offset)
       and on examples cards (theme-aware). Both differ from
       --ydc-color-focus-ring, which shared actions use. */
    --ydc-color-focus-ring-accent: var(--ydc-raw-indigo-400);
    --ydc-color-focus-ring-card: light-dark(var(--ydc-raw-indigo-900), var(--ydc-raw-indigo-400));

    /* ---- Color: icon-only actions ----------------------------------------- */
    --ydc-color-icon-action: var(--ydc-raw-gray-500);
    --ydc-color-icon-muted: var(--ydc-raw-neutral-500);
    /* "tint" icon button (AgentSetup copy): translucent fill, text emphasis. */
    --ydc-color-icon-action-tint-bg-hover: light-dark(var(--ydc-raw-black-a4), var(--ydc-raw-white-a8));
    /* "fill" icon button (showcase copy) and showcase menu controls. */
    --ydc-color-control-bg-hover: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-800));

    /* ---- Color: showcase lists and menus ---------------------------------- */
    --ydc-color-list-item-hover-bg: light-dark(var(--ydc-raw-gray-50), var(--ydc-raw-gray-875));
    --ydc-color-list-item-active-bg: light-dark(var(--ydc-raw-gray-100), var(--ydc-raw-gray-850));
    --ydc-color-menu-item-hover-bg: light-dark(var(--ydc-raw-neutral-75), var(--ydc-raw-neutral-850));

    /* ---- Color: code ------------------------------------------------------ */
    --ydc-color-command-text: light-dark(var(--ydc-raw-command-text), var(--ydc-raw-command-text-dark));
    --ydc-color-command-program: light-dark(var(--ydc-raw-command-program), var(--ydc-raw-command-program-dark));
    --ydc-color-command-prompt: var(--ydc-raw-neutral-500);
    --ydc-color-syntax-string: light-dark(var(--ydc-raw-syntax-green), var(--ydc-raw-syntax-green-dark));
    --ydc-color-syntax-number: light-dark(var(--ydc-raw-syntax-amber), var(--ydc-raw-syntax-amber-dark));
    --ydc-color-syntax-comment: light-dark(var(--ydc-raw-syntax-gray), var(--ydc-raw-syntax-gray-dark));
    --ydc-color-syntax-punctuation: light-dark(var(--ydc-raw-syntax-gray), var(--ydc-raw-syntax-gray-dark));
    --ydc-color-syntax-keyword: light-dark(var(--ydc-raw-syntax-pink), var(--ydc-raw-syntax-pink-dark));
    --ydc-color-syntax-builtin: light-dark(var(--ydc-raw-syntax-blue), var(--ydc-raw-syntax-blue-dark));
    --ydc-color-syntax-function: light-dark(var(--ydc-raw-syntax-purple), var(--ydc-raw-syntax-purple-dark));
    --ydc-color-syntax-property: light-dark(var(--ydc-raw-syntax-cyan), var(--ydc-raw-syntax-cyan-dark));

    /* ---- Typography -------------------------------------------------------
       Font families are config-owned: fern/docs.yml `typography` sets the
       system-ui body font and the Lumen Sans heading font. Actions inherit
       the interface font. */
    --ydc-font-heading: "Lumen Sans", sans-serif;
    /* 510 matches the platform font's medium instance used by actions and
       eyebrows; the header uses 500. Keep both. */
    --ydc-font-weight-action: 510;
    --ydc-font-weight-heading: 500;
    --ydc-font-size-action: 14px;
    --ydc-line-height-action: 20px;
    /* Monospace stacks. Each pattern loads its own web font today (batch 01
       finding); the fallbacks differ on purpose. */
    --ydc-font-mono-code: "Source Code Pro", "Courier New", monospace;
    --ydc-font-mono-command: "Martian Mono", "Source Code Pro", ui-monospace, monospace;
    --ydc-font-mono-tag: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* ---- Spacing ---------------------------------------------------------- */
    --ydc-space-action-block: 9px;
    --ydc-space-action-inline: 16px;
    --ydc-space-action-gap: 8px;
    /* DocsButton size="compact" (installation links). */
    --ydc-space-action-compact-block: 5px;
    --ydc-space-action-compact-inline: 12px;
    --ydc-space-action-compact-gap: 6px;

    /* ---- Radius and borders ----------------------------------------------- */
    --ydc-radius-canvas: 16px;
    --ydc-radius-action: 10px;
    --ydc-radius-action-compact: 8px;
    --ydc-radius-action-marketing: 12px;
    --ydc-radius-card: 16px;
    --ydc-radius-control: 8px;
    --ydc-radius-control-sm: 6px;
    --ydc-radius-menu: 12px;
    --ydc-radius-tile: 12px;
    --ydc-radius-chip: 999px;
    --ydc-radius-tag: 24px;
    /* Fern shell (batch 04). */
    --ydc-radius-search: 12px;
    --ydc-radius-tab: 10px;
    --ydc-radius-scrollbar: 3px;
    --ydc-radius-badge-inline: 4px;
    --ydc-radius-pill: 100px;
    --ydc-radius-pill-item: 40px;
    --ydc-border-width: 1px;
    --ydc-focus-ring-width: 2px;
    --ydc-focus-ring-offset: 2px;
    --ydc-focus-ring-offset-wide: 3px;

    /* ---- Shadow and elevation ---------------------------------------------
       --ydc-shadow-control passes shadow lists to light-dark(), which
       accepts only colors, so it computes to `none`.
       This is recorded baseline behavior (batch 02 measurement); correcting
       it changes appearance and needs approval. */
    --ydc-shadow-control: light-dark(
        0 3px 3px 0 rgba(18, 22, 39, 0.01),
        0 1px 2px 0 rgba(18, 22, 39, 0.01),
        0 3px 3px 0 rgba(255, 255, 255, 0.01),
        0 1px 2px 0 rgba(255, 255, 255, 0.01)
    );
    --ydc-shadow-card: 0 2px 6px 0 var(--ydc-raw-black-a3);
    --ydc-shadow-card-hover:
        0 8px 5px 0 var(--ydc-raw-ink-a1), 0 3px 3px 0 var(--ydc-raw-ink-a2),
        0 1px 2px 0 var(--ydc-raw-ink-a2);

    /* ---- Motion -------------------------------------------------------------
       No reduced-motion override exists today (baseline finding); adding one
       changes behavior and needs approval. */
    --ydc-motion-duration-fast: 0.125s;
    --ydc-motion-ease-out: ease-out;
    /* Page-pattern hover transitions and the showcase menu. Kept apart from
       the 125ms action transition; each pattern's timing is baseline. */
    --ydc-motion-duration-hover: 0.15s;
    --ydc-motion-duration-surface: 0.2s;
    --ydc-motion-duration-menu: 0.1s;
    --ydc-motion-ease: ease;
    --ydc-motion-ease-in: ease-in;
}

/* ============================================================================
   Foundations
   ----------------------------------------------------------------------------
   Narrow, site-wide base declarations only. No resets and no changes to
   unreviewed Fern defaults. Fern's inline `color-scheme` on <html> overrides
   this declaration once the theme script runs; it applies before then.
   Moved from fern/styles.css CSS-001 in batch 02.
   ============================================================================ */

:root {
    color-scheme: light dark;
}

/* ============================================================================
   Shared utilities
   ----------------------------------------------------------------------------
   Add a utility only when at least two verified consumers need it, and
   record those consumers in fern/design-system/README.md ("Utilities").
   ============================================================================ */

/* Visually hidden, still announced. Consumers: WelcomeActions and AgentSetup
   copy announcements, WelcomeSections logo names, IntegrationDirectory result
   count. Replaces four per-component copies (batch 03). */
.docs-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ============================================================================
   DocsIcon
   ----------------------------------------------------------------------------
   Shared interface icons from ./DocsIcon.tsx. Icons never shrink inside a
   flex row; the containing control sets their color through currentColor.
   ============================================================================ */

.docs-icon {
    flex-shrink: 0;
}

/* ============================================================================
   DocsIconButton
   ----------------------------------------------------------------------------
   Icon-only action from ./DocsIconButton.tsx. Callers own placement; this
   file owns geometry, color, hover, and focus.

   Sizes: md (32px, AgentSetup copy) and sm (28px, showcase copy).
   Variants keep the two existing hover treatments distinct until a
   convergence is approved:
     tint  translucent fill and emphasized icon (AgentSetup)
     fill  opaque control fill, icon color unchanged (showcase)
   ============================================================================ */

.docs-icon-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ydc-color-icon-action);
    cursor: pointer;
}

.docs-icon-button--md {
    width: 32px;
    height: 32px;
    border-radius: var(--ydc-radius-control);
}

.docs-icon-button--sm {
    width: 28px;
    height: 28px;
    border-radius: var(--ydc-radius-control-sm);
}

.docs-icon-button--tint {
    transition:
        background var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        color var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.docs-icon-button--tint:is(:hover) {
    background: var(--ydc-color-icon-action-tint-bg-hover);
    color: var(--ydc-color-text-emphasis);
}

.docs-icon-button--fill {
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
}

.docs-icon-button--fill:is(:hover) {
    background: var(--ydc-color-control-bg-hover);
}

.docs-icon-button:focus-visible {
    outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring);
    outline-offset: var(--ydc-focus-ring-offset);
}

/* Same disabled treatment as DocsButton. No current consumer disables it. */
.docs-icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   DocsButton
   ----------------------------------------------------------------------------
   Shared action appearance for fern/design-system/components/DocsButton.tsx.
   Moved from fern/styles.css (ledger CSS-004 through CSS-010) in batch 02.
   Callers own width, margins, and alignment; this file owns everything else.

   Variants (color) and sizes (geometry) are independent:
     primary    filled indigo; welcome and showcase key actions
     secondary  bordered neutral fill with an indigo hover tint
     outline    bordered, transparent, neutral hover fill; installation links
     ghost      bordered card surface, no hover fill; section actions
     compact    smaller padding, gap, and radius; installation links
   outline and ghost differ only in text color and hover fill (baseline
   values); converging them is a visible change that needs approval.
   ============================================================================ */

a.docs-button,
button.docs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ydc-space-action-gap);
    padding: var(--ydc-space-action-block) var(--ydc-space-action-inline);
    font-family: inherit;
    font-size: var(--ydc-font-size-action);
    font-weight: var(--ydc-font-weight-action);
    line-height: var(--ydc-line-height-action);
    border-radius: var(--ydc-radius-action);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    outline-offset: var(--ydc-focus-ring-offset);
    background-image: none;
    transition: background var(--ydc-motion-duration-fast) var(--ydc-motion-ease-out);
}

.docs-button.docs-button--primary {
    color: var(--ydc-color-action-primary-fg);
    background: var(--ydc-color-action-primary-bg);
}

.docs-button.docs-button--primary:hover,
.docs-button.docs-button--primary:focus {
    background: var(--ydc-color-action-primary-bg-hover);
}
.docs-button.docs-button--primary:focus-visible {
    background: var(--ydc-color-action-primary-bg-hover);
}

.docs-button.docs-button--secondary {
    color: var(--ydc-color-action-secondary-fg);
    background: var(--ydc-color-action-secondary-bg);
    border: var(--ydc-border-width) solid var(--ydc-color-action-secondary-border);
}

.docs-button.docs-button--secondary:hover,
.docs-button.docs-button--secondary:focus {
    background: var(--ydc-color-action-secondary-bg-hover);
}
.docs-button.docs-button--secondary:focus-visible {
    background: var(--ydc-color-action-secondary-bg-hover);
}

.docs-button.docs-button--outline {
    color: var(--ydc-color-action-outline-fg);
    background: transparent;
    border: var(--ydc-border-width) solid var(--ydc-color-action-secondary-border);
    transition: background var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.docs-button.docs-button--outline:is(:hover) {
    background: var(--ydc-color-action-outline-bg-hover);
}

.docs-button.docs-button--ghost {
    color: var(--ydc-color-action-ghost-fg);
    background: var(--ydc-color-action-ghost-bg);
    border: var(--ydc-border-width) solid var(--ydc-color-action-secondary-border);
}

/* Ghost section actions keep Fern's own focus outline (baseline) until the
   shared ring is approved: revert-layer falls back to Fern's layered styles. */
.docs-button.docs-button--ghost:focus-visible {
    outline: revert-layer;
    outline-offset: revert-layer;
}

.docs-button.docs-button--compact {
    gap: var(--ydc-space-action-compact-gap);
    padding: var(--ydc-space-action-compact-block) var(--ydc-space-action-compact-inline);
    border-radius: var(--ydc-radius-action-compact);
}

.docs-button:focus-visible {
    outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring);
    outline-offset: var(--ydc-focus-ring-offset);
}

.docs-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Decorative angled arrow (DocsIcon ArrowUpRightIcon, which also sets
   flex-shrink). Sits 1px low to align with the label. */
.docs-button__arrow {
    margin-top: 1px;
}

/* ============================================================================
   Welcome page
   ----------------------------------------------------------------------------
   Page pattern for fern/pages/getting-started/welcome.mdx: the hero
   (subheading, WelcomeActions row, tile grid, and blur), the showcase
   wrapper, and the page-only adjustments to Fern's layout. Moved from the
   page's inline <style> block (ledger MDX-01) and the static inline styles
   in welcomeSubheading.tsx (COMP-03) and WelcomeActions.tsx (COMP-02),
   batch 03.

   Page marker: welcome.mdx sets data-docs-page="welcome" on its subheading
   wrapper. The page's rules for Fern elements (breadcrumb, page header,
   table of contents, page actions, footer, content width) moved to the Fern
   adapters in batch 04 (fern/styles/fern/), still scoped with
   :root:has([data-docs-page="welcome"]). Classes this pattern owns need no
   marker.

   Removed with no visible effect: a page-wide `h3` margin rule. Every h3 on
   the page is a WelcomeHeading title, whose own margin always won.
   ============================================================================ */

/* ---- Hero ------------------------------------------------------------------ */

.welcome-subheading {
    max-width: 630px;
    margin-bottom: 56px;
    z-index: 1;
}

.welcome-subheading__row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.welcome-subheading .welcome-subheading__text {
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 24px;
    color: var(--ydc-color-text-subheading);
}

.welcome-actions {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    margin-bottom: 24px;
}

.welcome-actions__row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-actions__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 16px;
}

/* Hidden below 640px; see the README breakpoint table. */
.api-showcase-wrapper {
    display: none;
    position: relative;
    z-index: 1;
}

@media (min-width: 640px) {

    .api-showcase-wrapper {
        display: block;
    }

}

.background-graphic-wrapper {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    /* Half a cell (19.68px) plus 23 cells of 39.36px: the top edge cuts
       mid-tile and the bottom edge lands on a grid line, matching the
       Figma hero clip. */
    height: 924px;
    z-index: 0;
    user-select: none;
    overflow: hidden;
}

/* Tile grid from the API-Docs-Q2 Figma (node 6025-50171): 39.36px squares
   outlined in 0.64px strokes of 10% brand indigo. The cross repeats into the
   grid with one stroke per line. The stroke color is part of the SVG asset
   (asset-specific paint), so it stays in the data URL. */
.tile-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='39.36' height='39.36'%3E%3Cpath d='M0%2019.68h39.36M19.68%200v39.36' fill='none' stroke='%234a5ee0' stroke-opacity='0.1' stroke-width='0.64'/%3E%3C/svg%3E");
    background-size: 39.36px 39.36px;
}

/* Canvas-colored backdrop under the hero text (Figma node 6025-50172, a
   50px layer blur). Centered on the article column; the solid core covers
   the heading, subheading, and action row. */
.hero-blur {
    position: absolute;
    top: 8px;
    left: max(0px, calc(50% - 500px));
    width: min(600px, 100%);
    height: 400px;
    background: var(--ydc-color-canvas);
    filter: blur(50px);
}

@media (min-width: 1024px) {

    .hero-blur {
        top: 40px;
        height: 372px;
    }

}

/* ============================================================================
   WelcomeSections
   ----------------------------------------------------------------------------
   Page pattern for fern/components/WelcomeSections.tsx: WelcomeHeading,
   ApiCards and ResourceCards, ClosingCta, and LogoWall on the welcome page.
   Replaces the SECTION_CSS string the component injected on mount and the
   static inline styles it rendered (ledger COMP-04), batch 03.

   Section actions use DocsButton (variant="ghost"); closing actions use
   DocsButton primary and secondary. Their appearance lives in DocsButton.css.

   Baseline behavior kept on purpose (batch 01 finding COMP-04): the card
   and logo-cell hover fills never applied, because an inline background
   always won. This file declares no hover fill, so nothing changes.
   Enabling the hover is a visible correction that needs approval.
   ============================================================================ */

/* ---- WelcomeHeading ------------------------------------------------------ */

.welcome-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 80px 0 24px;
}

.welcome-heading__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px;
}

.welcome-heading__eyebrow {
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--ydc-font-weight-action);
    letter-spacing: 0.36px;
    text-transform: uppercase;
    color: var(--ydc-color-text-eyebrow);
}

/* Two classes: the content adapter (fern/styles/fern/content.css) sets
   `.prose h3` rules after this file. */
.welcome-heading .welcome-heading__title {
    margin: 0;
    font-size: 28px;
    line-height: 36px;
    font-weight: var(--ydc-font-weight-heading);
    font-family: var(--ydc-font-heading);
    color: var(--ydc-color-text-primary);
}

.welcome-heading .welcome-heading__description {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    color: var(--ydc-color-text-muted);
}

/* ---- Cards ----------------------------------------------------------------- */

.welcome-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

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

.welcome-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    border-radius: var(--ydc-radius-card);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    background: var(--ydc-color-surface-card);
    box-shadow: var(--ydc-shadow-card);
    text-decoration: none;
    color: inherit;
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
}

/* Stroke icons from WelcomeIcons.tsx. */
.welcome-icon {
    flex-shrink: 0;
}

.welcome-card__icon {
    color: var(--ydc-color-text-primary);
}

.welcome-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-card__title,
.welcome-closing-item__title {
    font-size: 18px;
    line-height: 24px;
    font-weight: var(--ydc-font-weight-heading);
    font-family: var(--ydc-font-heading);
    color: var(--ydc-color-text-primary);
}

.welcome-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.welcome-card__description,
.welcome-closing-item__description {
    font-size: 14px;
    line-height: 24px;
    color: var(--ydc-color-text-muted);
}

/* Brand tag, mirroring the youdotcom-frontend Tag (color="brand"). */
.welcome-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 2px 8px;
    box-sizing: border-box;
    border-radius: var(--ydc-radius-tag);
    border: var(--ydc-border-width) solid var(--ydc-color-tag-brand-border);
    background: var(--ydc-color-tag-brand-bg);
    color: var(--ydc-color-tag-brand-fg);
    font-family: var(--ydc-font-mono-tag);
    font-size: 11px;
    line-height: 12px;
    font-weight: 400;
}

/* ---- Closing CTA ----------------------------------------------------------- */

.welcome-closing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 64px;
    border-radius: var(--ydc-radius-card);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    background: var(--ydc-color-surface-card);
    box-shadow: var(--ydc-shadow-card);
}

.welcome-closing-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 28px 24px;
}

.welcome-closing-item + .welcome-closing-item {
    border-left: var(--ydc-border-width) solid var(--ydc-color-border);
}

.welcome-closing-item__description {
    margin-bottom: 16px;
}

.welcome-closing-action {
    margin-top: auto;
}

/* ---- Logo wall ------------------------------------------------------------- */

.welcome-logo-wall {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border-radius: var(--ydc-radius-action);
    border: var(--ydc-border-width) solid var(--ydc-color-border-control);
    background: var(--ydc-color-border-control);
    overflow: hidden;
}

.welcome-logo-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 94px;
    padding: 0 20px;
    background: var(--ydc-color-surface-card);
    text-decoration: none;
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
}

/* Width comes from WELCOME_LOGO_WIDTHS as an inline style (asset data). */
.welcome-logo-mark {
    display: block;
    max-width: 100%;
    color: var(--ydc-color-logo-mark);
}

.welcome-logo-mark svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Breakpoints (fern/design-system/README.md) ---------------------------- */

@media (max-width: 900px) {

    .welcome-cards-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .welcome-logo-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {

    .welcome-cards-grid,
    .welcome-cards-grid-3,
    .welcome-closing {
        grid-template-columns: minmax(0, 1fr);
    }
    .welcome-closing-item + .welcome-closing-item {
        border-left: 0;
        border-top: var(--ydc-border-width) solid var(--ydc-color-border);
    }

}

/* ============================================================================
   AgentSetup
   ----------------------------------------------------------------------------
   Page pattern for fern/components/AgentSetup.tsx (welcome page). Replaces
   the AGENT_SETUP_CSS string the component injected on mount (ledger
   COMP-05), batch 03.

   Shared controls: the copy button is DocsIconButton (size md, variant
   tint) and the Cursor install link is DocsButton (variant outline, size
   compact); their appearance lives in fern/design-system/components/.
   Method choices are pressed buttons (aria-pressed), not ARIA tabs.

   Baseline kept (batch 01 findings): the native agent <select> is invisible
   and shows no focus indicator, and the command line scrolls without a
   keyboard-focus contract. Correcting either is a visible change that
   needs approval.
   ============================================================================ */

.agent-setup-card {
    position: relative;
    overflow: hidden;
    border: var(--ydc-border-width) solid var(--ydc-color-border-brand);
    border-radius: var(--ydc-radius-card);
    background: var(--ydc-color-surface-card);
    box-shadow: var(--ydc-shadow-card);
}

.agent-setup-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 24px 32px;
}

.agent-setup-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--ydc-color-text-muted);
    text-align: center;
}

.agent-setup-toggle {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border: var(--ydc-border-width) solid var(--ydc-color-border-control);
    border-radius: var(--ydc-radius-pill);
}

.agent-setup-tab {
    padding: 9px 16px;
    border: 0;
    border-radius: var(--ydc-radius-pill-item);
    background: transparent;
    font-family: inherit;
    font-size: var(--ydc-font-size-action);
    font-weight: var(--ydc-font-weight-action);
    line-height: var(--ydc-line-height-action);
    color: var(--ydc-color-text-muted);
    cursor: pointer;
    transition:
        background var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        color var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.agent-setup-tab:is(:hover),
.agent-setup-tab[aria-pressed="true"] {
    color: var(--ydc-color-text-emphasis);
}

/* Pressed fill: a tint of brand indigo instead of the Figma's flat gray. */
.agent-setup-tab[aria-pressed="true"] {
    background: var(--ydc-color-choice-selected-bg);
}

.agent-setup-row {
    display: flex;
    align-items: stretch;
    min-height: 48px;
    border-top: var(--ydc-border-width) solid var(--ydc-color-border-brand);
}

.agent-setup-picker {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 16px;
    border-right: var(--ydc-border-width) solid var(--ydc-color-border-brand);
    font-size: var(--ydc-font-size-action);
    font-weight: var(--ydc-font-weight-action);
    line-height: var(--ydc-line-height-action);
    color: var(--ydc-color-text-emphasis);
    transition: background var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.agent-setup-picker:is(:hover) {
    background: var(--ydc-color-surface-hover);
}

.agent-setup-picker select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    /* Below 16px, iOS Safari zooms the page when the select takes focus. */
    font-size: 16px;
}

/* Brand marks keep their own fill (asset-specific SVG paint). */
.agent-setup-brand {
    flex-shrink: 0;
}

.agent-setup-chevron {
    color: var(--ydc-color-icon-muted);
}

.agent-setup-command {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 0 8px 0 16px;
}

.agent-setup-code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    font-family: var(--ydc-font-mono-command);
    font-size: 12px;
    font-weight: 300;
    line-height: 28px;
    color: var(--ydc-color-command-text);
}

.agent-setup-code::-webkit-scrollbar {
    display: none;
}

.agent-setup-prompt {
    margin-right: 12px;
    color: var(--ydc-color-command-prompt);
    user-select: none;
}

.agent-setup-bin {
    color: var(--ydc-color-command-program);
}

.agent-setup a {
    background-image: none;
    text-decoration: none;
}

.agent-setup-more {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 12px;
}

.agent-setup-more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--ydc-font-size-action);
    font-weight: var(--ydc-font-weight-action);
    line-height: var(--ydc-line-height-action);
    color: var(--ydc-color-text-muted);
}

.agent-setup-more a:is(:hover) {
    color: var(--ydc-color-text-emphasis);
}

.agent-setup button:focus-visible,
.agent-setup a:focus-visible {
    outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring);
    outline-offset: var(--ydc-focus-ring-offset);
}

@media (max-width: 640px) {

    .agent-setup-top {
        padding: 36px 16px 24px;
    }
    /* Four choices overflow narrow screens, so the pill wraps to two rows. */
    .agent-setup-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
    .agent-setup-picker-label {
        display: none;
    }

}

/* ============================================================================
   ApiShowcase
   ----------------------------------------------------------------------------
   Page pattern for fern/components/ApiShowcase.tsx (welcome page, 640px and
   wider). Replaces the COMPONENT_STYLES string the component injected on
   mount, its static inline style objects, and its per-token inline colors
   (ledger COMP-06), batch 03.

   Shared controls: the copy button is DocsIconButton (size sm, variant
   fill) and the key link is DocsButton primary. The key link's right-only
   margin (0 12px 0 0) is baseline, not a typo.

   Fixed geometry: the code panel is 400px high, so switching APIs or the
   request/response view never resizes the card; long panels scroll inside.

   Baseline kept: the language menu's inline shadow passed two shadow lists
   to light-dark(), which accepts only colors, so it never rendered. This
   file declares no menu shadow. Adding one is a visible change.
   ============================================================================ */

.api-showcase {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-card);
    background: var(--ydc-color-surface-card);
}

.api-showcase-main {
    display: flex;
    min-height: 480px;
}

/* ---- Sidebar ----------------------------------------------------------------- */

.api-showcase-sidebar {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    max-width: 240px;
    margin-top: 24px;
    padding: 8px 0 24px 24px;
}

.api-showcase-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.api-showcase-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 12px;
}

.api-showcase-section-label {
    padding: 4px 12px 6px 12px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: var(--ydc-color-text-tertiary);
}

.api-showcase-tab-btn {
    padding: 8px 12px;
    border-radius: var(--ydc-radius-control);
    border: none;
    background: transparent;
    color: var(--ydc-color-text-primary);
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    cursor: pointer;
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
    font-weight: 400;
}

.api-showcase-tab-btn:is(:hover) {
    background: var(--ydc-color-list-item-hover-bg);
}

.api-showcase-tab-btn.active,
.api-showcase-tab-btn.active:is(:hover) {
    background: var(--ydc-color-list-item-active-bg);
}

.api-showcase-tab-btn.active {
    font-weight: 500;
}

.api-showcase-platform-link {
    align-self: stretch;
    margin: 0px 12px 0px 0px;
}

/* ---- Code panel -------------------------------------------------------------- */

.api-showcase-panel {
    display: flex;
    flex: 2;
    flex-direction: column;
    margin: 24px 24px 24px 12px;
    padding: 20px 24px 24px 24px;
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-card);
    background: var(--ydc-color-surface-raised);
    box-shadow: var(--ydc-shadow-card);
}

.api-showcase-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.api-showcase-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 28px;
}

.api-showcase-header-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.api-showcase-code {
    flex-shrink: 0;
    height: 400px;
    padding: 0 8px;
    overflow: auto;
}

.api-showcase-code .api-showcase-pre {
    margin: 0;
    padding: 0px;
    font-family: var(--ydc-font-mono-code);
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ydc-color-text-primary);
}

/* Syntax token classes, assigned per token by the highlighter. */
.api-showcase-token--string { color: var(--ydc-color-syntax-string); }
.api-showcase-token--number { color: var(--ydc-color-syntax-number); }
.api-showcase-token--comment { color: var(--ydc-color-syntax-comment); }
.api-showcase-token--punctuation { color: var(--ydc-color-syntax-punctuation); }
.api-showcase-token--keyword { color: var(--ydc-color-syntax-keyword); }
.api-showcase-token--builtin { color: var(--ydc-color-syntax-builtin); }
.api-showcase-token--function { color: var(--ydc-color-syntax-function); }
.api-showcase-token--property { color: var(--ydc-color-syntax-property); }

.api-showcase-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding-top: 16px;
    border-top: var(--ydc-border-width) solid var(--ydc-color-divider);
}

/* ---- Language menu ----------------------------------------------------------- */

.api-showcase-dropdown {
    position: relative;
    display: inline-block;
}

.api-showcase-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    height: 28px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: var(--ydc-color-text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--ydc-radius-control);
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
}

.api-showcase-dropdown-btn:is(:hover) {
    background: var(--ydc-color-control-bg-hover);
}

.api-showcase-chevron {
    color: var(--ydc-color-icon-action);
}

.api-showcase-dropdown-menu {
    position: absolute;
    top: 100%;
    left: -4px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding: 4px;
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-menu);
    background: var(--ydc-color-surface-raised);
    transform-origin: top left;
    animation: api-showcase-menu-open var(--ydc-motion-duration-menu) var(--ydc-motion-ease-out) forwards;
}

.api-showcase-dropdown-menu.closing {
    animation: api-showcase-menu-close var(--ydc-motion-duration-menu) var(--ydc-motion-ease-in) forwards;
}

@keyframes api-showcase-menu-open {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes api-showcase-menu-close {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-4px);
    }
}

.api-showcase-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--ydc-radius-control);
    border: none;
    background: transparent;
    color: var(--ydc-color-text-primary);
    font-size: 12px;
    line-height: 16px;
    text-align: left;
    cursor: pointer;
    transition: background var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
    font-weight: 400;
}

.api-showcase-dropdown-item:is(:hover) {
    background: var(--ydc-color-menu-item-hover-bg);
}

.api-showcase-dropdown-item.active,
.api-showcase-dropdown-item.active:is(:hover) {
    background: var(--ydc-color-control-bg-hover);
}

/* ---- Request/response choice ------------------------------------------------- */

/* A compact version of the AgentSetup pill. Pressed buttons, not tabs. */
.api-showcase-view-toggle {
    display: inline-flex;
    flex-shrink: 0;
    gap: 2px;
    padding: 2px;
    border: var(--ydc-border-width) solid var(--ydc-color-border-control);
    border-radius: var(--ydc-radius-control);
}

.api-showcase-view-btn {
    padding: 4px 12px;
    border: 0;
    border-radius: var(--ydc-radius-control-sm);
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: var(--ydc-font-weight-action);
    line-height: 16px;
    color: var(--ydc-color-text-muted);
    cursor: pointer;
    transition:
        background var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        color var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.api-showcase-view-btn:is(:hover),
.api-showcase-view-btn[aria-pressed="true"] {
    color: var(--ydc-color-text-emphasis);
}

.api-showcase-view-btn[aria-pressed="true"] {
    background: var(--ydc-color-choice-selected-bg);
}

.api-showcase-view-btn[aria-disabled="true"],
.api-showcase-view-btn[aria-disabled="true"]:is(:hover) {
    color: var(--ydc-color-text-muted);
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---- Text links -------------------------------------------------------------- */

.api-showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--ydc-font-size-action);
    font-weight: var(--ydc-font-weight-action);
    line-height: var(--ydc-line-height-action);
    color: var(--ydc-color-text-muted);
    text-decoration: none;
    background-image: none;
    white-space: nowrap;
    transition: color var(--ydc-motion-duration-surface) var(--ydc-motion-ease);
}

.api-showcase-link:is(:hover) {
    color: var(--ydc-color-text-emphasis);
}

.api-showcase-link.small {
    font-size: 12px;
    line-height: 16px;
}

/* The new-tab arrow sits 1px low, like the DocsButton arrow. */
.api-showcase-link__external {
    margin-top: 1px;
}

.api-showcase button:focus-visible,
.api-showcase a:focus-visible,
.api-showcase-code:focus-visible {
    outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring);
    outline-offset: var(--ydc-focus-ring-offset);
}

/* ============================================================================
   IntegrationDirectory
   ----------------------------------------------------------------------------
   Page pattern for fern/components/IntegrationDirectory.tsx (integrations
   index). Moved from the DIRECTORY_CSS string the component rendered in a
   <style> element (ledger COMP-07), batch 03. Colors are design tokens; the
   --id-* properties are local aliases for them.

   API filters are pressed buttons (aria-pressed), not tabs. Card titles use
   a stretched link: the title anchor's ::after covers the card. Partner logo
   widths come from WELCOME_LOGO_WIDTHS as an inline style (asset data).

   Baseline kept (batch 01 finding COMP-07): "Clear filters" unmounts itself,
   so focus falls to <body>. Fixing that is a behavior change for approval.
   ============================================================================ */
.integration-directory {
  --id-fg: var(--ydc-color-text-primary);
  --id-muted: var(--ydc-color-text-supporting);
  --id-border: var(--ydc-color-border);
  --id-bg: var(--ydc-color-surface-card);
  color: var(--id-fg);
}
.integration-directory .id-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 16px;
}
.integration-directory .id-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.integration-directory input, .integration-directory select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--id-border);
  border-radius: 10px;
  background: var(--id-bg);
  color: var(--id-fg);
  font: inherit;
  font-size: 16px;
}
.integration-directory input::placeholder { color: var(--id-muted); }
.integration-directory .id-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.integration-directory .id-filters legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
}
.integration-directory .id-filter, .integration-directory .id-reset {
  border: 1px solid var(--id-border);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--id-bg);
  color: var(--id-muted);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.integration-directory .id-filter:is(:hover), .integration-directory .id-reset:is(:hover) {
  border-color: var(--ydc-color-border-hover);
  color: var(--id-fg);
}
.integration-directory .id-filter[aria-pressed="true"] {
  border-color: var(--ydc-color-choice-pressed-bg);
  background: var(--ydc-color-choice-pressed-bg);
  color: var(--ydc-color-choice-pressed-fg);
}
.integration-directory .id-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 16px 0;
}
.integration-directory .id-count {
  margin: 0;
  color: var(--id-muted);
  font-size: 13px;
}
.integration-directory .id-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.integration-directory .id-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--id-border);
  border-radius: 16px;
  background: var(--id-bg);
  transition: border-color var(--ydc-motion-duration-hover) var(--ydc-motion-ease), background var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}
.integration-directory .id-card:is(:hover) {
  border-color: var(--ydc-color-border-hover);
  background: var(--ydc-color-surface-card-hover);
}
.integration-directory .id-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}
.integration-directory .id-logo {
  display: block;
  max-width: 140px;
  color: var(--id-fg);
}
.integration-directory .id-logo svg { display: block; width: 100%; height: auto; }
.integration-directory .id-initial {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--id-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.integration-directory .id-category, .integration-directory .id-method {
  color: var(--id-muted);
  font-size: 12px;
  line-height: 18px;
}
.integration-directory .id-title { margin: 0; font-size: 18px; line-height: 26px; }
.integration-directory .id-link {
  color: var(--id-fg) !important;
  text-decoration: none !important;
  background-image: none !important;
}
.integration-directory .id-link::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.integration-directory .id-link:focus { outline: none; }
.integration-directory .id-link:focus-visible::after,
.integration-directory input:focus-visible, .integration-directory select:focus-visible,
.integration-directory button:focus-visible { outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring-accent); outline-offset: var(--ydc-focus-ring-offset-wide); }
.integration-directory .id-description {
  flex: 1;
  margin: 0;
  color: var(--id-muted);
  font-size: 14px;
  line-height: 22px;
}
.integration-directory .id-method { align-self: flex-start; padding: 3px 9px; border: 1px solid var(--id-border); border-radius: 6px; }
.integration-directory .id-apis { display: flex; flex-wrap: wrap; gap: 6px; }
.integration-directory .id-api {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ydc-color-tag-api-bg);
  color: var(--ydc-color-tag-api-fg);
  font-size: 11px;
  line-height: 18px;
}
.integration-directory .id-cta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 500; }
.integration-directory .id-empty { padding: 32px 24px; border: 1px dashed var(--id-border); border-radius: 16px; }
.integration-directory .id-empty p { margin: 0; }
.integration-directory .id-empty p + p { margin-top: 8px; color: var(--id-muted); font-size: 14px; }
@media (max-width: 640px) {

  .integration-directory .id-controls, .integration-directory .id-grid { grid-template-columns: minmax(0, 1fr); }
  .integration-directory .id-card { padding: 20px; }

}

/* ============================================================================
   IntegrationPatterns
   ----------------------------------------------------------------------------
   Page pattern for fern/components/IntegrationPatterns.tsx (integrations
   index). Moved from the PATTERN_CSS string the component rendered in a
   <style> element (ledger COMP-08), batch 03. Colors are design tokens; the
   --ip-* properties are local aliases for them.

   Pattern choices are pressed buttons that control one labeled panel; they
   are not ARIA tabs. --ip-steps is set inline from the pattern's step count
   (data-dependent) and sizes the diagram columns.
   ============================================================================ */
.integration-patterns {
  --ip-fg: var(--ydc-color-text-primary);
  --ip-muted: var(--ydc-color-text-supporting);
  --ip-border: var(--ydc-color-border);
  --ip-bg: var(--ydc-color-surface-card);
  color: var(--ip-fg);
}
.integration-patterns .ip-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.integration-patterns .ip-choice {
  padding: 9px 14px;
  border: 1px solid var(--ip-border);
  border-radius: 10px;
  background: var(--ip-bg);
  color: var(--ip-muted);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.integration-patterns .ip-choice:is(:hover) { color: var(--ip-fg); border-color: var(--ydc-color-border-hover); }
.integration-patterns .ip-choice[aria-pressed="true"] {
  border-color: var(--ydc-color-choice-pressed-bg);
  background: var(--ydc-color-choice-pressed-bg);
  color: var(--ydc-color-choice-pressed-fg);
}
.integration-patterns button:focus-visible, .integration-patterns a:focus-visible { outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring-accent); outline-offset: var(--ydc-focus-ring-offset-wide); }
.integration-patterns .ip-panel { padding: 24px; border: 1px solid var(--ip-border); border-radius: 16px; background: var(--ip-bg); }
.integration-patterns .ip-title { margin: 0; font-size: 20px; line-height: 28px; }
.integration-patterns .ip-description { margin: 10px 0 24px; color: var(--ip-muted); font-size: 14px; line-height: 22px; }
.integration-patterns .ip-flow {
  display: grid;
  grid-template-columns: repeat(var(--ip-steps), minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.integration-patterns .ip-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 16px 12px;
  border: 1px solid var(--ip-border);
  border-radius: 10px;
  background: var(--ydc-color-surface-subtle);
}
.integration-patterns .ip-step[data-owner="You.com"] { background: var(--ydc-color-step-brand-bg); border-color: var(--ydc-color-step-brand-border); }
.integration-patterns .ip-step[data-optional="true"] { border-style: dashed; }
.integration-patterns .ip-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ip-muted);
  font-size: 16px;
}
.integration-patterns .ip-owner { color: var(--ip-muted); font-size: 11px; line-height: 16px; }
.integration-patterns .ip-step-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.integration-patterns .ip-detail { color: var(--ip-muted); font-size: 12px; line-height: 18px; }
.integration-patterns .ip-optional { font-size: 11px; font-weight: 500; }
.integration-patterns .ip-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; }
.integration-patterns .ip-facts dt { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.integration-patterns .ip-facts dd { margin: 0; color: var(--ip-muted); font-size: 14px; line-height: 22px; }
.integration-patterns .ip-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--ip-border); color: var(--ip-muted); font-size: 13px; line-height: 21px; }
.integration-patterns .ip-apis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.integration-patterns .ip-api { padding: 3px 8px; border-radius: 6px; background: var(--ydc-color-tag-api-bg); color: var(--ydc-color-tag-api-fg); font-size: 12px; line-height: 18px; }
.integration-patterns .ip-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; font-size: 13px; }
@media (max-width: 640px) {

  .integration-patterns .ip-panel { padding: 20px; }
  .integration-patterns .ip-flow, .integration-patterns .ip-facts { grid-template-columns: minmax(0, 1fr); }
  .integration-patterns .ip-step:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; transform: translateX(-50%); }

}

/* ============================================================================
   IntegrationSnapshot
   ----------------------------------------------------------------------------
   Page pattern for fern/components/IntegrationSnapshot.tsx ("Integration at
   a Glance" on 13 stack guides). Moved from the SNAPSHOT_CSS string each
   instance rendered in a <style> element (ledger COMP-09), batch 03.
   Colors are design tokens; the --is-* properties are local aliases.
   ============================================================================ */
.integration-snapshot {
  --is-fg: var(--ydc-color-text-primary);
  --is-muted: var(--ydc-color-text-supporting);
  --is-border: var(--ydc-color-border);
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--is-border);
  border-radius: 16px;
  background: var(--ydc-color-surface-subtle);
  color: var(--is-fg);
}
.integration-snapshot .is-heading { margin: 0 0 20px; font-size: 14px; font-weight: 600; }
.integration-snapshot .is-rows { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.integration-snapshot .is-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; }
.integration-snapshot dt { margin: 0; color: var(--is-muted); font-size: 13px; line-height: 22px; }
.integration-snapshot dd { min-width: 0; margin: 0; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.integration-snapshot .is-apis { display: flex; flex-wrap: wrap; gap: 6px; }
.integration-snapshot .is-api { padding: 2px 8px; border-radius: 6px; background: var(--ydc-color-tag-api-bg-snapshot); color: var(--ydc-color-tag-api-fg); font-size: 12px; line-height: 20px; }
.integration-snapshot .is-detail { margin-left: 6px; white-space: nowrap; font-size: 13px; }
.integration-snapshot .is-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--is-border); font-size: 13px; }
.integration-snapshot a:focus-visible { outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring-accent); outline-offset: var(--ydc-focus-ring-offset-wide); }
@media (max-width: 640px) {

  .integration-snapshot { padding: 20px; }
  .integration-snapshot .is-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }

}

/* ============================================================================
   ExamplesGallery
   ----------------------------------------------------------------------------
   Page pattern for fern/components/ExamplesGallery.tsx, which renders the
   whole Examples page (fern/pages/use-cases/gallery.mdx). Replaces the
   COMPONENT_STYLES string the component injected on mount and its static
   inline styles (ledger COMP-10), plus the page's inline <style> block that
   hid Fern's page chrome (MDX-02), batch 03.

   Cards use a stretched link: the title anchor's ::after covers the card,
   so the card is one click target while the Source link (raised with
   z-index) stays independently clickable. Filters are pressed buttons.

   Page marker: the component root carries data-docs-page="examples". The
   rules that hide Fern's page chrome on this page moved to the Fern adapters
   in batch 04 (fern/styles/fern/), still scoped with
   :root:has([data-docs-page="examples"]).
   ============================================================================ */

/* ---- Page ------------------------------------------------------------------ */

.eg-page {
    width: 100%;
    max-width: 906px;
    margin: 0 auto;
    padding-top: 48px;
    padding-bottom: 64px;
}

.eg-page .eg-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: var(--ydc-font-weight-heading);
    line-height: 40px;
    font-family: var(--ydc-font-heading);
    color: var(--ydc-color-text-primary);
}

.eg-page .eg-intro {
    max-width: 680px;
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 24px;
    color: var(--ydc-color-text-secondary);
}

.eg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.eg-filter {
    font: inherit;
    font-size: 13px;
    line-height: 18px;
    padding: 6px 12px;
    border-radius: var(--ydc-radius-chip);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    background: transparent;
    color: var(--ydc-color-text-supporting);
    cursor: pointer;
    transition:
        background var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        color var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        border-color var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.eg-filter:is(:hover) {
    color: var(--ydc-color-text-primary);
    border-color: var(--ydc-color-border-hover-neutral);
}

.eg-filter[aria-pressed="true"] {
    background: var(--ydc-color-choice-pressed-bg);
    border-color: var(--ydc-color-choice-pressed-bg);
    color: var(--ydc-color-choice-pressed-fg);
}

.eg-section {
    margin-top: 40px;
}

/* The content adapter (fern/styles/fern/content.css) forces Lumen Sans 500
   on prose h2 with !important, so the 600 weight here does not render; it is
   kept from the original source. */
.eg-page .eg-section-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--ydc-color-text-primary);
}

.eg-page .eg-section-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--ydc-color-text-supporting);
}

/* 270px is the card's intrinsic minimum (batch 01 finding). */
.eg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}

/* ---- Card ------------------------------------------------------------------ */

.eg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: var(--ydc-color-surface-card);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-tile);
    transition:
        border-color var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        background var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.eg-card:is(:hover) {
    border-color: var(--ydc-color-border-hover);
    background: var(--ydc-color-surface-card-hover);
}

.eg-card-header {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.eg-card-link {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    color: var(--ydc-color-text-primary) !important;
    text-decoration: none !important;
    background-image: none !important;
}

.eg-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--ydc-radius-tile);
}

/* The link's ::after covers the card, so its focus ring outlines the whole
   card. Mouse clicks get no ring; keyboard focus does. */
.eg-card-link:focus {
    outline: none;
}

.eg-card-link:focus-visible::after {
    outline: var(--ydc-focus-ring-width) solid var(--ydc-color-focus-ring-card);
    outline-offset: var(--ydc-focus-ring-offset);
}

.eg-card-arrow-wrap {
    display: flex;
    height: 22px;
    align-items: center;
    color: var(--ydc-color-text-primary);
}

.eg-card-arrow {
    flex-shrink: 0;
    opacity: 0;
    transform: translate(-2px, 2px);
    transition:
        opacity var(--ydc-motion-duration-hover) var(--ydc-motion-ease),
        transform var(--ydc-motion-duration-hover) var(--ydc-motion-ease);
}

.eg-card:hover .eg-card-arrow,
.eg-card:focus-within .eg-card-arrow {
    opacity: 1;
    transform: none;
}
.eg-card:focus-within .eg-card-arrow {
    opacity: 1;
    transform: none;
}

.eg-card .eg-card-description {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--ydc-color-text-supporting);
}

.eg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.eg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.eg-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--ydc-radius-control-sm);
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
    color: var(--ydc-color-tag-api-fg);
    background: var(--ydc-color-tag-example-bg);
}

.eg-source {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 16px;
    color: var(--ydc-color-text-supporting) !important;
    text-decoration: none !important;
    background-image: none !important;
    white-space: nowrap;
}

.eg-source:is(:hover) {
    color: var(--ydc-color-text-primary) !important;
}

/* ============================================================================
   BookDemoButton
   ----------------------------------------------------------------------------
   Marketing action for fern/components/BookDemoButton.tsx (Rate Limits).
   A distinct role from DocsButton: it clones the you.com "Book a Demo" CTA,
   so it is larger (12px 20px, 12px radius, 600 weight) and its chevron
   slides 2px on hover or focus. Replaces the component's inline styles and
   its React hover/focus state (ledger COMP-11), batch 03.

   :focus (not :focus-visible) matches the previous onFocus handler, which
   applied the hover treatment on any focus.
   ============================================================================ */

.book-demo {
    margin: 20px 0;
}

.book-demo__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ydc-color-action-marketing-fg);
    background: var(--ydc-color-action-marketing-bg);
    border-radius: var(--ydc-radius-action-marketing);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--ydc-motion-duration-fast) var(--ydc-motion-ease-out);
    outline-offset: var(--ydc-focus-ring-offset);
    /* Fern's MDX anchors inherit a link color and underline gradient. */
    background-image: none;
}

.book-demo__link:hover,
.book-demo__link:focus {
    background: var(--ydc-color-action-marketing-bg-hover);
}
.book-demo__link:focus-visible {
    background: var(--ydc-color-action-marketing-bg-hover);
}

.book-demo__icon {
    display: inline-flex;
    transform: translateX(0);
    transition: transform var(--ydc-motion-duration-fast) var(--ydc-motion-ease-out);
}

.book-demo__link:hover .book-demo__icon,
.book-demo__link:focus .book-demo__icon {
    transform: translateX(2px);
}
.book-demo__link:focus-within .book-demo__icon {
    transform: translateX(2px);
}

.book-demo__chevron {
    flex-shrink: 0;
}

/* ============================================================================
   GitHubStarButton
   ----------------------------------------------------------------------------
   Star CTA for fern/components/GitHubStarButton.tsx (19 guides). Replaces
   the component's computed inline styles (ledger COMP-12), batch 03. The
   variant and count state are classes; nothing here depends on JavaScript
   except the count text itself.

   The count segment always reserves 46px and keeps its divider, so the
   button is the same size from first paint whether or not the GitHub API
   answered; only its colors go transparent while there is no number.
   ============================================================================ */

.gh-star--page-top {
    margin: 0 0 28px;
}

.gh-star--inline {
    margin: 12px 0 20px;
}

.gh-star__link {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ydc-color-text-primary);
    text-decoration: none;
    background: var(--ydc-color-star-bg);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-control);
    /* Fern's MDX anchors inherit a link color and underline gradient. */
    background-image: none;
}

.gh-star--page-top .gh-star__link {
    font-size: 14px;
}

.gh-star--inline .gh-star__link {
    font-size: 13px;
}

.gh-star__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.gh-star--page-top .gh-star__label {
    padding: 7px 14px;
}

.gh-star--inline .gh-star__label {
    padding: 5px 11px;
}

.gh-star__icon {
    flex-shrink: 0;
}

.gh-star__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    font-variant-numeric: tabular-nums;
    border-left: var(--ydc-border-width) solid var(--ydc-color-border);
    background: var(--ydc-color-star-count-bg);
    color: var(--ydc-color-text-secondary);
    white-space: nowrap;
}

.gh-star--page-top .gh-star__count {
    padding: 7px 10px;
}

.gh-star--inline .gh-star__count {
    padding: 5px 10px;
}

.gh-star__count--empty {
    border-left-color: transparent;
    background: transparent;
}

/* ============================================================================
   CustomHeader
   ----------------------------------------------------------------------------
   Owned wrapper geometry for fern/components/CustomHeader.tsx: the desktop
   header grid, the logo-and-tabs column, the search column, and the
   right-side group. Fern-rendered children (tabs, search bar, navbar links,
   theme switch) are styled in fern/styles/fern/header.css and search.css.
   Moved from fern/styles.css (ledger CSS-058 through CSS-060, CSS-077, and the
   wrapper rules inside CSS-108 and CSS-109) and from the component's inline
   padding (COMP-14), batch 04.

   The selectors keep their #fern-header ancestor so their specificity, and
   so the cascade against the compact-header rules, is unchanged.
   ============================================================================ */

/* Desktop header grid: logo and tabs, then the search bar, then the
   right-side group. The side columns never shrink below their content and
   split leftover space evenly, so the search column first grows to its 640px
   cap and then stays centered on the viewport once both sides have room.
   Until then it fills the gap between the tabs and the right-side group. */
#fern-header .fern-header-desktop {
    grid-template-columns:
        minmax(max-content, 1fr)
        minmax(160px, 640px)
        minmax(max-content, 1fr);
    column-gap: 24px;
    padding: 12px 20px 12px 28px;
}

/* The logo's column ends 16px inside the content window's left edge (the
   sidebar width, less the header's 28px left padding), so the first tab
   lines up with the content window below at any logo width. */
#fern-header .fern-header-start {
    grid-template-columns: calc(var(--spacing-sidebar-width) + 16px - 28px) auto;
}

#fern-header .fern-header-search-wrap {
    width: 100%;
}

/* Right-side group: 8px gaps (Figma Topbar spec). */
#fern-header .header-end {
    gap: 8px;
}

/* Compact header, below 74.5rem (1192px). */
@media (width < 74.5rem) {

    #fern-header .header-end {
        gap: 4px;
    }

}

/* Ultra-compact header, below 67.5rem (1080px). */
@media (width < 67.5rem) {

    #fern-header .fern-header-desktop {
        column-gap: 16px;
    }

    #fern-header .header-end {
        gap: 2px;
    }

}

/* ============================================================================
   Fern adapter: layout
   ----------------------------------------------------------------------------
   Canvas, scrolling, page frames, table of contents, footer layout, and
   scrollbars for Fern-rendered pages. Moved from fern/styles.css in batch 04
   (ledger CSS-002, CSS-003, CSS-023 through CSS-032, CSS-102 through
   CSS-107), plus the page-scoped layout rules batch 03 put in WelcomePage.css
   and ExamplesGallery.css. Fern scrolls .canvas-wrapper, not the document.
   Batch 05 removed CSS-031 (an active table-of-contents link selector that
   matched nothing locally, on the branch preview, or on production).

   Broad selectors kept on purpose, each with its measured reach (batch 04,
   artifacts/04/checks/selector-reach.json):
   - `html, main` paints the backdrop behind the canvas.
   - `body { overflow: hidden }` keeps the document from scrolling; the
     canvas, sidebar, and table of contents scroll themselves.
   - `li { position: relative }` reaches every list item, including Fern's
     sidebar and table of contents; their absolutely positioned markers
     depend on it.
   ============================================================================ */

/* CSS-002 */
html,
main {
    background-color: var(--ydc-color-backdrop) !important;
}

/* CSS-003 */
body {
    overflow: hidden;
}

/* Content canvas (CSS-023, CSS-024). The !important declarations override
   Fern's layered utility classes and inline sizing on the same element.
   Batch 05 removed a `height: 100%` that the `!important` height below
   always overrode. */
.canvas-wrapper {
    display: flex;
    width: 100%;
    overflow: auto;
    border-radius: var(--ydc-radius-canvas) var(--ydc-radius-canvas) var(--ydc-radius-canvas) var(--ydc-radius-canvas) !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin-right: 16px !important;
    margin-left: 16px !important;
    margin-bottom: 16px !important;
    height: calc(100vh - var(--header-height) - 16px) !important;
    border: var(--ydc-border-width) solid var(--ydc-color-canvas-border) !important;
    margin-top: 2px !important;
}

/* Below 64rem (CSS-024). Batch 05 removed a `margin-left: 12px` that never
   applied, because the base rule's `margin-left: 16px !important` outranks it. */
@media (width < 64rem) {

    .canvas-wrapper {
        height: calc(100vh - var(--header-height) - 14px) !important;
    }

}

/* CSS-025 */
.toc-mobile {
    right: calc(var(--spacing) * 4 + 12px) !important;
}

/* Page frames (CSS-026, CSS-027) */
.fern-layout-guide,
.fern-layout-overview,
.fern-layout-reference {
    width: 100% !important;
    border: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

@media (width < 48rem) {

    .fern-layout-reference {
        margin-right: 0px !important;
    }

}

/* CSS-028 */
.fern-layout-footer {
    margin: unset;
    padding: 48px 0px;
    margin-block: unset;
    align-items: center !important;
}

/* Table of contents (CSS-029, CSS-030) */
#fern-toc {
    position: sticky;
    height: calc(100vh - var(--header-height) - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    top: 0;
    width: var(--spacing-sidebar-width) !important;
    flex-shrink: 0;
}

:root [data-body-theme="canvas"] #fern-toc:has(> *) {
    margin-right: 12px;
}

/* Table-of-contents active line (CSS-032) */
ul.toc-root.not-prose::after {
    background-color: var(--ydc-color-text-accent);
}

/* ---- Scrollbars (CSS-102 through CSS-106) ----------------------------------- */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ydc-color-scrollbar-thumb);
    border-radius: var(--ydc-radius-scrollbar);
}

/* Firefox */
html {
    scrollbar-color: var(--ydc-color-scrollbar-thumb) transparent;
    scrollbar-width: thin;
}

/* Fern's scroll-area thumb otherwise follows colors.accent-primary. */
.fern-scroll-area-thumb {
    background-color: var(--ydc-color-scrollbar-thumb) !important;
}

/* CSS-107 */
li {
    position: relative;
}

/* ---- Page-scoped layout (moved from batch 03 pattern CSS) -------------------
   Scoped to the page markers in welcome.mdx and ExamplesGallery.tsx, so the
   rules apply only while that page is rendered. */

:root:has([data-docs-page="welcome"]) .w-content-width.max-w-full {
    width: 1000px !important;
}

:root:has([data-docs-page="welcome"]) .fern-layout-footer {
    margin: 48px 0px;
    width: 100%;
    max-width: 906px;
}

/* Hide the welcome table of contents. `display: none` changes the main
   column's height, so the aside collapses instead. Its width stays as #fern-toc
   sets it (an !important rule outranks this one); overflow hides it. */
:root:has([data-docs-page="welcome"]) aside#fern-toc {
    width: 0;
    overflow: hidden;
    border-right: 0px !important;
}

:root:has([data-docs-page="examples"]) aside#fern-toc,
:root:has([data-docs-page="examples"]) .fern-layout-footer,
:root:has([data-docs-page="examples"]) .builtwithfern {
    display: none !important;
}

:root:has([data-docs-page="examples"]) .w-content-width.max-w-full {
    width: 100% !important;
    max-width: 906px !important;
}

/* ============================================================================
   Fern adapter: header
   ----------------------------------------------------------------------------
   Announcement banner, header frame, top tabs, navbar actions, and the
   responsive compact-header steps for Fern-rendered header content. Moved
   from fern/styles.css in batch 04 (ledger CSS-016 through CSS-022,
   CSS-039 through CSS-045, CSS-061, CSS-078 through CSS-086, CSS-108, and
   CSS-109). CustomHeader's own wrapper geometry is in
   fern/components/CustomHeader.css.

   Baseline behavior kept (batch 01 findings, none approved for correction):
   the end controls overflow at 1024-1167px and 1192-1231px, the dismiss
   button overlaps the announcement text below 768px, and Dismiss, the active
   tab, Platform, and Discord show no visible focus indicator.

   Internal dependencies (Fern 5.205.2, checked by
   tests/ui/browser/fern/adapters.spec.ts):
   - Tabs: [data-theme="default"]#fern-header, [role="tablist"], and the
     Radix [data-radix-collection-item] / [data-state="active"] attributes.
   - Navbar links: `.group.cursor-pointer.fern-button.filled.normal`
     (Platform) and `.minimal.normal` (Discord). Fern exposes no stable class
     for an individual navbar link.
   ============================================================================ */

/* ---- Announcement (CSS-016 through CSS-020) ----------------------------------
   The !important declarations override Fern's inline and utility styling of
   the banner and its dismiss button. */

#fern-announcement {
    background-color: var(--ydc-color-announcement-bg);
}

#fern-announcement > div {
    min-height: unset !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    justify-content: center;
    position: relative;
    color: var(--ydc-color-announcement-fg);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

#fern-announcement a {
    color: var(--ydc-color-announcement-fg) !important;
    text-decoration: underline !important;
}

#fern-announcement button {
    position: absolute !important;
    right: 8px !important;
    top: 8px !important;
    width: 32px !important;
    height: 32px !important;
    background-color: var(--ydc-color-announcement-bg) !important;
    border-radius: var(--ydc-radius-control) !important;
    color: var(--ydc-color-announcement-fg) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}

#fern-announcement button svg {
    color: var(--ydc-color-announcement-fg) !important;
    stroke: var(--ydc-color-announcement-fg) !important;
}

/* ---- Header frame (CSS-021, CSS-022) ------------------------------------------ */

.fern-header-content {
    padding-right: 12px;
}

#fern-header {
    border-color: transparent !important;
}

/* ---- Top tabs (CSS-039 through CSS-045) ----------------------------------------
   Figma Topbar spec (API Docs Q2, node 6202-4840): 16px icons, SF Pro Medium
   14px/20px with 0 letter-spacing, 16px/9px padding, 10px radius, 8px gaps.
   Figma reports SF Pro Medium as weight 510 (its variable-font axis
   position); the header renders the system font stack, where Chromium rounds
   any weight above 500 up to 600 (Semibold), so 500 is the CSS translation. */
[data-theme="default"]#fern-header [role="tablist"] {
    gap: 8px;
    /* Fern ships the tab list with a negative inline margin, which makes it
       overflow its scroll wrapper and eat into the header grid's gaps. */
    margin-inline: 0;
    line-height: 20px;
}

[data-theme="default"]#fern-header [data-radix-collection-item] {
    padding: 8px 12px;
    gap: 8px;
    border-radius: var(--ydc-radius-tab);
    height: auto;
    font-size: 14px;
    font-weight: 500 !important;
    letter-spacing: 0;
    color: var(--ydc-color-tab-fg);
}

/* Fern wraps each tab icon in a span.fern-file-icon.size-5 (20px) box.
   The Figma spec is a fixed 16px icon box, so shrink the wrapper to match
   the 16px svg and center it; otherwise the icon floats in a 20px box and
   the 8px gap reads as 12px with the glyph sitting 2px high. */
[data-theme="default"]#fern-header [data-radix-collection-item] .fern-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    /* Fern ships this wrapper with margin-right: 8px; the tab's 8px flex gap
       owns the spacing per the Figma spec, so the margin would double it. */
    margin-right: 0;
}

[data-theme="default"]#fern-header [data-radix-collection-item] svg {
    width: 16px;
    height: 16px;
}

[data-theme="default"]#fern-header [data-radix-collection-item]:hover {
    background-color: var(--ydc-color-nav-item-hover-bg);
}
[data-theme="default"]#fern-header [data-radix-collection-item]:focus-visible {
    background-color: var(--ydc-color-nav-item-hover-bg);
}

[data-theme="default"]#fern-header [data-radix-collection-item]:after {
    display: none !important;
}

[data-theme="default"]#fern-header
    [data-radix-collection-item][data-state="active"] {
    color: var(--ydc-color-tab-fg-active);
    background-color: var(--ydc-color-tab-bg-active);
    font-weight: 500 !important;
}

/* ---- Search column children (CSS-061) ------------------------------------------ */

@media (width >= 64rem) {

    #fern-header .fern-header-search-wrap > * {
        flex: 1 1 auto;
        min-width: 0;
    }

    #fern-header .fern-header-search-bar {
        width: 100%;
        /* In production Fern renders the Ask AI button in the same flex row
           as the bar, so the bar yields the button's share of the column. */
        flex: 1 1 auto;
        min-width: 112px;
    }

}

/* ---- Navbar actions (CSS-078 through CSS-086) ----------------------------------
   Figma Topbar spec: 38px icon buttons with 16px icons, and a Platform button
   with a 14px label, 9px/16px padding, and 10px radius. 500, not Figma's raw
   510: the system font stack rounds 510 up to Semibold. */

/* Platform button */
.header-end .group.cursor-pointer.fern-button.filled.normal {
    background-color: var(--ydc-color-navbar-platform-bg);
    color: var(--ydc-color-navbar-platform-fg);
    font-size: 14px;
    font-weight: 500 !important;
    padding: 9px 16px;
    border-radius: var(--ydc-radius-tab);
    height: 38px;
}

/* Center the Platform chevron (CSS-079). Batch 05 removed CSS-083, which
   repeated these three declarations on the same selector. */
.header-end .group.cursor-pointer.fern-button.filled.normal .size-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* Discord button */
.header-end .group.cursor-pointer.fern-button.minimal.normal {
    background-color: transparent;
    border: transparent;
    color: var(--ydc-color-text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
    height: 38px;
    width: 38px;
}

.header-end .group.cursor-pointer.fern-button.minimal.normal:hover {
    background-color: var(--ydc-color-navbar-primary-bg-hover);
    color: var(--ydc-color-text-primary);
}
.header-end .group.cursor-pointer.fern-button.minimal.normal:focus-visible {
    background-color: var(--ydc-color-navbar-primary-bg-hover);
    color: var(--ydc-color-text-primary);
}

.header-end .group.cursor-pointer.fern-button.minimal.normal:active {
    background-color: var(--ydc-color-navbar-primary-bg-pressed);
    color: var(--ydc-color-text-primary);
}

/* Center the Discord icon (CSS-084). */
.header-end .group.cursor-pointer.fern-button.minimal.normal .size-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* Theme toggle margin fix (CSS-085) */
.header-end button {
    margin-left: 0px !important;
}

/* Center the Discord icon in the mobile menu's link row (CSS-086). */
.border-border-concealed
    .group.cursor-pointer.fern-button.minimal.normal
    .size-5 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Compact header, below 74.5rem (CSS-108) -----------------------------------
   Tighten the tab and right-side button padding so the search column keeps
   a usable width down to the 1024px floor. */
@media (width < 74.5rem) {

    .header-end .group.cursor-pointer.fern-button.filled.normal {
        padding: 9px 12px;
        height: 36px;
    }

    .header-end .group.cursor-pointer.fern-button.minimal.normal {
        width: 36px;
        height: 36px;
    }

    [data-theme="default"]#fern-header [role="tablist"] {
        gap: 6px;
    }

    [data-theme="default"]#fern-header [data-radix-collection-item] {
        padding: 9px 8px;
        gap: 6px;
    }

}

/* ---- Ultra-compact header, below 67.5rem (CSS-109) -----------------------------
   With the tabs pinned to the content window, the header runs out of room
   below 1080px. Slim the tabs and the right-side buttons so the search
   column keeps its 160px floor down to 1024px. */
@media (width < 67.5rem) {

    [data-theme="default"]#fern-header [role="tablist"] {
        gap: 4px;
    }

    [data-theme="default"]#fern-header [data-radix-collection-item] {
        padding: 8px 6px;
        gap: 5px;
    }

    .header-end .group.cursor-pointer.fern-button.filled.normal {
        padding: 9px 10px;
        height: 32px;
    }

    .header-end .group.cursor-pointer.fern-button.minimal.normal {
        width: 32px;
        height: 32px;
    }

}

/* ============================================================================
   Fern adapter: navigation
   ----------------------------------------------------------------------------
   Sidebar, mobile menu, and breadcrumb. Moved from fern/styles.css in batch 04
   (ledger CSS-036, CSS-046 through CSS-055), plus the page-scoped breadcrumb
   rules batch 03 put in WelcomePage.css and ExamplesGallery.css.

   The mobile menu renders in #fern-mobile-menu-portal, outside the page
   wrappers, so rules that must reach it name the portal.

   Internal dependencies (Fern 5.205.2, checked by
   tests/ui/browser/fern/adapters.spec.ts):
   - CSS-046 hides the sidebar's product-switcher label, which Fern renders
     with exactly these utility classes and no stable class.
   - CSS-054 matches collapsible section headers by `.!text-body.font-semibold`.
   - The deprecated Contents link rule matches Fern's `.line-through` title
     and `.fern-sidebar-link-inline-badge`.
   ============================================================================ */

/* Breadcrumb (CSS-036) */
.fern-breadcrumb-item {
    color: var(--ydc-color-text-accent);
    font-weight: var(--font-weight-medium) !important;
}

/* CSS-046 */
.text-\(color\:--grayscale-a11\).m-0.mb-3.text-sm.font-medium {
    display: none !important;
}

/* Hide the Changelog link icon (CSS-047). */
a[href="/docs/changelog"] svg.lucide-history {
  display: none;
}

/* Sidebar tab switcher icons (CSS-048): the 24px icon box centers the 20px
   .fern-file-icon wrapper, but Fern renders the svg at 16px and the wrapper
   is block, so the glyph floats top-left of the box. Center it like the
   header tabs. The desktop sidebar uses #fern-sidebar-scroll-area; the mobile
   menu renders tabs inside #fern-mobile-menu-portal. */
#fern-sidebar-scroll-area .fern-file-icon,
#fern-mobile-menu-portal .fern-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS-049 */
#fern-sidebar {
    border-right-width: 0 !important;
}

/* Sidebar links (CSS-050 through CSS-052) */
.fern-sidebar-link {
    color: var(--ydc-color-text-secondary);
}

.fern-sidebar-link[data-state="active"] {
    /* Highlighted page: the rounded rectangle behind the link. */
    background-color: var(--ydc-color-nav-item-active-bg);
    color: var(--ydc-color-text-primary);
}

@media (hover: hover) {
    .fern-sidebar-link:hover {
        background-color: var(--ydc-color-nav-item-hover-bg);
        color: var(--ydc-color-text-primary);
    }

    .fern-sidebar-link:hover[data-state="active"] {
        background-color: var(--ydc-color-nav-item-active-bg);
        color: var(--ydc-color-text-primary);
    }
}

/* CSS-053 */
.fern-sidebar-heading.fern-sidebar-level-0 {
    margin-bottom: 0px !important;
}

/* Collapsible section headers, rendered as buttons (CSS-054) */
.fern-sidebar-link.fern-sidebar-level-1.\!text-body.font-semibold {
    font-size: var(--text-xs) !important;
    line-height: var(--line-height-xs) !important;
    color: var(--ydc-color-text-primary);
}

/* Section headers (CSS-055) */
.fern-sidebar-heading-content {
    font-size: var(--text-xs) !important;
    line-height: var(--line-height-xs) !important;
    color: var(--ydc-color-text-primary);
}

/* ---- Page-scoped breadcrumb (moved from batch 03 pattern CSS) ----------------- */

:root:has([data-docs-page="welcome"]) .fern-breadcrumb-item {
    display: none;
}

:root:has([data-docs-page="examples"]) .fern-breadcrumb-item {
    display: none !important;
}

/* Deprecated Contents API link. The Contents API is deprecated (`deprecated:
   true` in fern/apis/contents/openapi_contents_overrides.yaml). Keep the
   Deprecated badge in the page header, but drop Fern's strikethrough and
   inline badge on this one sidebar link. Other availability badges (for
   example, Images Beta) stay. Added on main after batch 05 and moved here from
   fern/styles.css in the merge. */
a.fern-sidebar-link[href$="/api-reference/contents"] .fern-sidebar-link-title-inner .line-through {
    text-decoration: none;
    opacity: 1;
}

a.fern-sidebar-link[href$="/api-reference/contents"] .fern-sidebar-link-inline-badge {
    display: none;
}

/* ============================================================================
   Fern adapter: search
   ----------------------------------------------------------------------------
   The search field and the Ask AI button beside it. Moved from fern/styles.css
   in batch 04 (ledger CSS-056, CSS-057, CSS-062 through CSS-065). Kept apart
   from header.css because the same controls render in the desktop and mobile
   headers and Ask AI appears only on the production domain.

   Baseline behavior kept (batch 01 findings): the search field has no
   visible focus ring (`outline: none` with a 10% halo), and closing search
   returns focus to <body>. Ask AI geometry with the button present is the
   batch 01 production exception; this file was not checked against it.
   ============================================================================ */

/* CSS-056 (nested rules preserved) */
#fern-search-button {

    background-color: var(--ydc-color-search-bg);
    box-shadow: var(--ydc-shadow-control);
    border: var(--ydc-border-width) solid var(--ydc-color-border);
    border-radius: var(--ydc-radius-search);
    padding: 8px 12px;
    font-size: 14px;
    color: var(--ydc-color-text-tertiary);
    outline: none;
    transition: border-color 0.2s ease;

    svg {
        stroke: var(--ydc-color-text-primary);
    }

    .fern-kbd {
        color: var(--ydc-color-text-primary);
    }

    &:focus {
        /* The outline color stays the same when the field is focused. */
        border-color: var(--ydc-color-border);
        box-shadow: 0 0 0 2px var(--ydc-color-search-focus-halo);
    }

    &::placeholder {
        color: var(--ydc-color-text-primary);
        opacity: 0.6;
    }

}

/* Remove the search button wrapper's top margin (CSS-057). Internal
   dependency: the wrapper has no class, so :has() finds it. */
div:has(#fern-search-button) {
    margin-top: 0px;
}

/* Ask AI button (CSS-062 through CSS-064) */
#fern-ask-ai-button {
    border-radius: var(--ydc-radius-search);
    color: var(--ydc-color-text-accent);
    background-color: var(--ydc-color-ask-ai-bg);
}

#fern-ask-ai-button:hover {
    background-color: var(--ydc-color-ask-ai-bg-hover);
    color: var(--ydc-color-text-accent);
}
#fern-ask-ai-button:focus-visible {
    background-color: var(--ydc-color-ask-ai-bg-hover);
    color: var(--ydc-color-text-accent);
}

#fern-ask-ai-button:active {
    background-color: var(--ydc-color-ask-ai-bg-hover);
    color: var(--ydc-color-text-accent);
}

/* Fern renders #fern-ask-ai-button next to the search bar in production
   only; the AI search backend attaches to hosted builds, not `fern dev`.
   Below 85rem it drops to icon-only so the bar keeps most of its column. The
   mobile header (<1024px) renders the same button, so it is icon-only there
   too (CSS-065). */
@media (width < 85rem) {

    #fern-ask-ai-button .fern-button-text {
        display: none;
    }

}

/* ============================================================================
   Fern adapter: content
   ----------------------------------------------------------------------------
   Headings, prose links, inline code, segmented controls, callouts, badges,
   cards, and code blocks in Fern-rendered page content. Moved from
   fern/styles.css in batch 04 (ledger CSS-013, CSS-033 through CSS-035,
   CSS-037, CSS-038, CSS-066 through CSS-076, CSS-087 through CSS-093,
   CSS-095 through CSS-101), plus the page-scoped heading, page-header,
   divider, and page-action rules batch 03 put in WelcomePage.css and
   ExamplesGallery.css.

   Links: only `.fern-mdx-link` (Markdown links) is recolored. Navigation
   links, card links, and DocsButton actions keep their own styling; there is
   no broad anchor rule.

   Batch 05 removed two rules that matched nothing in Fern 5.205.2 locally,
   on the branch preview, or on production: CSS-033's page-title selector
   (`.fern-page-heading.text-balance.break-words`, so page titles keep Fern's
   weight 800) and CSS-096's styled-jsx card description selector.
   ============================================================================ */

/* Border for API reference error codes and page feedback buttons (CSS-013) */
.border-border-default {
    border-color: var(--ydc-color-border);
}

/* ---- Headings (CSS-034, CSS-035) ------------------------------------------------
   Lumen Sans 500 for prose h2 and h3. The !important declarations override
   Fern's typography plugin. */
.prose :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
    font-family: var(--ydc-font-heading) !important;
    font-weight: 500 !important;
}

.prose :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
    font-family: var(--ydc-font-heading) !important;
    font-weight: 500 !important;
}

/* Markdown links (CSS-037) */
.fern-mdx-link {
    color: var(--ydc-color-text-accent);
}

/* Inline code in paragraphs (CSS-038) */
p code {
    color: var(--ydc-color-text-accent);
}

/* ---- Segmented control (CSS-066) ------------------------------------------------ */

.fern-segmented-control button[data-state="on"] {
    background-color: var(--ydc-color-segmented-on-bg);
    color: var(--ydc-color-text-primary);
}

/* ---- Callouts (CSS-067 through CSS-076) ----------------------------------------- */

.fern-callout {
    background-color: var(--ydc-color-callout-bg);
    color: var(--ydc-color-text-primary);
    border-color: var(--ydc-color-border);
}

.fern-callout .fern-mdx-link svg {
    color: var(--ydc-color-text-primary);
}

.fern-callout[data-intent="info"] svg:first-child {
    color: var(--ydc-color-text-secondary);
}

.fern-callout[data-intent="warning"] svg:first-child {
    color: var(--ydc-color-callout-icon-warning);
}

.fern-callout[data-intent="success"] svg:first-child {
    color: var(--ydc-color-callout-icon-success);
}

.fern-callout[data-intent="error"] svg:first-child {
    color: var(--ydc-color-callout-icon-error);
}

.fern-callout[data-intent="note"] svg:first-child {
    color: var(--ydc-color-text-secondary);
}

.fern-callout[data-intent="launch"] svg:first-child {
    color: var(--ydc-color-callout-icon-launch);
}

.fern-callout[data-intent="tip"] svg:first-child {
    color: var(--ydc-color-callout-icon-tip);
}

.fern-callout[data-intent="check"] svg:first-child {
    color: var(--ydc-color-callout-icon-check);
}

/* Batch and Stream segmented control in the API reference (CSS-087) */
.fern-segmented-control {
    background-color: var(--ydc-color-tabgroup-bg);
}

/* ---- Badges (CSS-088 through CSS-093) ------------------------------------------- */

.fern-docs-badge.blue.subtle {
    background-color: var(--ydc-color-badge-accent-bg);
    color: var(--ydc-color-badge-accent-fg);
}

.fern-docs-badge.green.subtle {
    background-color: var(--ydc-color-badge-green-bg);
    color: var(--ydc-color-badge-green-fg);
}

.fern-docs-badge.amber.subtle {
    background-color: var(--ydc-color-badge-amber-bg);
    color: var(--ydc-color-badge-amber-fg);
}

.fern-docs-badge.red.subtle {
    background-color: var(--ydc-color-badge-red-bg);
    color: var(--ydc-color-badge-red-fg);
}

.fern-docs-badge.accent.subtle {
    background-color: var(--ydc-color-badge-accent-bg);
    color: var(--ydc-color-badge-accent-fg);
}

.fern-docs-badge.grayscale.subtle {
    background-color: var(--ydc-color-badge-grayscale-bg);
    color: var(--ydc-color-badge-grayscale-fg);
}

/* ---- Cards (CSS-095 through CSS-099) -------------------------------------------- */

.card-icon {
    width: 24px !important;
    height: 24px !important;
    color: var(--ydc-color-text-primary) !important;
    margin-bottom: 16px;
}

.fern-card {
    box-shadow: var(--ydc-shadow-card);
    border-color: var(--ydc-color-border);
}

.fern-card:hover {
    border-color: var(--ydc-color-card-border-hover);
    box-shadow: var(--ydc-shadow-card-hover);
}
.fern-card:focus-visible {
    border-color: var(--ydc-color-card-border-hover);
    box-shadow: var(--ydc-shadow-card-hover);
}

/* Accordions keep the resting card treatment on hover. */
.fern-card.fern-accordion:hover {
    box-shadow: var(--ydc-shadow-card);
    border-color: var(--ydc-color-border);
}
.fern-card.fern-accordion:focus-visible {
    box-shadow: var(--ydc-shadow-card);
    border-color: var(--ydc-color-border);
}

/* ---- Code blocks (CSS-100, CSS-101) --------------------------------------------- */

.border-card-border {
    box-shadow: var(--ydc-shadow-card);
}

/* Smaller code text for long example payloads (MDX-03, one consumer: the
   Knowledge guide). Wrap the fence in <div className="code-compact">. */
.code-compact pre,
.code-compact pre * {
    font-size: 12px !important;
    line-height: 1.6 !important;
}

/* ---- Page-scoped page header (moved from batch 03 pattern CSS) ----------------- */

:root:has([data-docs-page="welcome"]) .fern-page-heading {
    font-size: 32px;
    line-height: 40px;
    font-weight: 400 !important;
    color: var(--ydc-color-text-subheading);
}

:root:has([data-docs-page="welcome"]) header.my-8 {
    position: relative;
    margin-top: 56px !important;
    margin-bottom: 24px !important;
    z-index: 1;
}

@media (min-width: 640px) {

    :root:has([data-docs-page="welcome"]) .fern-page-heading {
        font-size: 36px;
        line-height: 44px;
    }
    :root:has([data-docs-page="welcome"]) header.my-8 {
        margin-top: 64px !important;
    }

}

/* 767px, not 768px: the heading steps up one pixel before the layout does. */
@media (min-width: 767px) {

    :root:has([data-docs-page="welcome"]) .fern-page-heading {
        font-size: 44px;
        line-height: 54px;
    }

}

@media (min-width: 1024px) {

    :root:has([data-docs-page="welcome"]) .fern-page-heading {
        font-size: 48px;
        line-height: 56px;
        overflow-wrap: normal;
        text-wrap: pretty;
        max-width: 604px;
    }
    :root:has([data-docs-page="welcome"]) header.my-8 {
        margin-top: 80px !important;
    }

}

/* Hide the divider under the welcome page header. */
:root:has([data-docs-page="welcome"]) .bg-border-default.shrink-0.h-px.w-full {
    display: none !important;
}

/* Hide the welcome "Copy page" actions. */
:root:has([data-docs-page="welcome"]) .fern-page-actions {
    display: none;
}

/* The Examples page renders its own title and hides Fern's page header. */
:root:has([data-docs-page="examples"]) .fern-page-heading,
:root:has([data-docs-page="examples"]) .fern-page-actions,
:root:has([data-docs-page="examples"]) header.my-8 {
    display: none !important;
}

/* ============================================================================
   Fern adapter: API reference
   ----------------------------------------------------------------------------
   Reference layouts, separators, property panels, snippet placement, and
   reference-specific decorations. Moved from fern/styles.css in batch 04
   (ledger CSS-011, CSS-012, CSS-014, CSS-015, CSS-094). No API schema or
   generated example changed.

   Internal dependencies (Fern 5.205.2, checked by
   tests/ui/browser/fern/adapters.spec.ts):
   - CSS-014 is positional: `div.group.relative:last-child` matches the last
     server-sent-event row in a response box and any other last-child
     `div.group.relative` on the site. batch 04 measured its reach
     (artifacts/04/checks/selector-reach.json) and kept it unchanged.
   - CSS-094 depends on the generated anchor id `request.body.extraction`
     and `.fern-api-property-meta`. Neither is a stable Fern extension point.
   ============================================================================ */

/* Separator lines (CSS-011) */
.bg-border-default {
    background-color: var(--ydc-color-divider);
}

/* "Show N properties" buttons in requests and responses (CSS-012) */
.fern-collapsible-card {
    border-color: var(--ydc-color-border);
}

/* Round the last server-sent-event row so it does not crop the box border
   (CSS-014). */
div.group.relative:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Keep the request and response snippets 24px from the top (CSS-015). */
@media (width >=48rem) {

    [data-theme="default"]
        .fern-layout-reference-content[data-kind="api"]
        .fern-layout-reference-aside {
        top: 24px;
    }

}

/* "New" pill beside the `extraction` request property on POST /v1/search
   (CSS-094). Fern's x-fern-availability extension only accepts alpha, beta,
   preview, generally-available, deprecated, and legacy, so there is no
   supported way to label a request property "New". This injects one after
   the type and Optional chips with the accent badge tokens. If the pill
   disappears after a Fern upgrade, check that #request.body.extraction and
   .fern-api-property-meta still exist. Delete this block once `extraction`
   is no longer new. */
[id="request.body.extraction"] .fern-api-property-meta::after {
    content: "New";
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: var(--ydc-radius-badge-inline);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background-color: var(--ydc-color-badge-accent-bg);
    color: var(--ydc-color-badge-accent-fg);
}
