@font-face{font-family:'Manrope Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(./manrope-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Manrope Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(./manrope-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* GENERATED by scripts/build-tokens.ts from src/tokens/tokens.ts — do not edit. */
@layer ib.tokens {
  :root {
    color-scheme: dark;

    --ib-color-bg: #121217;
    --ib-color-surface: #19191f;
    --ib-color-surface-raised: #1b1b22;
    --ib-color-control: #26262f;
    --ib-color-control-hover: #2e2e38;
    --ib-color-line: rgba(255, 255, 255, 0.07);
    --ib-color-line-subtle: rgba(255, 255, 255, 0.06);
    --ib-color-line-strong: rgba(255, 255, 255, 0.12);
    --ib-color-text: #efeff4;
    --ib-color-text-2: #d4d4de;
    --ib-color-muted: #9a9aa6;
    --ib-color-meta: #8e8e9a;
    --ib-color-icon: #c9c9d4;
    --ib-color-nav-idle: #b4b4c0;
    --ib-color-wordmark: #f4f4f8;
    --ib-color-accent: #8b5cf6;
    --ib-color-accent-hover: #9d74f8;
    --ib-color-accent-bright: #a78bfa;
    --ib-color-accent-soft: rgba(139, 92, 246, 0.14);
    --ib-color-accent-tint: rgba(139, 92, 246, 0.2);
    --ib-color-accent-ring: rgba(167, 139, 250, 0.4);
    --ib-color-accent-text: #c4b5fd;
    --ib-color-tag-text: #b9a6fb;
    --ib-color-tag-hover: #ddd6fe;
    --ib-color-auto-text: #7ee8d8;
    --ib-color-auto-soft: rgba(45, 212, 191, 0.12);
    --ib-color-auto-ring: rgba(94, 234, 212, 0.34);
    --ib-color-tag-violet-text: #b9a6fb;
    --ib-color-tag-violet-soft: rgba(139, 92, 246, 0.14);
    --ib-color-tag-violet-ring: rgba(167, 139, 250, 0.4);
    --ib-color-tag-blue-text: #93c5fd;
    --ib-color-tag-blue-soft: rgba(59, 130, 246, 0.16);
    --ib-color-tag-blue-ring: rgba(96, 165, 250, 0.42);
    --ib-color-tag-teal-text: #5eead4;
    --ib-color-tag-teal-soft: rgba(20, 184, 166, 0.14);
    --ib-color-tag-teal-ring: rgba(45, 212, 191, 0.4);
    --ib-color-tag-green-text: #86efac;
    --ib-color-tag-green-soft: rgba(34, 197, 94, 0.14);
    --ib-color-tag-green-ring: rgba(74, 222, 128, 0.4);
    --ib-color-tag-amber-text: #fcd34d;
    --ib-color-tag-amber-soft: rgba(245, 158, 11, 0.14);
    --ib-color-tag-amber-ring: rgba(251, 191, 36, 0.4);
    --ib-color-tag-orange-text: #fdba74;
    --ib-color-tag-orange-soft: rgba(249, 115, 22, 0.15);
    --ib-color-tag-orange-ring: rgba(251, 146, 60, 0.42);
    --ib-color-tag-red-text: #fca5a5;
    --ib-color-tag-red-soft: rgba(239, 68, 68, 0.15);
    --ib-color-tag-red-ring: rgba(248, 113, 113, 0.42);
    --ib-color-tag-pink-text: #f9a8d4;
    --ib-color-tag-pink-soft: rgba(236, 72, 153, 0.15);
    --ib-color-tag-pink-ring: rgba(244, 114, 182, 0.42);
    --ib-color-on-accent: #ffffff;
    --ib-color-danger: #f87171;
    --ib-color-danger-soft: rgba(248, 113, 113, 0.12);
    --ib-color-glass: rgba(30, 30, 38, 0.88);
    --ib-color-skeleton-sheen: #202029;
    --ib-color-wash: rgba(139, 92, 246, 0.14);

    --ib-radius-pill: 999px;
    --ib-radius-composer: 20px;
    --ib-radius-card: 16px;
    --ib-radius-panel: 16px;
    --ib-radius-field: 16px;
    --ib-radius-popover: 18px;
    --ib-radius-option: 12px;
    --ib-radius-control: 10px;
    --ib-radius-chip: 8px;
    --ib-radius-kbd: 6px;

    --ib-space-1: 4px;
    --ib-space-2: 8px;
    --ib-space-3: 12px;
    --ib-space-4: 16px;
    --ib-space-5: 20px;
    --ib-space-6: 24px;
    --ib-space-8: 32px;
    --ib-space-10: 40px;
    --ib-space-12: 48px;

    --ib-size-control: 46px;
    --ib-size-control-sm: 36px;
    --ib-size-button-sm: 34px;
    --ib-size-input: 50px;
    --ib-size-search: 50px;
    --ib-size-sidebar: 232px;

    --ib-font-family: 'Manrope Variable', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --ib-font-size-xs: 11px;
    --ib-font-size-sm: 12px;
    --ib-font-size-meta: 12.5px;
    --ib-font-size-md: 13px;
    --ib-font-size-base: 14px;
    --ib-font-size-body: 15px;
    --ib-font-size-idea: 15.5px;
    --ib-font-size-lg: 16px;
    --ib-font-size-xl: 17px;
    --ib-font-size-2xl: 19px;
    --ib-font-size-3xl: 22px;
    --ib-font-size-4xl: 24px;
    --ib-font-size-5xl: 28px;

    --ib-font-weight-medium: 500;
    --ib-font-weight-semibold: 600;
    --ib-font-weight-bold: 700;
    --ib-font-weight-heavy: 800;

    --ib-tracking-label: 0;
    --ib-tracking-button: 0;
    --ib-tracking-wordmark: 0.02em;
    --ib-tracking-tight: -0.01em;

    --ib-line-height-body: 1.5;
    --ib-line-height-content: 1.55;

    --ib-shadow-raised: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --ib-shadow-float: 0 14px 36px rgba(0, 0, 0, 0.45);
    --ib-shadow-accent: none;

    --ib-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    --ib-duration-fast: 0.15s;
    --ib-duration-base: 0.25s;
    --ib-duration-slow: 0.5s;

    --ib-blur-glass: 20px;

    --ib-z-nav: 20;
    --ib-z-popover: 25;
    --ib-z-toast: 30;
    --ib-z-overlay: 60;
  }
}

/* Tag colours: one `tag-color--<name>` class recolours any tag element. Tag components read the
   --ib-tag-* variables below, falling back to the default violet look when none is set.
   --ib-tag-auto-* give automated tags their gradient in the tag's own colour instead of teal-to-violet. */
@layer ib.base {
  .tag-color--violet {
    --ib-tag-text: var(--ib-color-tag-violet-text);
    --ib-tag-soft: var(--ib-color-tag-violet-soft);
    --ib-tag-ring: var(--ib-color-tag-violet-ring);
  }

  .tag-color--blue {
    --ib-tag-text: var(--ib-color-tag-blue-text);
    --ib-tag-soft: var(--ib-color-tag-blue-soft);
    --ib-tag-ring: var(--ib-color-tag-blue-ring);
  }

  .tag-color--teal {
    --ib-tag-text: var(--ib-color-tag-teal-text);
    --ib-tag-soft: var(--ib-color-tag-teal-soft);
    --ib-tag-ring: var(--ib-color-tag-teal-ring);
  }

  .tag-color--green {
    --ib-tag-text: var(--ib-color-tag-green-text);
    --ib-tag-soft: var(--ib-color-tag-green-soft);
    --ib-tag-ring: var(--ib-color-tag-green-ring);
  }

  .tag-color--amber {
    --ib-tag-text: var(--ib-color-tag-amber-text);
    --ib-tag-soft: var(--ib-color-tag-amber-soft);
    --ib-tag-ring: var(--ib-color-tag-amber-ring);
  }

  .tag-color--orange {
    --ib-tag-text: var(--ib-color-tag-orange-text);
    --ib-tag-soft: var(--ib-color-tag-orange-soft);
    --ib-tag-ring: var(--ib-color-tag-orange-ring);
  }

  .tag-color--red {
    --ib-tag-text: var(--ib-color-tag-red-text);
    --ib-tag-soft: var(--ib-color-tag-red-soft);
    --ib-tag-ring: var(--ib-color-tag-red-ring);
  }

  .tag-color--pink {
    --ib-tag-text: var(--ib-color-tag-pink-text);
    --ib-tag-soft: var(--ib-color-tag-pink-soft);
    --ib-tag-ring: var(--ib-color-tag-pink-ring);
  }

  .tag-color--violet {
    --ib-tag-tint: var(--ib-color-accent-tint);
    --ib-tag-hover: var(--ib-color-tag-hover);
  }

  .tag-color--blue,
  .tag-color--teal,
  .tag-color--green,
  .tag-color--amber,
  .tag-color--orange,
  .tag-color--red,
  .tag-color--pink {
    --ib-tag-tint: color-mix(in srgb, var(--ib-tag-text) 20%, transparent);
    --ib-tag-hover: color-mix(in srgb, var(--ib-tag-text) 55%, #fff);
  }

  .tag-color--violet,
  .tag-color--blue,
  .tag-color--teal,
  .tag-color--green,
  .tag-color--amber,
  .tag-color--orange,
  .tag-color--red,
  .tag-color--pink {
    /* An automated tag in a custom colour keeps a visible two-tone gradient, like the default
       teal-to-violet one: a light tint of the colour fading into the colour itself. */
    --ib-tag-auto-from: color-mix(in srgb, var(--ib-tag-text) 45%, #fff);
    --ib-tag-auto-text: var(--ib-tag-text);
    --ib-tag-auto-soft: color-mix(in srgb, var(--ib-tag-text) 34%, transparent);
    --ib-tag-auto-ring: color-mix(in srgb, var(--ib-tag-text) 55%, transparent);
  }
}

/* Idea Bucket docs: static pages on the kit's tokens (prepended at build). Dark only, like the app. */

:root {
  --d-bar: 60px;
  --d-nav: 248px;
  --d-toc: 220px;
  --d-measure: 70ch;
  --d-gutter: 16px;
  --d-gradient: linear-gradient(95deg, var(--ib-color-auto-text) 0%, var(--ib-color-accent-bright) 55%, var(--ib-color-accent-text) 100%);
  --d-code-bg: #0c0c10;
  --d-code-text: #e6e6ee;
  --d-link: #c4b5fd;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ib-color-bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--d-bar) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(720px 360px at 18% -80px, rgba(139, 92, 246, 0.13), transparent 70%),
    radial-gradient(520px 300px at 92% -60px, rgba(45, 212, 191, 0.05), transparent 70%),
    var(--ib-color-bg);
  background-repeat: no-repeat;
  color: var(--ib-color-text-2);
  font-family: var(--ib-font-family);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'ss01' off;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--d-link);
  text-decoration-color: rgba(196, 181, 253, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ib-color-tag-hover);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ib-color-accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--ib-radius-control);
  background: var(--ib-color-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
}

/* ---------- top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--ib-color-line);
  background: rgba(18, 18, 23, 0.8);
  -webkit-backdrop-filter: blur(var(--ib-blur-glass)) saturate(140%);
  backdrop-filter: blur(var(--ib-blur-glass)) saturate(140%);
}

.bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--d-bar);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--d-gutter);
}

.bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.bar__logo {
  display: block;
  height: 15px;
  width: auto;
}

.bar__docs {
  padding: 1px 9px;
  border-radius: var(--ib-radius-pill);
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-accent-text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
}

.bar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.bar__links a {
  padding: 6px 12px;
  border-radius: var(--ib-radius-pill);
  color: var(--ib-color-nav-idle);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--ib-duration-fast) ease, background var(--ib-duration-fast) ease;
}

.bar__links a:hover,
.bar__links a[aria-current='page'] {
  color: var(--ib-color-text);
}

.bar__links .bar__cta {
  margin-left: 6px;
  background: var(--ib-color-accent);
  color: #fff;
  font-weight: 700;
}

.bar__links .bar__cta:hover {
  background: var(--ib-color-accent-hover);
  color: #fff;
}

.bar__menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--ib-radius-control);
  background: transparent;
  cursor: pointer;
}

.bar__menu span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ib-color-icon);
  transition: transform var(--ib-duration-fast) ease, opacity var(--ib-duration-fast) ease;
}

.bar__menu:hover {
  background: var(--ib-color-control);
}

.nav-open .bar__menu span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .bar__menu span:nth-child(2) {
  opacity: 0;
}

.nav-open .bar__menu span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- layout ---------- */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--d-nav) minmax(0, 1fr);
  gap: 48px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--d-gutter);
}

