/*fern-site-stylesheet*/:root {
  --header-height: 64px;
  --header-height-real: 64px;
  --mobile-header-height-real: 64px;
  --content-width: 640px;
  --sidebar-width: 288px;
  --page-width: 100vw;
  --logo-height: 22px;
  --font-body: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-heading: 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: #f6f6f6;
  --accent-2: #f2f2f2;
  --accent-3: #e9e9e9;
  --accent-4: #e0e0e0;
  --accent-5: #d9d9d9;
  --accent-6: #d1d1d1;
  --accent-7: #c5c5c5;
  --accent-8: #b2b2b2;
  --accent-9: #1a1a1a;
  --accent-10: #313131;
  --accent-11: #5c5c5c;
  --accent-12: #1f1f1f;

  --accent-a1: #2f619305;
  --accent-a2: #18334e09;
  --accent-a3: #0a172412;
  --accent-a4: #040d161b;
  --accent-a5: #03091022;
  --accent-a6: #02070c2a;
  --accent-a7: #05080b37;
  --accent-a8: #0205074a;
  --accent-a9: #010101e5;
  --accent-a10: #010101ce;
  --accent-a11: #020203a2;
  --accent-a12: #010101e0;

  --accent-contrast: #fff;
  --accent-surface: #f0f0f0cc;
  --accent-indicator: #1a1a1a;
  --accent-track: #1a1a1a;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --accent-1: oklch(97.3% 0 none);
      --accent-2: oklch(96% 0 none);
      --accent-3: oklch(93.3% 0 none);
      --accent-4: oklch(90.8% 0 none);
      --accent-5: oklch(88.5% 0 none);
      --accent-6: oklch(85.9% 0 none);
      --accent-7: oklch(82.4% 0 none);
      --accent-8: oklch(76.4% 0 none);
      --accent-9: oklch(21.8% 0 none);
      --accent-10: oklch(31.2% 0 none);
      --accent-11: oklch(47.4% 0 none);
      --accent-12: oklch(24% 0 none);

      --accent-a1: color(display-p3 0 0.2431 0.4863 / 0.016);
      --accent-a2: color(display-p3 0 0.1216 0.2392 / 0.032);
      --accent-a3: color(display-p3 0.0039 0.0549 0.1098 / 0.068);
      --accent-a4: color(display-p3 0 0.0353 0.0706 / 0.104);
      --accent-a5: color(display-p3 0 0.0275 0.0549 / 0.132);
      --accent-a6: color(display-p3 0 0.0235 0.0431 / 0.164);
      --accent-a7: color(display-p3 0 0.0157 0.0314 / 0.212);
      --accent-a8: color(display-p3 0 0.0118 0.0196 / 0.288);
      --accent-a9: color(display-p3 0 0 0 / 0.896);
      --accent-a10: color(display-p3 0 0 0 / 0.804);
      --accent-a11: color(display-p3 0 0 0.0078 / 0.632);
      --accent-a12: color(display-p3 0 0 0 / 0.876);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.9412 0.9412 0.9412 / 0.8);
      --accent-indicator: oklch(21.8% 0 none);
      --accent-track: oklch(21.8% 0 none);
    }
  }
}


