/* Studio docs (studio.oneinfer.ai/docs). Studio's own colours (src/index.css: paper-page and navy-page
   grounds, slate text, the cyan-600 accent) in Inter, as the app sets them, following light or dark.
   Hairline frames hold Studio's screens, labelled as demo data. Code is the one place a second,
   monospaced face appears. */


:root {
  --ground: #f4f6f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-dim: #475569;
  --rule: #e2e8f0;
  --rail: #cbd5e1;
  --shadow: rgb(15 23 42 / 0.16);
  --button-text: #ffffff;
  --button-hover: #155e75;
  --lamp: #67e8f9;
  --accent: #0e7490;
  --accent-fill: #0e7490;
  --code-ground: #eaeef4;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 3vw, 32px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --ground: #0a101f;
  --surface: #0f172a;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --rule: #1e2a47;
  --rail: #30446e;
  --shadow: rgb(0 0 0 / 0.5);
  --button-text: #ffffff;
  --button-hover: #155e75;
  --accent: #22d3ee;
  --accent-fill: #0e7490;
  --code-ground: #141f36;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top-h) + 24px);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--lamp);
  color: #0f172a;
}
a {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 200ms var(--ease);
}
a:hover {
  text-decoration-color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}
img {
  max-width: 100%;
  height: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--text);
  color: var(--button-text);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.35em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  font: 600 0.75rem/1.5 var(--sans);
  text-align: center;
  color: var(--text-dim);
}

/* ---------- The top rail ---------- */