@media (min-width: 1240px) {
  .layout {
    grid-template-columns: var(--d-nav) minmax(0, 1fr) var(--d-toc);
    padding: 0 28px;
  }

  .is-home .layout {
    grid-template-columns: var(--d-nav) minmax(0, 1fr);
  }

  .bar__inner,
  .foot__inner {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* Desktop reading size: a touch larger, with lines held near 70 characters. */
@media (min-width: 900px) {
  .prose {
    font-size: 16.5px;
  }

  .article:not(.article--home) {
    max-width: 620px;
  }
}

/* ---------- sidebar ---------- */

.nav {
  position: sticky;
  top: var(--d-bar);
  align-self: start;
  max-height: calc(100dvh - var(--d-bar));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 0 40px;
  scrollbar-width: thin;
}

.nav__home,
.nav ul a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--ib-radius-control);
  color: var(--ib-color-nav-idle);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--ib-duration-fast) ease, background var(--ib-duration-fast) ease;
}

.nav__home:hover,
.nav ul a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ib-color-text);
}

.nav__home[aria-current='page'],
.nav ul a[aria-current='page'] {
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-text);
  box-shadow: inset 2px 0 0 var(--ib-color-accent-bright);
}

.nav__group {
  margin-top: 22px;
}

.nav__section {
  margin: 0 0 6px;
  padding: 0 12px;
  color: var(--ib-color-meta);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__site {
  display: none;
}

.scrim {
  display: none;
}

/* ---------- article ---------- */

.article {
  min-width: 0;
  max-width: var(--d-measure);
  padding: 40px 0 72px;
  outline: none;
}

.article--home {
  max-width: 1000px;
}

.crumbs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ib-color-meta);
  font-size: 13.5px;
  font-weight: 600;
}

