/* Docs pages: a page list on the left (a menu on phones), a reading column, and roomy code.
   Loads after blog.css and reuses its prose rules; everything here is scoped to .docs-page. */
.docs-page { --docs-top: 140px; }
/* Light: borders are grey ink with a hint of sage, to sit with the page. */
:root[data-theme="light"] .docs-page { --theme-line: color-mix(in srgb, color-mix(in srgb, var(--palette-holly-600) 35%, var(--theme-ink)) 17%, transparent); }
.docs-shell { width: min(1280px, calc(100% - 2 * clamp(20px, 5vw, 64px))); margin: 24px auto 80px; color: var(--theme-ink); }

/* The site-wide main rule (styles.css) adds padding and a two-column grid; the docs column needs neither. */
.docs-main { display: block; width: auto; max-width: none; min-width: 0; margin: 0; padding: 0; }

/* Page list. Phones: one menu button showing the current page. */
.docs-side { margin: 0 0 32px; }
.docs-menu > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary svg { flex: none; color: var(--theme-ink-muted); transition: transform .15s ease; }
.docs-menu[open] > summary svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .docs-menu > summary svg { transition: none; } }
.docs-menu nav { margin-top: 8px; padding: 8px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); }
.docs-pages, .docs-toc { list-style: none; margin: 0; padding: 0; }
.docs-pages a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--theme-ink-muted); font-size: 15px; line-height: 1.3; text-decoration: none; }
.docs-pages a:hover { color: var(--theme-ink); background: var(--theme-surface-raised-strong); }
.docs-pages a[aria-current="page"] { color: var(--theme-ink-strong); background: var(--theme-surface-raised-strong); font-weight: 600; }
.docs-icon { flex: none; color: var(--theme-ink-faint); }
.docs-pages a[aria-current="page"] .docs-icon { color: var(--theme-ink-strong); }
.docs-toc-nested { margin: 4px 0 8px 19px; padding-left: 12px; border-left: 1px solid var(--theme-line); }
.docs-toc-nested a { font-size: 14px; padding: 6px 12px; }
.docs-toc-nested a[aria-current="location"] { color: var(--theme-ink-strong); font-weight: 600; background: none; }

/* Heading block: docs-sized, not the marketing page title. */
.docs-head { max-width: 720px; margin: 0 0 32px; }
.docs-head h1 { font-size: clamp(1.75rem, 1.4rem + 2vw, 2.75rem); line-height: 1.1; letter-spacing: -.03em; margin: 8px 0 16px; }
.docs-lede { font-size: 18px; line-height: 1.55; color: var(--theme-ink-soft); margin: 0; }
.docs-page .blog-meta a { color: inherit; text-underline-offset: 3px; }

/* Reading column. */
.docs-prose { max-width: 720px; font-size: 16px; line-height: 1.7; }
.docs-prose p, .docs-prose ul, .docs-prose ol { margin-bottom: 20px; }
.docs-prose h2 { font-size: 24px; line-height: 1.25; margin: 48px 0 16px; }
.docs-prose h3 { font-size: 19px; line-height: 1.35; margin: 32px 0 12px; }
.docs-prose h2, .docs-prose h3 { scroll-margin-top: calc(var(--docs-top) + 16px); }
.docs-prose li + li { margin-top: 8px; }
.docs-prose blockquote { margin: 24px 0; padding: 14px 18px; }

/* Numbered steps ("Step 1: ..." headings, see docsHeadings in eleventy.config.js), drawn like the homepage:
   chunky sage chips for the numbers, joined by the dotted circuit line. As you read, the steps you have
   reached get a check, and after the last step the bolt lights up. The line itself stays still.
   Phones: the chip sits beside the title and the content keeps the full width (no line). */