.light, :root {
  --grayscale-1: #fdfdfc;
  --grayscale-2: #f9f9f8;
  --grayscale-3: #f1f0ef;
  --grayscale-4: #e9e8e6;
  --grayscale-5: #e2e1de;
  --grayscale-6: #dad9d6;
  --grayscale-7: #cfceca;
  --grayscale-8: #bcbbb5;
  --grayscale-9: #8d8d86;
  --grayscale-10: #82827c;
  --grayscale-11: #63635e;
  --grayscale-12: #21201c;

  --grayscale-a1: #55550003;
  --grayscale-a2: #25250007;
  --grayscale-a3: #20100010;
  --grayscale-a4: #1f150019;
  --grayscale-a5: #1f180021;
  --grayscale-a6: #19130029;
  --grayscale-a7: #19140035;
  --grayscale-a8: #1915014a;
  --grayscale-a9: #0f0f0079;
  --grayscale-a10: #0c0c0083;
  --grayscale-a11: #080800a1;
  --grayscale-a12: #060500e3;

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

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --grayscale-1: color(display-p3 0.992 0.992 0.989);
      --grayscale-2: color(display-p3 0.977 0.977 0.973);
      --grayscale-3: color(display-p3 0.943 0.942 0.936);
      --grayscale-4: color(display-p3 0.913 0.912 0.903);
      --grayscale-5: color(display-p3 0.885 0.883 0.873);
      --grayscale-6: color(display-p3 0.854 0.852 0.839);
      --grayscale-7: color(display-p3 0.813 0.81 0.794);
      --grayscale-8: color(display-p3 0.738 0.734 0.713);
      --grayscale-9: color(display-p3 0.553 0.553 0.528);
      --grayscale-10: color(display-p3 0.511 0.511 0.488);
      --grayscale-11: color(display-p3 0.388 0.388 0.37);
      --grayscale-12: color(display-p3 0.129 0.126 0.111);

      --grayscale-a1: #55550003;
      --grayscale-a2: #25250007;
      --grayscale-a3: #20100010;
      --grayscale-a4: #1f150019;
      --grayscale-a5: #1f180021;
      --grayscale-a6: #19130029;
      --grayscale-a7: #19140035;
      --grayscale-a8: #1915014a;
      --grayscale-a9: #0f0f0079;
      --grayscale-a10: #0c0c0083;
      --grayscale-a11: #080800a1;
      --grayscale-a12: #060500e3;

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


.dark {
  --accent-1: #0e0e0e;
  --accent-2: #191818;
  --accent-3: #222;
  --accent-4: #292929;
  --accent-5: #313130;
  --accent-6: #3b3a39;
  --accent-7: #494847;
  --accent-8: #615f5c;
  --accent-9: #f5f3f0;
  --accent-10: #eceae7;
  --accent-11: #b5b4b2;
  --accent-12: #f0eeeb;

  --accent-a1: #000e8d02;
  --accent-a2: #e4e3f70c;
  --accent-a3: #e2ecf617;
  --accent-a4: #ecf4fc1e;
  --accent-a5: #f4f9f826;
  --accent-a6: #fefdfc2f;
  --accent-a7: #fefcfc3e;
  --accent-a8: #fdf9f158;
  --accent-a9: #fefcf9f5;
  --accent-a10: #fffdfaeb;
  --accent-a11: #fefefbb1;
  --accent-a12: #fefcf9f0;

  --accent-contrast: #2c1f09;
  --accent-surface: #23222380;
  --accent-indicator: #f5f3f0;
  --accent-track: #f5f3f0;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --accent-1: oklch(16.5% 0.0004 78.3);
      --accent-2: oklch(21.1% 0.0002 78.3);
      --accent-3: oklch(25.3% 0.0004 78.3);
      --accent-4: oklch(28.3% 0 78.3);
      --accent-5: oklch(31.3% 0.0012 78.3);
      --accent-6: oklch(34.9% 0.0024 78.3);
      --accent-7: oklch(40.2% 0.0024 78.3);
      --accent-8: oklch(48.8% 0.0057 78.3);
      --accent-9: oklch(96.5% 0.0045 78.3);
      --accent-10: oklch(93.7% 0.0045 78.3);
      --accent-11: oklch(77% 0.0029 78.3);
      --accent-12: oklch(94.9% 0.0045 78.3);

      --accent-a1: color(display-p3 0 0.0588 0.8353 / 0.005);
      --accent-a2: color(display-p3 0.9137 0.9098 0.9922 / 0.046);
      --accent-a3: color(display-p3 0.9176 0.9569 1 / 0.087);
      --accent-a4: color(display-p3 0.9412 0.9686 1 / 0.116);
      --accent-a5: color(display-p3 0.9725 0.9961 0.9922 / 0.146);
      --accent-a6: color(display-p3 1 0.9961 0.9882 / 0.184);
      --accent-a7: color(display-p3 1 0.9961 0.9922 / 0.242);
      --accent-a8: color(display-p3 1 0.9843 0.9569 / 0.342);
      --accent-a9: color(display-p3 0.9961 0.9882 0.9765 / 0.959);
      --accent-a10: color(display-p3 1 0.9922 0.9804 / 0.921);
      --accent-a11: color(display-p3 1 0.9961 0.9882 / 0.692);
      --accent-a12: color(display-p3 1 0.9922 0.9765 / 0.938);

      --accent-contrast: #2c1f09;
      --accent-surface: color(display-p3 0.1255 0.1333 0.1333 / 0.5);
      --accent-indicator: oklch(96.5% 0.0045 78.3);
      --accent-track: oklch(96.5% 0.0045 78.3);
    }
  }
}