/* The rail (64px) and Studio's menu under it (40px) stay at the top together. */
:root {
  --top-h: 104px;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.rail-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1360px;
  margin: 0 auto;
  height: 64px;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  height: 28px;
  width: auto;
}
.brand-docs {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.search-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  height: 38px;
  margin-left: clamp(8px, 4vw, 48px);
  padding: 0 10px 0 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-dim);
  font: 400 0.9375rem/1 var(--sans);
  cursor: pointer;
  transition: border-color 200ms var(--ease);
}
.search-button:hover {
  border-color: var(--rail);
}
.search-button span {
  flex: 1;
  text-align: left;
}
.search-button svg,
.search-form svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  flex-shrink: 0;
}
.rail-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 0.9375rem;
}
.rail-links > a:not(.button-small) {
  color: var(--text-dim);
  text-decoration: none;
}
.rail-links > a:not(.button-small):hover {
  color: var(--text);
}
.button-small {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 1.15em;
  border-radius: 10px;
  background: var(--accent-fill);
  color: var(--button-text);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 200ms var(--ease);
}
.button-small:hover {
  background: var(--button-hover);
}
.theme-button,
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.theme-button:hover,
.menu-button:hover {
  border-color: var(--rule);
  color: var(--text);
}
/* A half-filled disc: light or dark. */
.theme-button span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.menu-button {
  display: none;
  margin-left: -8px;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.menu-icon {
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.menu-icon::before {
  top: -6px;
}
.menu-icon::after {
  top: 6px;
}
.menu-button[aria-expanded='true'] .menu-icon {
  background: transparent;
}
.menu-button[aria-expanded='true'] .menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-button[aria-expanded='true'] .menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Signed out: the landing page's header ----------
   A copy of the app's StudioHeader for a signed-out visitor (Tailwind's slate and cyan, Studio's navy-card),
   so going from the landing to the docs or the blog keeps the same header. theme.js sets data-signed-in
   before the page paints: signed in, the rail above shows instead. */

:root:not([data-signed-in]) .rail,
:root[data-signed-in] .guestbar,
:root[data-signed-in] .nav-explore {
  display: none;
}
:root:not([data-signed-in]) {
  --top-h: 64px;
}
.guestbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 64px;
  padding: 0 12px;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid oklch(0.929 0.013 255.508 / 0.9);
  box-shadow: 0 4px 6px -1px oklch(0.929 0.013 255.508 / 0.5), 0 2px 4px -2px oklch(0.929 0.013 255.508 / 0.5);
  backdrop-filter: blur(40px);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 16px;
}
:root[data-theme='dark'] .guestbar {
  background: rgb(18 28 50 / 0.9);
  border-bottom-color: oklch(0.372 0.044 257.287 / 0.6);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
}
.guestbar .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.guestbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.guestbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.guest-logo {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 2px 0;
}
.guest-logo img {
  height: 28px;
  width: auto;
  max-width: 6rem;
  object-fit: contain;
  object-position: left;
  filter: brightness(1.1);
  transition: filter 200ms var(--ease);
}
.guest-logo:hover img {
  filter: brightness(1.25);
}
.guest-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.guest-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  color: oklch(0.446 0.043 257.281);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.guest-nav a:hover {
  color: oklch(0.129 0.042 264.695);
  background: oklch(0.968 0.007 247.896);
}
.guest-nav a[aria-current='page'] {
  color: oklch(0.52 0.105 223.128);
  background: oklch(0.984 0.019 200.873);
  border: 1px solid oklch(0.917 0.08 205.041);
  font-weight: 600;
}
:root[data-theme='dark'] .guest-nav a {
  color: oklch(0.704 0.04 256.788);
}
:root[data-theme='dark'] .guest-nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.06);
}
:root[data-theme='dark'] .guest-nav a[aria-current='page'] {
  color: oklch(0.865 0.127 207.078);
  background: oklch(0.715 0.143 215.221 / 0.15);
  border-color: oklch(0.715 0.143 215.221 / 0.3);
}
.guest-icon,
.guest-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid oklch(0.929 0.013 255.508);
  border-radius: 12px;
  background: oklch(0.968 0.007 247.896);
  color: oklch(0.372 0.044 257.287);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.guest-icon:hover {
  background: oklch(0.929 0.013 255.508);
  color: oklch(0.208 0.042 265.755);
}
:root[data-theme='dark'] .guest-icon {
  background: rgb(255 255 255 / 0.04);
  border-color: rgb(255 255 255 / 0.08);
  color: oklch(0.869 0.022 252.894);
}
:root[data-theme='dark'] .guest-icon:hover {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}
:root[data-theme='dark'] .when-light,
:root:not([data-theme='dark']) .when-dark {
  display: none;
}
.guest-menu {
  display: none;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: oklch(0.446 0.043 257.281);
}
.guest-menu .icon {
  width: 16px;
  height: 16px;
}
:root[data-theme='dark'] .guest-menu {
  color: oklch(0.869 0.022 252.894);
}
.guest-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.guest-signin {
  display: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: oklch(0.372 0.044 257.287);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.guest-signin:hover {
  color: oklch(0.129 0.042 264.695);
  background: oklch(0.968 0.007 247.896);
}
:root[data-theme='dark'] .guest-signin {
  color: oklch(0.869 0.022 252.894);
}
:root[data-theme='dark'] .guest-signin:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.06);
}
.guest-start {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #0e7490;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: filter 160ms var(--ease);
}
.guest-start:hover {
  filter: brightness(1.1);
}
.guest-start-long {
  display: none;
}
/* The phone menu's own copy of these links (the landing's Explore), above the docs. */
.nav-explore {
  display: none;
}
.explore-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
}
.explore-auth a:not(.button-small) {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
/* The sidebar's link style would otherwise turn the button into a plain link. */
.sidebar .explore-auth .button-small {
  display: inline-flex;
  justify-content: center;
  height: 40px;
  margin-left: 0;
  padding: 0 1.15em;
  background: var(--accent-fill);
  color: var(--button-text);
  font-weight: 600;
}
.sidebar .explore-auth .button-small:hover {
  background: var(--button-hover);
  color: var(--button-text);
}
.sidebar-site {
  display: none;
}

@media (min-width: 400px) {
  .guest-logo img {
    max-width: 8.5rem;
  }
}
@media (min-width: 640px) {
  .guestbar {
    padding: 0 16px;
  }
  .guest-logo img {
    height: 36px;
    max-width: none;
  }
  .guest-nav {
    gap: 8px;
    margin-left: 24px;
  }
  .guest-signin {
    display: inline-flex;
  }
  .guest-start-short {
    display: none;
  }
  .guest-start-long {
    display: inline;
  }
}
/* The row of links from 1024px, as on the landing; narrower, the menu button opens them. */
@media (min-width: 1024px) {
  .guest-nav {
    display: flex;
  }
}
.guest-nav a.wide-only {
  display: none;
}
@media (min-width: 1280px) {
  .guest-nav a.wide-only {
    display: flex;
  }
}
@media (min-width: 1280px) {
  :root:not([data-signed-in]) {
    --top-h: 72px;
  }
  .guestbar {
    height: 72px;
    gap: 16px;
    padding: 0 24px;
  }
  .guestbar-left {
    gap: 12px;
  }
  .guestbar-right {
    gap: 10px;
  }
  .guest-logo img {
    height: 40px;
  }
}
/* Below 1024px a signed-out reader gets the landing's links as Explore: at the top of the docs' sidebar (in
   the page down to 861px, then behind the menu button), or on the blog in a panel of their own. */
@media (max-width: 1023px) {
  .guest-menu:not(.guest-menu-docs) {
    display: inline-flex;
  }
  :root:not([data-signed-in]) .nav-explore {
    display: block;
    margin-bottom: 22px;
  }
  :root:not([data-signed-in]) .sidebar-site {
    display: block;
    position: fixed;
    top: var(--top-h);
    left: 0;
    z-index: 15;
    width: 100%;
    height: calc(100dvh - var(--top-h));
    max-height: none;
    overflow-y: auto;
    padding: 20px var(--gutter) 48px;
    background: var(--ground);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 240ms;
  }
  :root:not([data-signed-in]) .sidebar-site[data-open] {
    transform: none;
    visibility: visible;
  }
}
@media (max-width: 860px) {
  .guest-menu-docs {
    display: inline-flex;
  }
}

/* ---------- Three columns: the docs, the page, what's on it ---------- */

.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 220px;
  gap: clamp(28px, 4vw, 56px);
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sidebar {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  max-height: calc(100vh - var(--top-h));
  overflow-y: auto;
  padding: 28px 8px 40px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--rail) transparent;
}
.nav-section + .nav-section {
  margin-top: 22px;
}
.nav-title {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.sidebar ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.sidebar a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.sidebar a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
}

