/*fern-site-stylesheet*/:root {
  --header-height: 64px;
  --header-height-real: 64px;
  --mobile-header-height-real: 64px;
  --content-width: 704px;
  --sidebar-width: 288px;
  --page-width: 100vw;
  --logo-height: 24px;
  --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: #fcfcfd;
  --accent-2: #f9f9f9;
  --accent-3: #f0f0f0;
  --accent-4: #e8e8e8;
  --accent-5: #e1e1e1;
  --accent-6: #d9d9d9;
  --accent-7: #cecece;
  --accent-8: #bbbbbc;
  --accent-9: #0a0a0b;
  --accent-10: #262627;
  --accent-11: #636364;
  --accent-12: #1f1f20;

  --accent-a1: #00005503;
  --accent-a2: #00000006;
  --accent-a3: #0000000f;
  --accent-a4: #00000017;
  --accent-a5: #0000001e;
  --accent-a6: #00000026;
  --accent-a7: #00000031;
  --accent-a8: #00000444;
  --accent-a9: #000001f5;
  --accent-a10: #000001d9;
  --accent-a11: #0000029c;
  --accent-a12: #000001e0;

  --accent-contrast: #fff;
  --accent-surface: #f8f8f8cc;
  --accent-indicator: #0a0a0b;
  --accent-track: #0a0a0b;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --accent-1: oklch(99.2% 0.0004 286.1);
      --accent-2: oklch(98.1% 0.0005 286.1);
      --accent-3: oklch(95.5% 0.0006 286.1);
      --accent-4: oklch(93.1% 0.0006 286.1);
      --accent-5: oklch(90.9% 0.0007 286.1);
      --accent-6: oklch(88.5% 0.0007 286.1);
      --accent-7: oklch(85.1% 0.0008 286.1);
      --accent-8: oklch(79.2% 0.0009 286.1);
      --accent-9: oklch(14.5% 0.0021 286.1);
      --accent-10: oklch(26.8% 0.0021 286.1);
      --accent-11: oklch(50.1% 0.0014 286.1);
      --accent-12: oklch(24% 0.0021 286.1);

      --accent-a1: color(display-p3 0.0235 0.0235 0.349 / 0.012);
      --accent-a2: color(display-p3 0 0 0 / 0.0235);
      --accent-a3: color(display-p3 0 0 0 / 0.0588);
      --accent-a4: color(display-p3 0 0 0 / 0.0902);
      --accent-a5: color(display-p3 0 0 0 / 0.1176);
      --accent-a6: color(display-p3 0 0 0 / 0.149);
      --accent-a7: color(display-p3 0 0 0 / 0.1922);
      --accent-a8: color(display-p3 0.0039 0.0039 0.0196 / 0.267);
      --accent-a9: color(display-p3 0 0 0.0039 / 0.961);
      --accent-a10: color(display-p3 0 0 0.0039 / 0.851);
      --accent-a11: color(display-p3 0 0 0.0078 / 0.612);
      --accent-a12: color(display-p3 0 0 0.0039 / 0.879);

      --accent-contrast: #fff;
      --accent-surface: color(display-p3 0.9725 0.9725 0.9725 / 0.8);
      --accent-indicator: oklch(14.5% 0.0021 286.1);
      --accent-track: oklch(14.5% 0.0021 286.1);
    }
  }
}