.dark {
  --grayscale-1: #111110;
  --grayscale-2: #191918;
  --grayscale-3: #222221;
  --grayscale-4: #2a2a28;
  --grayscale-5: #31312e;
  --grayscale-6: #3b3a37;
  --grayscale-7: #494844;
  --grayscale-8: #62605b;
  --grayscale-9: #6f6d66;
  --grayscale-10: #7c7b74;
  --grayscale-11: #b5b3ad;
  --grayscale-12: #eeeeec;

  --grayscale-a1: #00000000;
  --grayscale-a2: #f4f4f309;
  --grayscale-a3: #f6f6f513;
  --grayscale-a4: #fefef31b;
  --grayscale-a5: #fbfbeb23;
  --grayscale-a6: #fffaed2d;
  --grayscale-a7: #fffbed3c;
  --grayscale-a8: #fff9eb57;
  --grayscale-a9: #fffae965;
  --grayscale-a10: #fffdee73;
  --grayscale-a11: #fffcf4b0;
  --grayscale-a12: #fffffded;

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

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --grayscale-1: color(display-p3 0.067 0.067 0.063);
      --grayscale-2: color(display-p3 0.098 0.098 0.094);
      --grayscale-3: color(display-p3 0.135 0.135 0.129);
      --grayscale-4: color(display-p3 0.164 0.163 0.156);
      --grayscale-5: color(display-p3 0.193 0.192 0.183);
      --grayscale-6: color(display-p3 0.23 0.229 0.217);
      --grayscale-7: color(display-p3 0.285 0.282 0.267);
      --grayscale-8: color(display-p3 0.384 0.378 0.357);
      --grayscale-9: color(display-p3 0.434 0.428 0.403);
      --grayscale-10: color(display-p3 0.487 0.481 0.456);
      --grayscale-11: color(display-p3 0.707 0.703 0.68);
      --grayscale-12: color(display-p3 0.933 0.933 0.926);

      --grayscale-a1: #00000000;
      --grayscale-a2: #f4f4f309;
      --grayscale-a3: #f6f6f513;
      --grayscale-a4: #fefef31b;
      --grayscale-a5: #fbfbeb23;
      --grayscale-a6: #fffaed2d;
      --grayscale-a7: #fffbed3c;
      --grayscale-a8: #fff9eb57;
      --grayscale-a9: #fffae965;
      --grayscale-a10: #fffdee73;
      --grayscale-a11: #fffcf4b0;
      --grayscale-a12: #fffffded;

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

.light, :root {
  color-scheme: light;
  --accent: rgba(26, 26, 26, 1);
  --background: rgba(250, 249, 248, 1);
  --border: rgba(229, 226, 220, 1);
  --sidebar-background: rgba(250, 249, 248, 1);
  --header-background: rgba(250, 249, 248, 1);
  --card-background: initial;
  --theme-color: #faf9f8;
}

.dark {
  color-scheme: dark;
  --accent: rgba(245, 243, 240, 1);
  --background: rgba(15, 14, 13, 1);
  --border: rgba(42, 40, 38, 1);
  --sidebar-background: rgba(15, 14, 13, 1);
  --header-background: rgba(15, 14, 13, 1);
  --card-background: initial;
  --theme-color: #0f0e0d;
}

/*
 * Pivotal docs — custom CSS layered on top of Fern's theme.
 *
 * Variables follow Fern's documented surface:
 *   --background, --card-background, --border
 *   --sidebar-background, --header-background
 *   --accent, --accent-1..12, --grayscale-1..12
 *   .dark prefix for dark-mode overrides
 *
 * Goal: match the Pivotal app's modular look — sharp 0-radius geometry,
 * 1px hairlines instead of soft fills, GT America for display/body,
 * IBM Plex Mono caps for eyebrow labels.
 */

/* ---------- GT America ---------- */

@font-face {
  font-family: "GT America";
  src: url("assets/fonts/GT-America-Standard-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT America";
  src: url("assets/fonts/GT-America-Standard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT America";
  src: url("assets/fonts/GT-America-Standard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- JetBrains Mono (Google Fonts) ---------- */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ---------- Type stack ---------- */

:root {
  --fern-font-family-body: "GT America", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fern-font-family-headings: "GT America", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fern-font-family-code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Surface palette ---------- */

/* Tokens map 1:1 to docs.yml `colors.*`. Light mode is the Pivotal app's
 * cream (#FAF9F8); dark mode is its near-black (#0F0E0D). Pivotal's UI
 * differentiates surfaces with hairlines, not fills, so the primary
 * `--background` and secondary `--card-background` stay close — the
 * border tokens (#E5E2DC / #2A2826) carry the visual separation. */
:root {
  --background: #FAF9F8;
  --card-background: #FAF9F8;
  --sidebar-background: #FAF9F8;
  --header-background: #FAF9F8;
  --code-block-background: #F0EEE8;
  --border-default: #E5E2DC;
  --text-body: #1A1A1A;
  --text-muted: #6B6864;
  --grayscale-1: #FAF9F8;
  --grayscale-2: #F0EEE8;
}

.dark {
  --background: #0F0E0D;
  --card-background: #0F0E0D;
  --sidebar-background: #0F0E0D;
  --header-background: #0F0E0D;
  --code-block-background: #1A1916;
  --border-default: #2A2826;
  --text-body: #F5F3F0;
  --text-muted: #999692;
  --grayscale-1: #0F0E0D;
  --grayscale-2: #1A1916;
}

/* ---------- Square geometry ---------- */

/*
 * Pivotal's UI is built on 0-radius rectangles — cards, pills, buttons,
 * inputs, code blocks. Flatten Fern's radii at the variable layer and
 * lay a `border-radius: 0 !important` safety net across the elements
 * Fern is known to round.
 */
:root,
.dark {
  --fern-radius: 0;
  --fern-radius-sm: 0;
  --fern-radius-md: 0;
  --fern-radius-lg: 0;
  --fern-radius-xl: 0;
  --fern-radius-card: 0;
  --fern-radius-button: 0;
  --fern-radius-input: 0;
  --fern-radius-pill: 0;
  --radius-1: 0;
  --radius-2: 0;
  --radius-3: 0;
  --radius-4: 0;
  --radius-5: 0;
  --radius-6: 0;
}

.fern-card,
.fern-card *,
button,
input,
textarea,
select,
code,
pre,
kbd,
img,
table,
th,
td,
.fern-callout,
[data-callout],
[role="tab"],
[role="tablist"],
[class*="rounded"],
[class*="Card"],
[class*="Button"],
[class*="Pill"],
[class*="Tag"],
[class*="Badge"],
[class*="Chip"] {
  border-radius: 0 !important;
}

/* ---------- Headings ---------- */

/* H1 — GT America heaviest weight (500) with tight negative tracking.
 * Sized to match the in-app heading scale (Settings, Workbench), one
 * notch larger than the previous round so titles read as titles. */
h1 {
  font-family: var(--fern-font-family-headings);
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--text-body);
}

h2 {
  font-family: var(--fern-font-family-headings);
  font-weight: 500;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-body);
}

h3 {
  font-family: var(--fern-font-family-headings);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.014em;
  color: var(--text-body);
}

h4 {
  font-family: var(--fern-font-family-headings);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text-body);
}

/* ---------- Body ---------- */

body, .fern-content, .fern-mdx {
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.6;
}

/* Links: body color with underline on hover. No accent fill. */
a:not(.fern-card):not(.fern-sidebar-link):not([role="tab"]):not(.fern-button) {
  color: var(--text-body);
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms ease;
}

a:not(.fern-card):not(.fern-sidebar-link):not([role="tab"]):not(.fern-button):hover {
  text-decoration-color: var(--text-body);
}
a:not(.fern-card):not(.fern-sidebar-link):not([role="tab"]):not(.fern-button):focus-visible {
  text-decoration-color: var(--text-body);
}

/* ---------- Modular eyebrows + section dividers ---------- */

/* The Pivotal app uses IBM Plex Mono caps for label-style text
 * ("STEP 1", "FINISH SETUP", "CUSTOMER SUCCESS"). Hook the same
 * treatment onto table headers, kbd, and inline mono blocks that
 * land in label-shaped slots. */
th,
kbd {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Tighten section dividers to a single hairline rule — matches the
 * faint horizontal lines that separate cells on the Pivotal dashboard. */
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---------- Cards: flat + hairline ---------- */

/* The Pivotal app uses 1px hairlines as the dominant card affordance,
 * with a near-invisible shadow only on hover. Strip Fern's soft fill and
 * any default ornament. */
.fern-card {
  background: var(--card-background);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fern-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--border), 0 6px 14px rgba(15, 15, 20, 0.04);
}
.fern-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--border), 0 6px 14px rgba(15, 15, 20, 0.04);
}

.dark .fern-card:hover {
  box-shadow: 0 1px 0 var(--border), 0 6px 14px rgba(0, 0, 0, 0.3);
}
.dark .fern-card:focus-visible {
  box-shadow: 0 1px 0 var(--border), 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* ---------- Inline code ---------- */

code {
  font-feature-settings: "ss01", "ss02";
  font-size: 0.92em;
  border: 1px solid var(--border);
  padding: 0.05em 0.35em;
  background: var(--card-background);
}

/* ---------- Callouts ---------- */

[data-callout] {
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--card-background);
}

[data-callout="warning"] {
  border-left: 3px solid var(--accent);
}

[data-callout="note"],
[data-callout="info"] {
  border-left: 3px solid var(--accent);
}

/* ---------- Tables ---------- */

/* MDX content tables. Scoped to content surfaces only — code blocks
 * use internal <table> markup for line-numbered syntax highlighting
 * (Shiki / Prism), and the unscoped rule was painting borders around
 * every code line, giving a table-in-table appearance. */
.fern-content table,
.fern-mdx table,
.prose table {
  border-collapse: collapse;
  border: 1px solid var(--border-default);
  width: 100%;
}

.fern-content table td,
.fern-content table th,
.fern-mdx table td,
.fern-mdx table th,
.prose table td,
.prose table th {
  border: 1px solid var(--border-default);
  padding: 0.6rem 0.85rem;
}

.fern-content table th,
.fern-mdx table th,
.prose table th {
  background: var(--code-block-background);
  text-align: left;
}

/* Defensive: nuke any borders inside code blocks regardless of what
 * Fern's syntax highlighter does internally. */
pre table, pre td, pre th,
[class*="code-block"] table, [class*="code-block"] td, [class*="code-block"] th,
[class*="CodeBlock"] table, [class*="CodeBlock"] td, [class*="CodeBlock"] th,
.fern-runnable-endpoint table, .fern-runnable-endpoint td, .fern-runnable-endpoint th {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* ---------- Active states ---------- */

/* Sidebar active item gets the heavy black-on-bg pill — that's the
 * primary nav indicator and reads correctly in context. Tab strips
 * (header, code blocks, MDX) get a lime underline instead, defined
 * further down. */
.fern-sidebar-link[data-state="active"] {
  background: var(--accent);
  color: var(--background);
  border-radius: 0 !important;
}

/* The sidebar item's leading icon is a Font Awesome SVG that defaults
 * to the link's text color — but Fern paints it via a child class with
 * its own color, so it stays dark on the dark active background and
 * vanishes. Force the icon (and any nested path/fill) to match the
 * inverted text color when the link is active. */
.fern-sidebar-link[data-state="active"] svg,
.fern-sidebar-link[data-state="active"] svg * ,
.fern-sidebar-link[data-state="active"] [class*="icon"],
.fern-sidebar-link[data-state="active"] [class*="Icon"] {
  color: var(--background) !important;
  fill: var(--background) !important;
}

/* ---------- Tab strips ---------- */

/* Code-block language pickers (curl / Node / Python) and any Radix
 * tab list in MDX content get a transparent fill + lime underline.
 * Lime is Pivotal's brand secondary accent and reads as a state
 * indicator rather than a heavy button. */
.fern-header-tabs [role="tab"],
.fern-header-tabs [data-state="active"] {
  border-radius: 6px !important;
}

[role="tab"][aria-selected="true"],
[role="tab"][data-state="active"] {
  background: transparent !important;
  color: inherit;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #c1ec4c;
}

/* Header nav (Docs / Guides / API Reference / SDKs) drops the lime —
 * felt too loud at the top of the page. Bold accent text with no
 * underline is enough to mark the active tab. */
.fern-header-tabs [role="tab"][aria-selected="true"],
.fern-header-tabs [role="tab"][data-state="active"] {
  box-shadow: none;
  color: var(--accent);
}

/* ---------- Product switcher ---------- */

/*
 * Targets the dropdown button next to the logo that switches between
 * REST API / Webhooks / Product docs. Defensive selector set covers
 * Fern's current and historical class names.
 *
 * Bold, smaller, with a card chrome (1px hairline + inset background)
 * so it reads as an interactive switcher rather than plain text.
 */
[class*="ProductSwitcher"] button,
[class*="product-switcher"] button,
[data-product-dropdown],
[class*="ProductDropdown"] button,
button[aria-label*="product" i],
button[aria-label*="switcher" i] {
  font-family: var(--fern-font-family-headings) !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  letter-spacing: -0.005em;
  padding: 0.3rem 0.6rem !important;
  border: 1px solid var(--border-default) !important;
  background: var(--code-block-background) !important;
  border-radius: 0 !important;
  line-height: 1.2 !important;
  color: var(--text-body) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[class*="ProductSwitcher"] button:hover,
[class*="product-switcher"] button:hover,
[data-product-dropdown]:hover,
[class*="ProductDropdown"] button:hover {
  background: var(--background) !important;
  border-color: var(--text-body) !important;
}
[class*="ProductSwitcher"] button:focus-visible,
[class*="product-switcher"] button:focus-visible,
[data-product-dropdown]:focus-visible,
[class*="ProductDropdown"] button:focus-visible {
  background: var(--background) !important;
  border-color: var(--text-body) !important;
}

/* Shrink the chevron icon so it's proportional to the smaller type. */
[class*="ProductSwitcher"] button svg,
[class*="product-switcher"] button svg,
[class*="ProductDropdown"] button svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* ---------- Home page shell ---------- */

/*
 * Wrapper div around the entire home page body (set in home.mdx). With
 * `layout: custom` Fern strips the content padding too, so this shell
 * gives the page back a sensible max width and horizontal breathing
 * room. Selector lives here so it works regardless of which container
 * Fern wraps the MDX in.
 */
.pivotal-home-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 4rem;
}

/*
 * Home page hero — eyebrow label + large display title + tagline + two
 * CTAs. Sits above the QuickRefs band so the page opens with a title
 * instead of a utility callout.
 */
.pivotal-home-hero {
  margin: 0 0 2.25rem 0;
  max-width: 760px;
}

.pivotal-home-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0.25rem 0 1rem 0;
}

.pivotal-home-hero p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
}