.crumbs a {
  color: var(--ib-color-meta);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ib-color-text);
}

.article h1 {
  margin: 0;
  color: var(--ib-color-text);
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 14px 0 0;
  color: var(--ib-color-muted);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.article__head {
  padding-bottom: 26px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ib-color-line);
}

/* home */

.home__hero {
  padding: 16px 0 8px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  background: var(--d-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.is-home .article h1 {
  font-size: clamp(34px, 5.6vw, 52px);
}

.home__group {
  margin-top: 40px;
}

.home__group h2 {
  margin: 0 0 14px;
  color: var(--ib-color-meta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--ib-color-line);
  border-radius: var(--ib-radius-card);
  background: var(--ib-color-surface);
  box-shadow: var(--ib-shadow-raised);
  text-decoration: none;
  transition: border-color var(--ib-duration-fast) ease, background var(--ib-duration-fast) ease, transform var(--ib-duration-fast) var(--ib-ease);
}

.card:hover {
  border-color: var(--ib-color-accent-ring);
  background: var(--ib-color-surface-raised);
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    transform: translateY(-2px);
  }
}

.card__title {
  color: var(--ib-color-text);
  font-size: 16.5px;
  font-weight: 700;
}

.card__text {
  color: var(--ib-color-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---------- prose ---------- */

.prose > :first-child {
  margin-top: 24px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 4px 0;
  padding-left: 2px;
}

.prose li::marker {
  color: var(--ib-color-meta);
}

.prose li > ul,
.prose li > ol {
  margin: 4px 0 6px;
}

.prose strong {
  color: var(--ib-color-text);
  font-weight: 700;
}

.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--ib-color-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.prose h2 {
  margin: 48px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--ib-color-line);
  font-size: 24px;
  font-weight: 800;
}

.prose > h2:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h3 {
  margin: 32px 0 10px;
  font-size: 19px;
  font-weight: 700;
}

.prose h4 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.anchor {
  position: absolute;
  left: -0.9em;
  padding-right: 0.25em;
  color: var(--ib-color-meta);
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--ib-duration-fast) ease;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose h4:hover .anchor {
  opacity: 1;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border: 1px solid var(--ib-color-line);
  border-radius: 6px;
  background: var(--ib-color-control);
  color: var(--ib-color-text);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose a code {
  color: inherit;
}

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 1px 7px;
  border: 1px solid var(--ib-color-line-strong);
  border-bottom-width: 2px;
  border-radius: var(--ib-radius-kbd);
  background: var(--ib-color-control);
  color: var(--ib-color-text);
  font-family: inherit;
  font-size: 0.84em;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--ib-color-line);
}

.prose img {
  max-width: 100%;
  border-radius: var(--ib-radius-card);
}

.prose blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--ib-color-line-strong);
  color: var(--ib-color-muted);
}