.light, :root {
  --grayscale-1: #fcfcfc;
  --grayscale-2: #f9f9f9;
  --grayscale-3: #f0f0f0;
  --grayscale-4: #e8e8e8;
  --grayscale-5: #e0e0e0;
  --grayscale-6: #d9d9d9;
  --grayscale-7: #cecece;
  --grayscale-8: #bbbbbb;
  --grayscale-9: #8d8d8d;
  --grayscale-10: #838383;
  --grayscale-11: #646464;
  --grayscale-12: #202020;

  --grayscale-a1: #00000003;
  --grayscale-a2: #00000006;
  --grayscale-a3: #0000000f;
  --grayscale-a4: #00000017;
  --grayscale-a5: #0000001f;
  --grayscale-a6: #00000026;
  --grayscale-a7: #00000031;
  --grayscale-a8: #00000044;
  --grayscale-a9: #00000072;
  --grayscale-a10: #0000007c;
  --grayscale-a11: #0000009b;
  --grayscale-a12: #000000df;

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

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .light, :root {
      --grayscale-1: color(display-p3 0.988 0.988 0.988);
      --grayscale-2: color(display-p3 0.975 0.975 0.975);
      --grayscale-3: color(display-p3 0.939 0.939 0.939);
      --grayscale-4: color(display-p3 0.908 0.908 0.908);
      --grayscale-5: color(display-p3 0.88 0.88 0.88);
      --grayscale-6: color(display-p3 0.849 0.849 0.849);
      --grayscale-7: color(display-p3 0.807 0.807 0.807);
      --grayscale-8: color(display-p3 0.732 0.732 0.732);
      --grayscale-9: color(display-p3 0.553 0.553 0.553);
      --grayscale-10: color(display-p3 0.512 0.512 0.512);
      --grayscale-11: color(display-p3 0.392 0.392 0.392);
      --grayscale-12: color(display-p3 0.125 0.125 0.125);

      --grayscale-a1: #00000003;
      --grayscale-a2: #00000006;
      --grayscale-a3: #0000000f;
      --grayscale-a4: #00000017;
      --grayscale-a5: #0000001f;
      --grayscale-a6: #00000026;
      --grayscale-a7: #00000031;
      --grayscale-a8: #00000044;
      --grayscale-a9: #00000072;
      --grayscale-a10: #0000007c;
      --grayscale-a11: #0000009b;
      --grayscale-a12: #000000df;

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


.dark {
  --accent-1: #111;
  --accent-2: #191919;
  --accent-3: #232323;
  --accent-4: #2a2a2a;
  --accent-5: #313131;
  --accent-6: #3a3a3a;
  --accent-7: #484848;
  --accent-8: #616161;
  --accent-9: #fafafa;
  --accent-10: #f1f1f1;
  --accent-11: #b4b4b4;
  --accent-12: #eee;

  --accent-a1: #11110131;
  --accent-a2: #f4f48709;
  --accent-a3: #f7f7c814;
  --accent-a4: #fefedc1b;
  --accent-a5: #fbfbe123;
  --accent-a6: #ffffec2c;
  --accent-a7: #fffff23b;
  --accent-a8: #fffff756;
  --accent-a9: #fffffffa;
  --accent-a10: #fffffff0;
  --accent-a11: #fffffcaf;
  --accent-a12: #ffffffed;

  --accent-contrast: #311921;
  --accent-surface: #21211d80;
  --accent-indicator: #fafafa;
  --accent-track: #fafafa;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --accent-1: oklch(17.9% 0 none);
      --accent-2: oklch(21.5% 0 none);
      --accent-3: oklch(25.5% 0 none);
      --accent-4: oklch(28.4% 0 none);
      --accent-5: oklch(31.4% 0 none);
      --accent-6: oklch(35% 0 none);
      --accent-7: oklch(40.2% 0 none);
      --accent-8: oklch(49.2% 0 none);
      --accent-9: oklch(98.5% 0 none);
      --accent-10: oklch(95.7% 0 none);
      --accent-11: oklch(77% 0 none);
      --accent-12: oklch(94.9% 0 none);

      --accent-a1: color(display-p3 0.0706 0.0706 0.0039 / 0.191);
      --accent-a2: color(display-p3 0.9922 0.9922 0.5451 / 0.034);
      --accent-a3: color(display-p3 0.9961 0.9961 0.8078 / 0.076);
      --accent-a4: color(display-p3 0.9922 0.9922 0.8627 / 0.106);
      --accent-a5: color(display-p3 1 1 0.898 / 0.135);
      --accent-a6: color(display-p3 0.9961 0.9961 0.9216 / 0.173);
      --accent-a7: color(display-p3 1 1 0.9451 / 0.232);
      --accent-a8: color(display-p3 1 1 0.9686 / 0.337);
      --accent-a9: color(display-p3 1 1 1 / 0.979);
      --accent-a10: color(display-p3 1 1 1 / 0.942);
      --accent-a11: color(display-p3 1 1 0.9922 / 0.685);
      --accent-a12: color(display-p3 1 1 1 / 0.929);

      --accent-contrast: #311921;
      --accent-surface: color(display-p3 0.1255 0.1255 0.1098 / 0.5);
      --accent-indicator: oklch(98.5% 0 none);
      --accent-track: oklch(98.5% 0 none);
    }
  }
}


.dark {
  --grayscale-1: #111113;
  --grayscale-2: #18191b;
  --grayscale-3: #212225;
  --grayscale-4: #272a2d;
  --grayscale-5: #2e3135;
  --grayscale-6: #363a3f;
  --grayscale-7: #43484e;
  --grayscale-8: #5a6169;
  --grayscale-9: #696e77;
  --grayscale-10: #777b84;
  --grayscale-11: #b0b4ba;
  --grayscale-12: #edeef0;

  --grayscale-a1: #00000000;
  --grayscale-a2: #d8f4f609;
  --grayscale-a3: #ddeaf814;
  --grayscale-a4: #d3edf81d;
  --grayscale-a5: #d9edfe25;
  --grayscale-a6: #d6ebfd30;
  --grayscale-a7: #d9edff40;
  --grayscale-a8: #d9edff5d;
  --grayscale-a9: #dfebfd6d;
  --grayscale-a10: #e5edfd7b;
  --grayscale-a11: #f1f7feb5;
  --grayscale-a12: #fcfdffef;

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

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark {
      --grayscale-1: color(display-p3 0.067 0.067 0.074);
      --grayscale-2: color(display-p3 0.095 0.098 0.105);
      --grayscale-3: color(display-p3 0.13 0.135 0.145);
      --grayscale-4: color(display-p3 0.156 0.163 0.176);
      --grayscale-5: color(display-p3 0.183 0.191 0.206);
      --grayscale-6: color(display-p3 0.215 0.226 0.244);
      --grayscale-7: color(display-p3 0.265 0.28 0.302);
      --grayscale-8: color(display-p3 0.357 0.381 0.409);
      --grayscale-9: color(display-p3 0.415 0.431 0.463);
      --grayscale-10: color(display-p3 0.469 0.483 0.514);
      --grayscale-11: color(display-p3 0.692 0.704 0.728);
      --grayscale-12: color(display-p3 0.93 0.933 0.94);

      --grayscale-a1: #00000000;
      --grayscale-a2: #d8f4f609;
      --grayscale-a3: #ddeaf814;
      --grayscale-a4: #d3edf81d;
      --grayscale-a5: #d9edfe25;
      --grayscale-a6: #d6ebfd30;
      --grayscale-a7: #d9edff40;
      --grayscale-a8: #d9edff5d;
      --grayscale-a9: #dfebfd6d;
      --grayscale-a10: #e5edfd7b;
      --grayscale-a11: #f1f7feb5;
      --grayscale-a12: #fcfdffef;

      --grayscale-contrast: #fff;
      --grayscale-surface: color(display-p3 0 0 0 / 5%);
      --grayscale-indicator: color(display-p3 0.415 0.431 0.463);
      --grayscale-track: color(display-p3 0.415 0.431 0.463);
    }
  }
}