main {
  min-width: 0;
  padding: 44px 0 72px;
}
article {
  max-width: 720px;
}
.toc {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  padding: 44px 0 40px;
  font-size: 0.875rem;
}
.toc-title {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 0.8125rem;
}
.toc li {
  border-left: 1px solid var(--rule);
}
.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--text-dim);
  line-height: 1.4;
  text-decoration: none;
}
.toc a:hover {
  color: var(--text);
}
.toc a[aria-current='true'] {
  color: var(--text);
  border-left-color: var(--text);
}

/* ---------- The page's words ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.eyebrow a {
  color: var(--text-dim);
  text-decoration: none;
}
.eyebrow a:hover {
  color: var(--text);
}
h1,
h2,
h3,
h4 {
  font-weight: 600;
  text-wrap: balance;
  color: var(--text);
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.lead {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}
article > .lead + * {
  margin-top: 36px;
}
h2 {
  margin: 56px 0 0;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
}
h3 {
  margin: 34px 0 0;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h4 {
  margin: 24px 0 0;
  font-size: 1rem;
}
h2 + *,
h3 + *,
h4 + * {
  margin-top: 12px;
}
.anchor {
  float: left;
  margin-left: -1.1em;
  padding-right: 0.3em;
  color: var(--rail);
  text-decoration: none;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus {
  opacity: 1;
}
p,
ul,
ol,
dl {
  margin: 16px 0 0;
  text-wrap: pretty;
}
article p,
article li {
  max-width: 68ch;
}
ul,
ol {
  padding-left: 1.3em;
}
li + li {
  margin-top: 6px;
}
li > ul,
li > ol {
  margin-top: 6px;
}
li::marker {
  color: var(--text-dim);
}
strong {
  font-weight: 600;
}
article code {
  padding: 0.12em 0.36em;
  border-radius: 5px;
  background: var(--code-ground);
  font: 0.875em/1.4 var(--mono);
}
hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Numbered steps: a hairline rail with each number on it. */
article ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}
article ol > li {
  position: relative;
  counter-increment: step;
  padding-left: 40px;
  min-height: 28px;
}
article ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
article ol > li + li {
  margin-top: 12px;
}