.pivotal-home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.pivotal-home-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 0.95rem;
  border-radius: 2px;
  border: 1px solid var(--border-default);
  font-family: var(--fern-font-family-headings);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none !important;
  transition: background 120ms ease, border-color 120ms ease;
}

.pivotal-home-cta-filled {
  background: var(--text-body);
  color: var(--background) !important;
  border-color: var(--text-body);
}

.pivotal-home-cta-filled:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
}
.pivotal-home-cta-filled:focus-visible {
  background: var(--text-muted);
  border-color: var(--text-muted);
}

.pivotal-home-cta-ghost {
  background: transparent;
  color: var(--text-body) !important;
}

.pivotal-home-cta-ghost:hover {
  background: var(--card-background);
}
.pivotal-home-cta-ghost:focus-visible {
  background: var(--card-background);
}

/* ---------- Home / custom layout: full width, no sidebar ---------- */

/*
 * The home page uses `layout: custom` in its frontmatter. Fern's custom
 * layout strips most chrome, but a sidebar slot can still render on
 * some builds. Nuclear selector set kills any leftover sidebar element
 * on the root route and stretches main content edge to edge.
 *
 * `:has()` walks back from the page-slug data attribute Fern emits on
 * a deep descendant, so we don't need to know which class name Fern is
 * using on body this week.
 */