/* code blocks */

.code {
  position: relative;
  margin: 0 0 20px;
  border: 1px solid var(--ib-color-line-strong);
  border-radius: 12px;
  background: var(--d-code-bg);
}

.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--d-code-text);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  tab-size: 2;
  scrollbar-width: thin;
}

.code__lang + .code__copy + pre {
  padding-top: 34px;
}

.code__lang {
  position: absolute;
  top: 8px;
  left: 14px;
  color: var(--ib-color-meta);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.code__copy {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  padding: 3px 10px;
  border: 1px solid var(--ib-color-line-strong);
  border-radius: var(--ib-radius-pill);
  background: var(--ib-color-control);
  color: var(--ib-color-text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity var(--ib-duration-fast) ease, background var(--ib-duration-fast) ease;
}

.js .code__copy {
  display: inline-block;
}

.code__copy:hover,
.code__copy:focus-visible {
  background: var(--ib-color-control-hover);
  opacity: 1;
}

.code:not(:has(.code__lang)) pre {
  padding-right: 76px;
}

/* tables */

.table-wrap {
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--ib-color-line);
  border-radius: 12px;
  scrollbar-width: thin;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ib-color-line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--ib-color-surface);
  color: var(--ib-color-text);
  font-weight: 700;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td code {
  white-space: nowrap;
}

/* key combos stay on one line */
.prose td:has(> kbd) {
  white-space: nowrap;
}

/* callouts */

.callout {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--ib-color-accent-tint);
  border-radius: 14px;
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-text-2);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout p {
  margin: 0 0 8px;
}