/* ---------- Screenshots, code, tables, notes ---------- */

.shot {
  margin: 28px 0 0;
}
.shot figcaption {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dim);
}
.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 18px 40px -22px var(--shadow);
  background: var(--surface);
}
.shot video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 640px);
  margin-inline: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 18px 40px -22px var(--shadow);
  background: #000;
  object-fit: contain;
}
.samples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}
.samples > p {
  margin: 0;
}
.samples .shot {
  margin: 0;
}
.shot + p,
.shot + ul,
.shot + ol {
  margin-top: 24px;
}

.code {
  position: relative;
  margin: 20px 0 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font: 0.84375rem/1.6 var(--mono);
  tab-size: 2;
}
.code-lang {
  position: absolute;
  left: 18px;
  top: -0.7em;
  padding: 0 6px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}
.copy {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dim);
  font: 600 0.75rem/1 var(--sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms var(--ease), color 160ms var(--ease);
}
.code:hover .copy,
.copy:focus-visible,
.copy[data-done] {
  opacity: 1;
}
.copy:hover {
  color: var(--text);
}

.table {
  margin: 20px 0 0;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--rule);
}
thead th {
  border-top: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dim);
}
td:first-child {
  font-weight: 600;
}

.callout {
  margin: 24px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--text);
  border-radius: 10px;
  background: var(--surface);
}
.callout-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.callout p:not(.callout-title) {
  margin-top: 4px;
}
.callout-tip {
  border-left-color: var(--rail);
}
blockquote {
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--rule);
  color: var(--text-dim);
}

/* Cards on the docs home: a ruled list of where to go. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  background: var(--rule);
}
.cards li {
  margin: 0;
  max-width: none;
  background: var(--surface);
}
.cards a {
  display: block;
  height: 100%;
  padding: 18px 20px 20px;
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.cards a:hover {
  background: color-mix(in srgb, var(--text) 3%, var(--surface));
}
.cards strong {
  display: block;
  font-size: 1.0625rem;
}
.cards span {
  display: block;
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------- Previous / next, and the foot ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 720px;
  margin-top: 64px;
}
.pager a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 160ms var(--ease);
}
.pager a:hover {
  border-color: var(--rail);
}
.pager a span {
  display: block;
  margin-bottom: 2px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-dim);
}
.pager-next {
  grid-column: 2;
  text-align: right;
}
.page-foot {
  max-width: 720px;
  margin-top: 28px;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.page-foot a {
  color: var(--text-dim);
}
.site-foot {
  border-top: 1px solid var(--rule);
}
.site-foot-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.site-foot-inner p {
  margin: 4px 0 0;
}
.site-foot a {
  color: var(--text-dim);
}

/* ---------- Search ---------- */