html:has([data-page-slug="/"]) aside,
html:has([data-page-slug="/"]) nav[class*="ide"],
html:has([data-page-slug="/"]) [class*="Sidebar"],
html:has([data-page-slug="/"]) [class*="sidebar"]:not([class*="earch"]),
body:has([data-page-slug="/"]) aside,
body:has([data-page-slug="/"]) [class*="Sidebar"],
[data-page-slug="/"] ~ * aside,
[data-layout="custom"] aside,
[data-layout="custom"] [class*="Sidebar"] {
  display: none !important;
  width: 0 !important;
}

html:has([data-page-slug="/"]) main,
html:has([data-page-slug="/"]) .fern-content,
html:has([data-page-slug="/"]) [class*="MainContent"],
[data-layout="custom"] main,
[data-layout="custom"] .fern-content {
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-left: clamp(1.5rem, 4vw, 3rem) !important;
  padding-right: clamp(1.5rem, 4vw, 3rem) !important;
}

/* Zero out Fern's reserved sidebar width on the home page via the
 * CSS variable layer in case the element itself is positioned via grid. */
html:has([data-page-slug="/"]),
[data-layout="custom"] {
  --fern-sidebar-width: 0px !important;
  --sidebar-width: 0px !important;
}

/* ---------- Square buttons in the header chrome ---------- */