.docs-page .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The nudge centres the 32px chip on the title's first line (h2 line height minus 32, halved). */
.docs-step { --docs-step-nudge: 0px; position: relative; display: flow-root; }
.docs-step h2 { display: flex; align-items: flex-start; gap: 12px; }
.docs-step-num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-top: var(--docs-step-nudge); border: 1px solid var(--chip-outline, var(--theme-line)); border-radius: 10px; background: var(--chip-face, var(--theme-surface-raised)); box-shadow: 0 3px 0 var(--chip-edge, var(--theme-line)); font-family: var(--font-heading); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--theme-ink); font-variant-numeric: tabular-nums; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
/* The step you are on is pressed in, like the selected chip on the homepage; the chip keeps its colour. */
.docs-step.is-current .docs-step-num { transform: translateY(2px); box-shadow: 0 1px 0 var(--chip-edge, var(--theme-line)); border-color: var(--theme-ink-faint); }
/* Done steps swap the number for a check, as the product and the CLI (✓) mark finished steps. */
.docs-step-num svg { display: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.docs-step.is-done .docs-step-num span { display: none; }
.docs-step.is-done .docs-step-num svg { display: block; color: var(--hl-strong); }
.docs-wire, .docs-wire-end { display: none; }

/* Inline code: a light chip with a soft edge, tinted from the page background. */
.docs-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--theme-ink) 14%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--theme-ink) 6%, var(--theme-surface)); color: var(--theme-ink-strong); overflow-wrap: anywhere; }
:root[data-theme="light"] .docs-prose :not(pre) > code:not(.docs-msg-line) { background: oklch(from var(--theme-surface) calc(l - 0.018) calc(c + 0.004) h); border-color: var(--theme-line); }

/* Logos (lib/docs-enhance.js adds them before macOS, Windows and agent names). */
.docs-logo { flex: none; width: 16px; height: 16px; }
/* These two files are drawn light, for dark backgrounds. */
:root[data-theme="light"] img.docs-logo[src*="openai"], :root[data-theme="light"] img.docs-logo[src*="cursor"] { filter: invert(1); }
.docs-prose h3.docs-platform { display: flex; align-items: center; gap: 10px; }
.docs-prose h3.docs-platform .docs-logo { width: 18px; height: 18px; color: var(--theme-ink-strong); }
.docs-logo-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.docs-prose .docs-logo-list li { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px 6px 10px; border: 1px solid var(--theme-line); border-radius: 999px; background: var(--theme-surface-raised); font-size: 15px; line-height: 1.4; }

/* Tables for "Label: detail" lists. Phones stack each row, label above detail. */
.docs-table-wrap { margin: 0 0 24px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); overflow: hidden; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.docs-table tr + tr { border-top: 1px solid var(--theme-line); }
.docs-table th, .docs-table td { display: block; padding: 12px 16px; text-align: left; vertical-align: top; }
.docs-table th { padding-bottom: 0; font-weight: 600; color: var(--theme-ink-strong); }
.docs-label { display: inline-flex; align-items: center; gap: 8px; }