.callout__label {
  color: var(--ib-color-accent-text);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.callout--tip {
  border-color: var(--ib-color-auto-ring);
  background: var(--ib-color-auto-soft);
}

.callout--tip .callout__label {
  color: var(--ib-color-auto-text);
}

.callout--warning,
.callout--important {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(245, 158, 11, 0.1);
}

.callout--warning .callout__label,
.callout--important .callout__label {
  color: var(--ib-color-tag-amber-text);
}

/* ---------- visual components (see the comment at the top of scripts/build-docs.mjs) ---------- */

/* screenshots: framed, rounded, shadowed; 2x images shown at half their pixel size */

.shot {
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 24px;
}

.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ib-color-line-strong);
  border-radius: 14px;
  background: var(--ib-color-surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--ib-color-meta);
  font-size: 13.5px;
  line-height: 1.45;
}

.prose > .shot:first-child {
  margin-top: 28px;
}

/* tag chips, as in the app */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: var(--ib-radius-chip);
  background: var(--ib-tag-soft, var(--ib-color-accent-soft));
  color: var(--ib-tag-text, var(--ib-color-accent-text));
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.chip--new {
  padding: 0 6px;
  border: 1px dashed var(--ib-tag-ring, var(--ib-color-accent-ring));
  background: transparent;
}

.chip--auto {
  background:
    linear-gradient(var(--ib-color-bg), var(--ib-color-bg)) padding-box,
    linear-gradient(95deg, var(--ib-tag-auto-from, var(--ib-color-auto-text)), var(--ib-tag-auto-text, var(--ib-color-accent-bright))) border-box;
  border: 1px solid transparent;
  color: var(--ib-tag-auto-text, var(--ib-color-text));
}