.search {
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 48px -24px var(--shadow);
}
.search::backdrop {
  background: rgb(10 16 31 / 0.5);
}
.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--rule);
}
.search-form input {
  flex: 1;
  height: 54px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 400 1.0625rem var(--sans);
  outline: none;
}
.search-form input::-webkit-search-cancel-button {
  display: none;
}
.search-close {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: 600 0.75rem var(--sans);
  cursor: pointer;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: calc(min(70vh, 640px) - 56px);
  overflow-y: auto;
}
.search-results li {
  margin: 0;
}
.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.search-results a:hover,
.search-results a[aria-selected='true'] {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.search-results strong {
  display: block;
  font-size: 0.9375rem;
}
.search-results span {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.search-results .search-in {
  display: inline;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
}
.search-results mark {
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
.search-empty {
  padding: 18px 12px;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* Studio's own menu under the rail: every part of the app one click away, in the same window. */
.appbar {
  border-top: 1px solid var(--rule);
}
.appbar-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 1360px;
  height: 40px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.appbar-inner::-webkit-scrollbar {
  display: none;
}
.appbar a {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.appbar a:first-child {
  margin-left: -10px;
}
.appbar a:hover {
  color: var(--text);
  background: var(--surface);
}
.appbar a:focus-visible {
  outline: 2px solid var(--accent-fill);
  outline-offset: -2px;
}

/* ---------- The blog: the post and what's on it, no sidebar ---------- */

.layout.layout-blog {
  grid-template-columns: minmax(0, 1fr) 220px;
  max-width: 1080px;
}
.post-cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 32px 0 8px;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.post-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  max-width: 760px;
}
.post-card a {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.post-card a:hover {
  border-color: var(--rail);
  box-shadow: 0 10px 28px -18px var(--shadow);
}
.post-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border-radius: 10px;
}
.post-card h2 {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  font-size: 1.3125rem;
  line-height: 1.3;
}
.post-card p {
  margin: 8px 0 0;
  color: var(--text-dim);
  line-height: 1.55;
}
.post-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.post-list-compact {
  margin-top: 16px;
}
.post-list-compact .post-card a {
  padding: 16px 18px;
}
.post-list-compact .post-card h2 {
  font-size: 1.0625rem;
}
.post-list-compact .post-card img {
  display: none;
}
.post-cta {
  margin: 44px 0 0;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.post-cta p {
  margin: 0;
  max-width: 48ch;
  font-weight: 500;
}
.post-docs {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 0.9375rem;
}
.post-more {
  max-width: 720px;
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  .layout.layout-blog {
    grid-template-columns: minmax(0, 1fr);
    max-width: 800px;
  }
  .toc {
    display: none;
  }
}
@media (max-width: 860px) {
  .layout {
    display: block;
  }
  .menu-button {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--top-h));
    height: calc(100dvh - var(--top-h));
    z-index: 15;
    max-height: none;
    padding: 20px var(--gutter) 48px;
    background: var(--ground);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 240ms;
  }
  .sidebar[data-open] {
    transform: none;
    visibility: visible;
  }
  .search-button {
    width: 38px;
    margin-left: auto;
    padding: 0;
    justify-content: center;
  }
  .search-button span,
  .search-button kbd {
    display: none;
  }
  .rail-links {
    margin-left: 0;
    gap: 6px;
  }
  .rail-links > a:not(.button-small) {
    display: none;
  }
  .brand-docs {
    padding-left: 10px;
  }
  main {
    padding-top: 28px;
  }
}
@media (max-width: 520px) {
  .rail-inner {
    gap: 10px;
  }
  .brand img {
    height: 22px;
  }
  .brand {
    gap: 9px;
  }
  .brand-docs {
    padding-left: 9px;
    font-size: 1rem;
  }
  .button-small {
    height: 36px;
    padding: 0 0.85em;
    font-size: 0.875rem;
  }
  .theme-button {
    display: none;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager-next {
    grid-column: 1;
  }
  h2 {
    margin-top: 44px;
    padding-top: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .rail,
  .guestbar,
  .sidebar,
  .toc,
  .pager,
  .site-foot,
  .copy {
    display: none !important;
  }
  .layout {
    display: block;
  }
  body {
    background: #fff;
  }
}

/* Links inside the text take Studio's cyan (cyan-700 on light, cyan-400 on dark: both over 4.5:1). */
article a:not(.anchor):not(.button-small),
.page-foot a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
article a:not(.anchor):not(.button-small):hover,
.page-foot a:hover {
  text-decoration-color: var(--accent);
}