/* Callouts ("Agents:", "Person needed:"): an icon beside the note, on a light sage tint. */
.docs-prose .docs-callout { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; border-color: color-mix(in srgb, var(--hl-strong) 30%, transparent); background: color-mix(in srgb, var(--hl-strong) 8%, var(--theme-surface-raised)); }
.docs-callout > :not(svg) { grid-column: 2; }
.docs-callout-icon { width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: var(--hl-strong); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Troubleshooting: one table of messages. Each row pairs the message (as the terminal prints it) with its fix;
   phones stack the fix under the message, wider screens put them side by side. */
.docs-msg-group { margin: 0 0 32px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); overflow: hidden; }
.docs-msg-item { display: grid; gap: 8px; padding: 16px; }
.docs-msg-item + .docs-msg-item { border-top: 1px solid var(--theme-line); }
.docs-prose h3.docs-msg { margin: 0; font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.4; }
.docs-msg-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--theme-ink-strong); }
.docs-prose .docs-msg code.docs-msg-line { display: block; padding: 0; border: 0; border-radius: 0; background: none; color: var(--theme-ink-strong); font-size: 14px; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
.docs-msg-fix { font-size: 16px; }
.docs-msg-fix > :last-child { margin-bottom: 0; }

/* Code blocks: roomy. docs.js wraps each in .docs-code with a header bar (language and copy button). */
.docs-prose pre { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); line-height: 1.65; }
.docs-code { margin: 0 0 24px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface-raised); overflow: hidden; }
.docs-code-bar { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 4px 0 18px; border-bottom: 1px solid var(--theme-line); background: color-mix(in srgb, var(--theme-ink) 6%, var(--theme-surface-raised)); font-size: 12px; color: var(--theme-ink-muted); }
/* Light: the page background's own grey, a step darker (same hue and chroma, so it matches). */
:root[data-theme="light"] .docs-code-bar { background: oklch(from var(--theme-surface) calc(l - 0.03) c h); }
.docs-code pre { margin: 0; border: 0; border-radius: 0; }
.docs-prose pre code { padding: 0; border: 0; background: none; font-size: 13.5px; overflow-wrap: normal; white-space: pre; }
/* The button is 44px tall for touch, overlapping the 34px bar; it has no fill, so only the icon shows. */
.docs-copy { display: grid; place-items: center; width: 40px; height: 44px; margin: -5px 0 -5px auto; border: 0; border-radius: 10px; background: none; color: var(--theme-ink-muted); cursor: pointer; }
.docs-copy:hover { color: var(--theme-ink-strong); }
.docs-copy:focus-visible { outline: 2px solid var(--palette-holly-400); outline-offset: 2px; }

/* Previous and next page. */
.docs-pager { display: grid; gap: 12px; max-width: 720px; margin: 56px 0 0; }
.docs-pager a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 72px; padding: 12px 20px; border: 1px solid var(--theme-line); border-radius: 12px; color: var(--theme-ink); font-weight: 600; text-decoration: none; }
.docs-pager a:hover { box-shadow: 0 0 0 1px var(--theme-accent-edge); }
.docs-pager small { font-size: 13px; font-weight: 400; color: var(--theme-ink-muted); }
.docs-next { align-items: flex-end; text-align: right; }

/* On this page: only on wide screens, where it gets its own column. */
.docs-rail { display: none; }