/* keycaps */

kbd {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

/* :::steps — numbered step cards */

.prose .steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
}

.prose .step {
  counter-increment: step;
  min-width: 0;
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 62px;
  border: 1px solid var(--ib-color-line);
  border-radius: 14px;
  background: var(--ib-color-surface);
}

.prose .step::before {
  content: counter(step);
  position: absolute;
  top: 12px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-accent-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.step__body {
  min-width: 0;
}

.step__body > :last-child {
  margin-bottom: 0;
}

.step__body p {
  margin: 0 0 8px;
}

.step__body .shot {
  max-width: min(100%, 460px);
  margin: 12px 0 4px;
}

.step__body .code {
  margin: 10px 0 2px;
}

/* :::cards — a grid of link cards */

.prose .cards {
  margin: 8px 0 28px;
  padding: 0;
}

.article:not(.article--home) .prose .cards {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.prose .cards li {
  margin: 0;
  padding: 0;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-accent-text);
}

.card__icon .icon {
  width: 19px;
  height: 19px;
}

.card:hover .card__icon {
  background: var(--ib-color-accent-tint);
}

.prose .card {
  color: inherit;
  text-decoration: none;
}

/* :::flow — boxes joined by arrows; a column on phones */

.prose .flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 30px;
  margin: 12px 0 28px;
  padding: 0;
  list-style: none;
}

.prose .flow__step {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 96px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--ib-color-line-strong);
  border-radius: 14px;
  background: var(--ib-color-surface);
  color: var(--ib-color-text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}

.flow__step + .flow__step::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -24px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background: var(--ib-color-meta);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.flow__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ib-color-accent-soft);
  color: var(--ib-color-accent-text);
}

.flow__icon .icon {
  width: 17px;
  height: 17px;
}

.flow__step:last-child .flow__icon {
  background: var(--ib-color-auto-soft);
  color: var(--ib-color-auto-text);
}

/* :::more — folded details */

.more {
  margin: 0 0 16px;
  border: 1px solid var(--ib-color-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.more > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--ib-color-text-2);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  border-radius: 12px;
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 2px;
  border-right: 2px solid var(--ib-color-meta);
  border-bottom: 2px solid var(--ib-color-meta);
  transform: rotate(-45deg);
  transition: transform var(--ib-duration-fast) ease;
}

.more[open] > summary::before {
  transform: rotate(45deg);
}

.more > summary code {
  overflow-wrap: normal;
}

.more > summary:hover {
  color: var(--ib-color-text);
  background: rgba(255, 255, 255, 0.03);
}

.more__body {
  padding: 4px 16px 4px;
  font-size: 15px;
}

.more__body > :first-child {
  margin-top: 4px;
}

.more__body .table-wrap,
.more__body .code {
  margin-bottom: 16px;
}

.prose .more + .more {
  margin-top: -6px;
}

/* home: popular tasks */

.is-home .prose h2 {
  margin: 40px 0 14px;
  padding-top: 0;
  border-top: 0;
  color: var(--ib-color-meta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.is-home .prose h2 .anchor {
  display: none;
}

/* home: "Popular tasks" as pill links */
.is-home .prose ul:not(.cards) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.is-home .prose ul:not(.cards) li {
  margin: 0;
  padding: 0;
}

.is-home .prose ul:not(.cards) a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--ib-color-line-strong);
  border-radius: var(--ib-radius-pill);
  background: var(--ib-color-surface);
  color: var(--ib-color-text-2);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--ib-duration-fast) ease, color var(--ib-duration-fast) ease;
}

.is-home .prose ul:not(.cards) a::after {
  content: '→';
  color: var(--ib-color-meta);
}

.is-home .prose ul:not(.cards) a:hover {
  border-color: var(--ib-color-accent-ring);
  color: var(--ib-color-text);
}

/* pager */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
}

.pager__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--ib-color-line);
  border-radius: var(--ib-radius-card);
  background: var(--ib-color-surface);
  text-decoration: none;
  transition: border-color var(--ib-duration-fast) ease;
}

.pager__link:hover {
  border-color: var(--ib-color-accent-ring);
}