.light, :root {
  color-scheme: light;
  --accent: rgba(10, 10, 11, 1);
  --background: rgba(255, 255, 255, 1);
  --border: rgba(236, 236, 237, 1);
  --sidebar-background: rgba(250, 250, 250, 1);
  --header-background: rgba(255, 255, 255, 1);
  --card-background: initial;
  --theme-color: #fff;
}

.dark {
  color-scheme: dark;
  --accent: rgba(250, 250, 250, 1);
  --background: rgba(17, 17, 21, 1);
  --border: rgba(39, 39, 42, 1);
  --sidebar-background: rgba(15, 15, 18, 1);
  --header-background: rgba(17, 17, 21, 1);
  --card-background: initial;
  --theme-color: #111115;
}

/* Linear-style polish on top of Fern's defaults. */

:root {
  --ss-font-display: "Inter", "Inter Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ss-font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas,
    monospace;
}

html,
body {
  font-feature-settings: "cv11", "ss01", "ss03";
  letter-spacing: -0.005em;
}

/* Tighter, Linear-like headings. */
h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin-top: 2.5rem;
}

/* Subtler dividers — Linear uses very low-contrast borders. */
.dark hr,
.dark [class*="border"] {
  border-color: rgba(255, 255, 255, 0.06);
}

/* Sidebar entries — tighter rhythm, lower-contrast inactive items. */
nav a {
  letter-spacing: -0.005em;
}

.dark nav a:not([aria-current="page"]) {
  color: rgba(255, 255, 255, 0.6);
}

.dark nav a[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* Code blocks: flatter, with a hint of border instead of heavy fill. */
.dark pre,
.dark code {
  background: #0f1011 !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

/* In-page TOC on the right — quieter inactive state. */
.dark aside a {
  color: rgba(255, 255, 255, 0.55);
}

.dark aside a[aria-current="true"],
.dark aside a.active {
  color: #ffffff;
}

/* Filled navbar CTA ("Open App") — dark mode: white pill, black text.
   Without this, Fern renders white-on-white because accent-primary.dark is white. */
.dark header a[class*="filled"],
.dark header a[data-variant="filled"],
.dark nav a[class*="filled"],
.dark nav a[data-variant="filled"] {
  background: #ffffff !important;
  color: #0a0a0a !important;
  border: 1px solid #ffffff !important;
}

.dark header a[class*="filled"]:hover,
.dark header a[data-variant="filled"]:hover,
.dark nav a[class*="filled"]:hover,
.dark nav a[data-variant="filled"]:hover {
  background: #e4e4e7 !important;
  color: #0a0a0a !important;
  border-color: #e4e4e7 !important;
}
.dark header a[class*="filled"]:focus-visible,
.dark header a[data-variant="filled"]:focus-visible,
.dark nav a[class*="filled"]:focus-visible,
.dark nav a[data-variant="filled"]:focus-visible {
  background: #e4e4e7 !important;
  color: #0a0a0a !important;
  border-color: #e4e4e7 !important;
}

/* Sidebar — tighten section-label + item rhythm.
   Default Fern spacing leaves a big visual gap between section headings
   (Constraints / Help / Trust) and their child links. */
#fern-sidebar nav h1,
#fern-sidebar nav h2,
#fern-sidebar nav h3,
#fern-sidebar nav h4,
#fern-sidebar nav h5,
#fern-sidebar nav h6,
#fern-sidebar [class*="section"] > [class*="title"],
#fern-sidebar [class*="section"] > [class*="heading"],
#fern-sidebar [class*="Section"] > [class*="Title"],
#fern-sidebar [class*="Section"] > [class*="Heading"] {
  margin: 0.75rem 0 0.125rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#fern-sidebar nav a,
#fern-sidebar li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#fern-sidebar nav a {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  line-height: 1.4 !important;
}

#fern-sidebar ul,
#fern-sidebar ol {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  row-gap: 0 !important;
}