/*
 * Every clickable in the top header — theme toggle, search trigger,
 * GitHub / external link icons, Fern's action toolbar buttons — gets
 * a square 0-radius edge to match Pivotal's UI language.
 */
.fern-header button,
.fern-header a[role="button"],
[class*="Header"] button:not([role="tab"]),
[class*="header"] button:not([role="tab"]),
header button,
header a[role="button"],
[data-action-bar] button,
.fern-action-bar button {
  border-radius: 0 !important;
}

/* ---------- Header chrome polish ---------- */

/*
 * Tighten the top bar height, replace the heavy default border with a
 * single hairline, lean down the navbar buttons. Targets several Fern
 * container class names so the rule lands regardless of build.
 */
.fern-header,
[class*="Header"]:has(input[type="search"]),
header:has(input[type="search"]) {
  border-bottom: 1px solid var(--border-default) !important;
  background: var(--header-background) !important;
  box-shadow: none !important;
  min-height: 56px !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Dashboard text link — quieter type, hairline underline on hover. */
header a[href*="my.pivotal.app"]:not([class*="button"]),
.fern-header a[href*="my.pivotal.app"]:not([class*="button"]) {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  text-decoration: none;
}

header a[href*="my.pivotal.app"]:not([class*="button"]):hover,
.fern-header a[href*="my.pivotal.app"]:not([class*="button"]):hover {
  color: var(--text-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}
header a[href*="my.pivotal.app"]:not([class*="button"]):focus-visible,
.fern-header a[href*="my.pivotal.app"]:not([class*="button"]):focus-visible {
  color: var(--text-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* "Get an API key" filled CTA — smaller, denser, square. */
header a[class*="filled"],
header a[role="button"][class*="filled"],
.fern-header a[class*="filled"] {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  padding: 0.4rem 0.85rem !important;
  letter-spacing: -0.005em;
  line-height: 1.2 !important;
  border-radius: 0 !important;
}

/* Search bar trim — slightly shorter, less prominent placeholder. */
[class*="searchbar"] input,
[class*="SearchBar"] input,
header input[type="search"] {
  font-size: 0.8125rem !important;
  height: 32px !important;
}

/* Theme toggle icon scale. */
header button[aria-label*="theme" i] svg,
header button[aria-label*="mode" i] svg,
.fern-header button[aria-label*="theme" i] svg {
  width: 14px;
  height: 14px;
}

/* ---------- Search bar ---------- */

[class*="searchbar"],
[class*="SearchBar"] {
  border: 1px solid var(--border);
}

/* ---------- Hide Fern marketing badge ---------- */

/* The "Built with fern" credit lives in the footer toolbar. Hide the
 * link itself and any wrapping element Fern may add around it so the
 * footer reads as Pivotal-only branding. */
a[href*="buildwithfern.com"],
a[href*="fern.io"],
[class*="fern-credit"],
[class*="poweredby"],
[class*="powered-by"],
[class*="built-with"],
[class*="BuiltWith"] {
  display: none !important;
}

/* ===========================================================
 * Pivotal MDX components (the 8 documented in the design spec)
 * ===========================================================
 *
 * Each component is a plain HTML element in MDX with a `pivotal-*`
 * className. No JSX registration needed — Fern passes className
 * through. Naming: `pivotal-` prefix to avoid colliding with Fern's
 * `fern-` selectors or Tailwind utility names.
 */

/* ----- Eyebrow: small-caps tracked label ----- */

/* Matches the in-app "STEP 1" / "FINISH SETUP" / "MANAGED ARR"
 * eyebrow treatment. Use above section headings. */
.pivotal-eyebrow {
  font-family: var(--fern-font-family-headings);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.6rem 0;
}

/* ----- DefGrid: key/value definition grid ----- */

/* Replaces bullet lists for "key: value" data — base URL, auth header,
 * versioning, etc. Two columns on desktop, stacks on mobile. */
.pivotal-defgrid {
  display: grid;
  grid-template-columns: minmax(140px, max-content) 1fr;
  gap: 0.65rem 1.5rem;
  margin: 1.25rem 0;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: 1rem 0;
}

.pivotal-defgrid dt {
  font-family: var(--fern-font-family-headings);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
}

.pivotal-defgrid dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-body);
}

.pivotal-defgrid dd code {
  font-size: 13px;
}

/* ----- ResourceCard: step-card pattern from the in-app dashboard ----- */

/* A card with an eyebrow (resource name), title, one-line definition,
 * and a list of primary verbs (links). Border-led, no shadow. */
.pivotal-resourcecard {
  display: block;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border-default);
  background: var(--background);
  color: var(--text-body);
  text-decoration: none !important;
  transition: border-color 120ms ease;
}

.pivotal-resourcecard:hover {
  border-color: var(--text-body);
}
.pivotal-resourcecard:focus-visible {
  border-color: var(--text-body);
}

.pivotal-resourcecard .pivotal-resourcecard-eyebrow {
  font-family: var(--fern-font-family-headings);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.pivotal-resourcecard h3 {
  margin: 0 0 0.35rem 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.pivotal-resourcecard p {
  margin: 0 0 0.7rem 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pivotal-resourcecard .pivotal-resourcecard-verbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-family: var(--fern-font-family-code);
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- StatusDot: inline status indicator ----- */

/* Status-only green, never on links/CTAs. Sizes match in-app:
 * a 0.55rem dot with a soft halo. */
.pivotal-statusdot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 13px;
  color: var(--text-body);
}

.pivotal-statusdot::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--pivotal-statusdot-color, #22c55e);
  box-shadow: 0 0 0 3px var(--pivotal-statusdot-halo, rgba(34, 197, 94, 0.18));
}

.pivotal-statusdot[data-state="live"]    { --pivotal-statusdot-color: #22c55e; --pivotal-statusdot-halo: rgba(34, 197, 94, 0.18); }
.pivotal-statusdot[data-state="healthy"] { --pivotal-statusdot-color: #22c55e; --pivotal-statusdot-halo: rgba(34, 197, 94, 0.18); }
.pivotal-statusdot[data-state="warn"]    { --pivotal-statusdot-color: #f59e0b; --pivotal-statusdot-halo: rgba(245, 158, 11, 0.18); }
.pivotal-statusdot[data-state="risk"]    { --pivotal-statusdot-color: #ef4444; --pivotal-statusdot-halo: rgba(239, 68, 68, 0.18); }
.pivotal-statusdot[data-state="off"]     { --pivotal-statusdot-color: var(--text-muted); --pivotal-statusdot-halo: transparent; }

/* ----- PiCallout: AI-only purple-blue gradient ----- */

/* NEVER use on non-AI content. The gradient is reserved as the visual
 * signature for "this is Pi" — the in-app AI co-pilot. */
.pivotal-picallout {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #3B82F6 100%);
  color: #ffffff;
  border: 0;
}

.pivotal-picallout::before {
  content: "PI";
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  font-family: var(--fern-font-family-headings);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.pivotal-picallout h3,
.pivotal-picallout h4 {
  color: #ffffff;
  margin-top: 0;
}

.pivotal-picallout p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}

.pivotal-picallout a {
  color: #ffffff !important;
  text-decoration: underline;
}

/* ----- StillStuck: support callout ----- */

.pivotal-still-stuck {
  margin: 2.5rem 0 1.5rem 0;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border-default);
  background: var(--code-block-background);
  font-size: 14px;
  color: var(--text-body);
}

.pivotal-still-stuck strong {
  font-weight: 500;
}

/* ----- DataModelDiagram + PhaseFlow are inline SVG so the styling lives
 * inside the SVG itself. We add only the outer container spacing here. */

.pivotal-diagram {
  margin: 1.75rem 0;
  width: 100%;
}

.pivotal-diagram svg {
  width: 100%;
  height: auto;
  max-width: 760px;
  display: block;
  margin: 0 auto;
}

/* ----- Entry-point card pair (Build on the API / Use the app) ----- */

.pivotal-entry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 720px) {

  .pivotal-entry-grid {
    grid-template-columns: 1fr 1fr;
  }

}

.pivotal-entry {
  display: block;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border-default);
  background: var(--background);
  color: var(--text-body);
  text-decoration: none !important;
  transition: border-color 120ms ease;
}

.pivotal-entry:hover {
  border-color: var(--text-body);
}
.pivotal-entry:focus-visible {
  border-color: var(--text-body);
}

.pivotal-entry h3 {
  margin: 0 0 0.4rem 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.014em;
}

.pivotal-entry p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ----- QuickRefs: top banner of reference lines (Webflow-style) ----- */

/* ----- DevBelt: 4-up developer-toolbelt strip ----- */

/* Four cells, each with an icon + label header, a mono chip, and a one-
 * line description. Replaces the old hairline-bordered bullet list at
 * the top of the home page with denser, dashboard-feeling tiles. */
.pivotal-devbelt {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-default);
  border: 1px solid var(--border-default);
  margin: 0 0 3rem 0;
}

@media (max-width: 960px) {

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

}

@media (max-width: 560px) {

  .pivotal-devbelt {
    grid-template-columns: 1fr;
  }

}

.pivotal-devbelt-item {
  background: var(--background);
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pivotal-devbelt-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fern-font-family-headings);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pivotal-devbelt-head i {
  font-size: 11px;
  color: var(--text-muted);
}

.pivotal-devbelt-chip {
  font-family: var(--fern-font-family-code);
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.4;
  word-break: break-all;
}

.pivotal-devbelt-chip code {
  font-size: 12px;
  padding: 0.1em 0.35em;
  background: var(--code-block-background);
  border: 1px solid var(--border-default);
  border-radius: 0;
}

.pivotal-devbelt-chip a {
  text-decoration: none !important;
}

.pivotal-devbelt-chip a code {
  transition: border-color 120ms ease, color 120ms ease;
}

.pivotal-devbelt-chip a:hover code {
  border-color: var(--text-body);
  color: var(--text-body);
}
.pivotal-devbelt-chip a:focus-within code {
  border-color: var(--text-body);
  color: var(--text-body);
}

.pivotal-devbelt-item p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ----- Legacy QuickRefs (kept for any inner pages still using it) ----- */

/* A short list of links / facts at the very top of the home page.
 * Hairline border top + bottom, small text, no bullets — reads like
 * a docs-utility banner, not a section. */
.pivotal-quickrefs {
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  margin: 0 0 2.5rem 0;
  padding: 0.9rem 0;
}

.pivotal-quickrefs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 1.5rem;
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 720px) {

  .pivotal-quickrefs ul {
    grid-template-columns: 1fr 1fr;
  }

}

.pivotal-quickrefs li {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.pivotal-quickrefs code {
  font-size: 12px;
  padding: 0.05em 0.3em;
}

/* ----- Code block chrome — tighter, single border, no heavy bg ----- */

/* Reference: Linear's code block treatment. Filename label small and
 * muted, single hairline border, background a touch off-bg so the
 * block reads as a surface without dominating. */
pre,
.fern-code-block {
  border: 1px solid var(--border-default) !important;
  background: var(--code-block-background) !important;
  box-shadow: none !important;
}

[class*="code-block"] [class*="title"],
[class*="code-block"] [class*="filename"] {
  font-family: var(--fern-font-family-code);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  padding: 0.45rem 0.75rem;
}