.pager__link--next {
  grid-column: 2;
  text-align: right;
}

.pager__dir {
  color: var(--ib-color-meta);
  font-size: 13px;
  font-weight: 600;
}

.pager__title {
  color: var(--ib-color-text);
  font-weight: 700;
}

/* ---------- table of contents ---------- */

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--ib-color-line);
  color: var(--ib-color-muted);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--ib-duration-fast) ease, border-color var(--ib-duration-fast) ease;
}

.toc__item--h3 a {
  padding-left: 24px;
  font-size: 13px;
}

.toc a:hover {
  color: var(--ib-color-text);
}

.toc a.is-active {
  border-left-color: var(--ib-color-accent-bright);
  color: var(--ib-color-text);
}

.toc--side {
  display: none;
  position: sticky;
  top: var(--d-bar);
  align-self: start;
  max-height: calc(100dvh - var(--d-bar));
  overflow-y: auto;
  padding: 44px 0 40px;
  scrollbar-width: thin;
}

.toc__title {
  margin: 0 0 10px;
  color: var(--ib-color-meta);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc--inline {
  margin: 20px 0 0;
  border: 1px solid var(--ib-color-line);
  border-radius: 12px;
  background: var(--ib-color-surface);
}

.toc--inline summary {
  padding: 10px 16px;
  color: var(--ib-color-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.toc--inline ul {
  padding: 0 16px 12px;
}

@media (min-width: 1240px) {
  .toc--side {
    display: block;
  }

  .toc--inline {
    display: none;
  }
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--ib-color-line);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px var(--d-gutter) calc(28px + env(safe-area-inset-bottom));
  color: var(--ib-color-meta);
  font-size: 13.5px;
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  gap: 18px;
}

.foot a {
  color: var(--ib-color-muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--ib-color-text);
}

/* ---------- phones and small tablets ---------- */

@media (max-width: 899px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .js .bar__menu {
    display: inline-flex;
  }

  .bar__links a:not(.bar__cta) {
    display: none;
  }

  .bar__logo {
    height: 13px;
  }

  /* Without JS the sidebar sits above the page; with it, it's a drawer behind the menu button. */
  .nav {
    position: static;
    max-height: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--ib-color-line);
  }

  .js .nav {
    position: fixed;
    /* Full height under the bar (which stays on top), its links starting below it. */
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    width: min(320px, 86vw);
    max-height: none;
    padding: calc(var(--d-bar) + env(safe-area-inset-top) + 8px) 16px calc(24px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--ib-color-line);
    border-bottom: 0;
    background: var(--ib-color-surface);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform var(--ib-duration-base) var(--ib-ease), visibility 0s linear var(--ib-duration-base);
  }

  .js.nav-open .nav,
  .nav-open .nav {
    visibility: visible;
    transform: none;
    transition: transform var(--ib-duration-base) var(--ib-ease);
  }

  .nav__site {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--ib-color-line);
  }

  .nav__site a {
    padding: 6px 12px;
    color: var(--ib-color-nav-idle);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
  }

  .nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(8, 8, 12, 0.6);
  }

  .nav-open {
    overflow: hidden;
  }

  .article {
    padding: 28px 0 56px;
  }

  .anchor {
    display: none;
  }

  .prose h2 {
    font-size: 22px;
  }

  .lede {
    font-size: 17px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .prose .flow {
    flex-direction: column;
    gap: 22px;
  }

  .prose .flow__step {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    padding: 8px 12px;
  }

  .flow__step + .flow__step::before {
    top: -20px;
    left: 26px;
    transform: rotate(90deg);
  }

  .prose .step {
    padding: 12px 14px 12px 54px;
  }

  .prose .step::before {
    top: 10px;
    left: 12px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  /* Phone cards: icon on the left, title and line beside it. */
  .card:has(.card__icon) {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    padding: 14px 16px;
  }

  .card:has(.card__icon) .card__icon {
    grid-row: span 2;
    margin: 0;
  }

  .pager__link--next {
    grid-column: 1;
  }
}

@media (max-width: 899px) and (min-width: 0) {
  body:not(.nav-open) .nav {
    pointer-events: none;
  }

  .no-js body .nav {
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