/* Mac and Windows toggle (docs.js): pick a platform once, for every section that has both. */
.docs-platform-toggle { display: flex; gap: 8px; margin: 0 0 20px; }
.docs-platform-toggle button { min-height: 44px; padding: 0 18px; border: 1px solid var(--theme-line); border-radius: 999px; background: none; color: var(--theme-ink-soft); font: inherit; font-size: 15px; cursor: pointer; }
.docs-platform-toggle button:hover { border-color: var(--theme-ink-soft); }
.docs-platform-toggle button[aria-pressed="true"] { border-color: var(--theme-ink); color: var(--theme-ink); font-weight: 600; }
.docs-platform-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 768px) {
  .docs-shell { margin-top: 40px; }
  .docs-prose { font-size: 17px; }
  .docs-prose h2 { font-size: 28px; }
  .docs-prose h3 { font-size: 20px; }
  .docs-prose pre code { font-size: 14px; }
  /* Wide enough for commands: keep one like `--forget` whole instead of splitting it at the hyphens.
     Phones keep inline wrapping, since long paths would become full-width boxes there. */
  .docs-prose :is(p, li) > code { display: inline-block; max-width: 100%; line-height: 1.5; }
  .docs-pager { grid-template-columns: 1fr 1fr; }
  .docs-table th, .docs-table td { display: table-cell; padding: 12px 16px; }
  .docs-table th { width: 26%; }
  /* Steps: content indented beside the chip, and the wire from each chip to the next (or to the bolt). */
  .docs-step { --docs-step-nudge: 1.5px; padding-left: 52px; }
  .docs-step h2 { gap: 20px; margin-left: -52px; }
  /* An SVG does not stretch between top and bottom like a box does, so its height is set from the same numbers. */
  .docs-step { --docs-wire-top: calc(48px + var(--docs-step-nudge) + 32px + 10px); }
  .docs-wire { display: block; position: absolute; left: 15px; top: var(--docs-wire-top); width: 2px; height: calc(100% - var(--docs-wire-top) + 38px); overflow: visible; }
  .docs-step-last { padding-bottom: 56px; }
  .docs-step-last .docs-wire { height: calc(100% - var(--docs-wire-top) - 42px); }
  .docs-wire line { fill: none; stroke-width: 2; stroke-linecap: round; }
  .docs-wire-line { stroke: color-mix(in srgb, var(--theme-ink) 22%, transparent); stroke-dasharray: 0 8; }
  .docs-wire-end { display: grid; place-items: center; position: absolute; left: 0; bottom: 0; width: 32px; height: 32px; border: 1px solid var(--chip-outline, var(--theme-line)); border-radius: 50%; background: var(--chip-face, var(--theme-surface-raised)); box-shadow: 0 3px 0 var(--chip-edge, var(--theme-line)); color: var(--theme-ink-faint); transition: color .3s ease, background .3s ease, box-shadow .3s ease; }
  /* The logo mark from the header. Grey until the steps are done, then its own two golds. */
  .docs-wire-end svg { width: 17px; height: 15px; fill: currentColor; }
  /* Powered: reaching the end of the last step lights the mark in its brand golds, with one pulse. */
  .docs-step.is-powered .docs-wire-end { border-color: var(--theme-accent-edge); box-shadow: 0 3px 0 var(--theme-accent-edge); animation: docs-powered .9s ease-out 1; }
  .docs-step.is-powered .docs-bolt-a { fill: var(--palette-golden-400); }
  .docs-step.is-powered .docs-bolt-b { fill: var(--palette-golden-500); }
  .docs-next { grid-column: 2; }
  .docs-msg-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; }
}

/* Sidebar: the page list stays open and sticks beside the content.
   Its -12px margin pulls the links' padding out, so their text lines up with the logo above. */
@media (min-width: 1024px) {
  .docs-page { --docs-top: 104px; }
  .docs-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 72px; margin-top: 56px; }
  .docs-side { position: sticky; top: var(--docs-top); align-self: start; max-height: calc(100vh - var(--docs-top) - 24px); overflow-y: auto; margin: 0 0 0 -12px; }
  .docs-menu > summary { display: none; }
  .docs-menu nav { margin: 0; padding: 0; border: 0; background: none; }
  .docs-pages a { min-height: 38px; }
  .docs-toc-nested a { min-height: 32px; padding: 4px 12px; }
}

/* Wide screens: sections move to their own column on the right, like the page lists in the references. */
@media (min-width: 1280px) {
  .docs-shell { grid-template-columns: 232px minmax(0, 720px) 200px; justify-content: space-between; gap: 56px; }
  .docs-toc-nested { display: none; }
  .docs-rail { display: block; position: sticky; top: var(--docs-top); align-self: start; max-height: calc(100vh - var(--docs-top) - 24px); overflow-y: auto; }
  .docs-rail-title { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--theme-ink-strong); }
  .docs-rail .docs-toc { border-left: 1px solid var(--theme-line); }
  .docs-rail .docs-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 1px solid transparent; font-size: 13px; line-height: 1.45; color: var(--theme-ink-muted); text-decoration: none; }
  .docs-rail .docs-toc a:hover { color: var(--theme-ink); }
  .docs-rail .docs-toc a[aria-current="location"] { color: var(--theme-ink-strong); border-left-color: var(--theme-ink-strong); font-weight: 600; }
}

@keyframes docs-powered { 0% { box-shadow: 0 3px 0 var(--theme-accent-edge), 0 0 0 0 color-mix(in srgb, var(--theme-accent) 55%, transparent); } 100% { box-shadow: 0 3px 0 var(--theme-accent-edge), 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) {
  .docs-step-num, .docs-wire-end { transition: none; }
  .docs-step.is-powered .docs-wire-end { animation: none; }
}

