/* The Ai8 guide (ai8.io/guide). Tokens are the app's, copied from ../index.html — which copies them
   from apps/web/src/index.css — so a token changed there is changed here too. Light is normative,
   dark overrides the same names, nothing below branches on theme. */
@font-face { font-family: "Inter Variable"; src: url("/fonts/Inter-Variable-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --shell: #f4f4f6; --material: #f9f9fb; --content: #ffffff; --raised: #ffffff; --grouped: #f6f6f8;
  --hairline: rgba(18, 18, 26, .075); --edge: #e5e5ea; --control-edge: #cfcfd6; --press: rgba(18, 18, 26, .12);
  --ink: #17171c; --secondary: #5a5a64; --tertiary: #6e6e78;
  --brand-primary: #47194e; --brand-highlight: #fd5220;
  --accent: #5b54e6; --accent-hover: #4a42d6; --accent-press: #3f37c8; --accent-wash: rgba(91, 84, 230, .09); --on-accent: #ffffff;
  --ok: #12794a; --ok-wash: rgba(23, 160, 94, .11); --danger: #d92d20; --danger-wash: rgba(217, 45, 32, .09);
  --syn-keyword: #af3eaf; --syn-string: #c41a16; --syn-number: #1c00cf; --syn-function: #326d74; --syn-comment: #6f6f79;
  --avatar-from: #c7d2fe; --avatar-to: #a5b4fc; --avatar-ink: #3730a3;
  /* matplotlib's default `tab:blue`: the mock's chart is user output, which the product never restyles. */
  --chart-bar: #1f77b4;
  /* The closing band is the identity's one large field of colour: aubergine, in both themes. */
  --band: #47194e; --band-ink: #ffffff; --band-secondary: rgba(255, 255, 255, .8); --band-edge: rgba(255, 255, 255, .34); --band-press: rgba(255, 255, 255, .12);
  --band-plane-a: #e0c5e3; --band-plane-b: #ff8458;
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, .06);
  --shadow-window: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 72px rgba(23, 23, 28, .14);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --font: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --shell: #131316; --material: #1b1b1f; --content: #222228; --raised: #2c2c33; --grouped: #191920;
    --hairline: rgba(255, 255, 255, .085); --edge: #3b3b44; --control-edge: #4a4a55; --press: rgba(255, 255, 255, .14);
    --ink: #f4f4f6; --secondary: #a2a2ac; --tertiary: #95959f;
    --brand-primary: #e0c5e3; --brand-highlight: #ff8458;
    --accent: #8f88ff; --accent-hover: #a8a2ff; --accent-press: #bdb8ff; --accent-wash: rgba(143, 136, 255, .17); --on-accent: #16142c;
    --ok: #45c87f; --ok-wash: rgba(69, 200, 127, .14); --danger: #ff6e66; --danger-wash: rgba(255, 110, 102, .14);
    --syn-keyword: #ff7ab2; --syn-string: #ff8170; --syn-number: #d9c97c; --syn-function: #78c2b0; --syn-comment: #8a8a94;
    --avatar-from: #3e3a7a; --avatar-to: #322e66; --avatar-ink: #cfcbff;
    --band: #2a1230;
    --shadow-lift: 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-window: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 72px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --shell: #131316; --material: #1b1b1f; --content: #222228; --raised: #2c2c33; --grouped: #191920;
  --hairline: rgba(255, 255, 255, .085); --edge: #3b3b44; --control-edge: #4a4a55; --press: rgba(255, 255, 255, .14);
  --ink: #f4f4f6; --secondary: #a2a2ac; --tertiary: #95959f;
  --brand-primary: #e0c5e3; --brand-highlight: #ff8458;
  --accent: #8f88ff; --accent-hover: #a8a2ff; --accent-press: #bdb8ff; --accent-wash: rgba(143, 136, 255, .17); --on-accent: #16142c;
  --ok: #45c87f; --ok-wash: rgba(69, 200, 127, .14); --danger: #ff6e66; --danger-wash: rgba(255, 110, 102, .14);
  --syn-keyword: #ff7ab2; --syn-string: #ff8170; --syn-number: #d9c97c; --syn-function: #78c2b0; --syn-comment: #8a8a94;
  --avatar-from: #3e3a7a; --avatar-to: #322e66; --avatar-ink: #cfcbff;
  --band: #2a1230;
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-window: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 72px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--content); color: var(--ink);
  font: 400 16px/1.65 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, figure, pre, dl, dd { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: 12px; top: 12px; transform: translateY(-200%); background: var(--raised); color: var(--ink); padding: 8px 12px; border-radius: 6px; box-shadow: var(--shadow-lift); z-index: 30; }
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--spring), border-color 160ms var(--spring), color 160ms var(--spring);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--control-edge); }
.btn-outline:hover { background: var(--hairline); }
.btn-outline:active { background: var(--press); }
.btn-quiet { background: transparent; color: var(--ink); padding: 0 10px; }
.btn-quiet:hover { background: var(--hairline); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.arrow { transition: transform 160ms var(--spring); }
a:hover > .arrow, .btn:hover .arrow { transform: translateX(2px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--content) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.lockup { display: inline-flex; align-items: center; text-decoration: none; border-radius: 6px; flex: none; }
.lockup svg { height: 30px; width: auto; display: block; }
.lockup .p { fill: var(--brand-primary); }
.lockup .h { fill: var(--brand-highlight); }
.crumb { color: var(--secondary); font-size: 15px; font-weight: 600; text-decoration: none; padding: 6px 8px; border-radius: 6px; border-left: 1px solid var(--edge); border-top-left-radius: 0; border-bottom-left-radius: 0; padding-left: 14px; margin-left: 2px; }
.crumb:hover { color: var(--ink); }
.roles { display: none; gap: 2px; margin-left: 4px; }
.roles a { text-decoration: none; color: var(--secondary); font-size: 14.5px; font-weight: 500; padding: 6px 10px; border-radius: 6px; transition: color 160ms var(--spring), background-color 160ms var(--spring); }
.roles a:hover { color: var(--ink); background: var(--hairline); }
.roles a[aria-current="page"] { color: var(--ink); background: var(--accent-wash); }
@media (min-width: 720px) { .roles { display: flex; } }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }

/* ---------------------------------------------------------------- search */
.search { position: relative; min-width: 0; }
.search input {
  width: 100%; height: 36px; border-radius: 8px; border: 1px solid var(--control-edge); background: var(--content); color: var(--ink);
  font: 400 14.5px/1 var(--font); padding: 0 34px 0 34px; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--tertiary); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.search svg { position: absolute; left: 10px; top: 10px; width: 16px; height: 16px; color: var(--tertiary); pointer-events: none; }
.search kbd { position: absolute; right: 8px; top: 8px; pointer-events: none; }
.site-header .search { width: 44vw; max-width: 300px; }
.results {
  position: absolute; right: 0; top: 44px; width: min(92vw, 460px); max-height: min(70vh, 520px); overflow: auto; z-index: 25;
  background: var(--raised); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--shadow-window); padding: 6px; list-style: none;
}
.hero .results { left: 0; right: auto; width: 100%; }
.results a { display: block; text-decoration: none; padding: 9px 12px; border-radius: 8px; }
.results a:hover, .results a.on { background: var(--accent-wash); }
.results .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.results .w { color: var(--tertiary); font-size: 12.5px; }
.results .s { color: var(--secondary); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results .none { padding: 12px; color: var(--secondary); font-size: 14px; }
.results mark { background: var(--accent-wash); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------------------------------------------------------------- type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent); font-size: 13px; font-weight: 600; line-height: 18px;
}
h1 { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(25px, 3.2vw, 32px); line-height: 1.15; letter-spacing: -.026em; font-weight: 700; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.35; letter-spacing: -.014em; font-weight: 600; }
h4 { font-size: 15.5px; line-height: 1.4; font-weight: 600; }
.lead { font-size: clamp(17px, 2vw, 19.5px); line-height: 1.55; color: var(--secondary); text-wrap: pretty; }
kbd {
  display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--control-edge); border-bottom-width: 2px;
  background: var(--material); font: 500 12.5px/20px var(--font); text-align: center; white-space: nowrap; vertical-align: 1px;
}
.ui { font-weight: 600; white-space: nowrap; }
.quote { color: var(--secondary); font-style: italic; }

/* ---------------------------------------------------------------- hub */
.hero { padding: 56px 0 40px; background: var(--shell); border-bottom: 1px solid var(--hairline); }
.hero h1 { margin-top: 18px; max-width: 780px; }
.hero .lead { margin-top: 18px; max-width: 660px; }
.hero .search { margin-top: 28px; max-width: 520px; }
.hero .search input { height: 46px; font-size: 16px; border-radius: 10px; padding-left: 40px; }
.hero .search svg { left: 13px; top: 15px; }
.hero .search kbd { top: 13px; right: 12px; }
.hero .applink { margin-top: 16px; font-size: 15px; color: var(--secondary); }
.hero .applink a { color: var(--accent); font-weight: 600; }
.hero .gives { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.hero .gives a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border: 1px solid var(--edge); border-radius: 999px; background: var(--content); color: var(--ink); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.hero .gives a:hover { border-color: var(--control-edge); box-shadow: var(--shadow-lift); }
.hero .gives svg { width: 17px; height: 17px; color: var(--brand-primary); flex: none; }
.hero .gives .pill { font-size: 11.5px; padding: 1px 8px; }
@media (min-width: 900px) { .hero { padding: 80px 0 56px; } }
.paths { display: grid; gap: 16px; margin-top: -1px; padding: 40px 0 8px; }
@media (min-width: 760px) { .paths { grid-template-columns: 1fr 1fr; } }
.path {
  display: block; text-decoration: none; background: var(--content); border: 1px solid var(--edge); border-radius: 14px; padding: 26px 24px 22px;
  transition: box-shadow 240ms var(--spring), border-color 240ms var(--spring), transform 240ms var(--spring);
}
.path:hover { box-shadow: var(--shadow-lift); border-color: var(--control-edge); transform: translateY(-1px); }
.path svg.i { width: 26px; height: 26px; color: var(--brand-primary); display: block; margin-bottom: 16px; }
.path h2 { font-size: 22px; letter-spacing: -.02em; }
.path p { color: var(--secondary); margin-top: 6px; font-size: 15.5px; line-height: 1.55; }
.path ul { list-style: none; padding: 0; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.path li { font-size: 13px; color: var(--secondary); background: var(--grouped); border-radius: 999px; padding: 2px 10px; }
.path .go { display: inline-flex; gap: 6px; margin-top: 18px; color: var(--accent); font-weight: 600; font-size: 15px; }
.block { padding: 56px 0; }
.block + .block { border-top: 1px solid var(--hairline); }
.block > .wrap > h2 + .lead { margin-top: 12px; max-width: 720px; }
.block-head { margin-bottom: 28px; }
.shade { background: var(--shell); }

/* ---------------------------------------------------------------- doc layout */
.doc { display: grid; gap: 0; padding-top: 28px; padding-bottom: 80px; }
.toc { min-width: 0; }
.toc summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px; list-style: none; display: flex; align-items: center; gap: 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; margin-left: auto; color: var(--tertiary); }
.toc[open] summary::after { content: "▴"; }
.toc ol { list-style: none; padding: 8px 0 0; display: grid; gap: 1px; }
.toc a { display: block; text-decoration: none; color: var(--secondary); font-size: 14.5px; line-height: 1.35; padding: 7px 12px; border-radius: 7px; position: relative; }
.toc a:hover { color: var(--ink); background: var(--hairline); }
.toc a.on { color: var(--ink); background: var(--accent-wash); font-weight: 600; }
.toc a.on::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent); }
.toc .grp { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tertiary); padding: 16px 12px 4px; }
.content { min-width: 0; max-width: 780px; }
.content > header { padding: 20px 0 8px; }
.content > header .lead { margin-top: 14px; }
.content section { padding: 44px 0 4px; }
.content section + section { border-top: 1px solid var(--hairline); margin-top: 40px; }
.content h2 { scroll-margin-top: 84px; }
.content h3 { margin-top: 34px; scroll-margin-top: 84px; }
.content h4 { margin-top: 22px; }
.content p { margin-top: 12px; text-wrap: pretty; }
.content h2 + p { margin-top: 14px; font-size: 17px; color: var(--secondary); }
.content ul, .content ol { margin-top: 12px; padding-left: 22px; display: grid; gap: 6px; }
.content li { padding-left: 2px; }
.content li::marker { color: var(--tertiary); }
.content a:not(.btn):not(.jump) { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.content a:not(.btn):not(.jump):hover { text-decoration-color: currentColor; }
@media (min-width: 960px) {
  .doc { grid-template-columns: 248px minmax(0, 1fr); gap: 56px; padding-top: 40px; }
  .toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; padding-bottom: 16px; }
  .toc summary { display: none; }
  .toc ol { padding-top: 0; }
}

/* numbered steps */
ol.steps { list-style: none; padding: 0; counter-reset: step; gap: 14px; margin-top: 18px; }
ol.steps > li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 0; }
ol.steps > li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-wash); color: var(--accent);
  font: 600 13.5px/28px var(--font); text-align: center; font-variant-numeric: tabular-nums; margin-top: 1px;
}
ol.steps > li > div > p:first-child, ol.steps > li > p:first-child { margin-top: 2px; }
ol.steps > li > :not(:first-child) { grid-column: 2; }

/* callouts: the word carries the meaning, the wash only groups it */
.note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--grouped); font-size: 15px; line-height: 1.6; }
.note > b:first-child { display: block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--tertiary); font-weight: 600; margin-bottom: 2px; }
.note p { margin-top: 6px; }
.note.key { background: var(--accent-wash); }
.note.key > b:first-child { color: var(--accent); }

/* tables */
.tbl { margin-top: 16px; overflow-x: auto; border: 1px solid var(--edge); border-radius: 12px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--secondary); background: var(--grouped); padding: 9px 14px; white-space: nowrap; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--hairline); vertical-align: top; }
.tbl td:first-child { font-weight: 500; }
.tbl .c { text-align: center; }
.tbl .yes { color: var(--ok); font-weight: 600; }
.tbl .no { color: var(--tertiary); }

/* definition-style fact rows */
.facts { margin-top: 16px; display: grid; gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; }
.facts > div { background: var(--content); padding: 14px 16px; }
.facts h4 { margin: 0; }
.facts p { margin-top: 4px; color: var(--secondary); font-size: 15px; }
@media (min-width: 640px) { .facts.two { grid-template-columns: 1fr 1fr; } .facts.three { grid-template-columns: repeat(3, 1fr); } }

/* screenshots */
.shot { margin-top: 20px; }
.shot .frame { display: block; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lift); background: var(--shell); cursor: zoom-in; }
.shot img { width: 100%; }
.shot figcaption { margin-top: 8px; font-size: 13.5px; color: var(--tertiary); }
/* The Runtime panel in its three states: narrow pictures, side by side, tops aligned. */
.cards.panels { align-items: start; max-width: 900px; }
.cards.panels .shot { margin-top: 0; }

/* accordions */
.faq { margin-top: 16px; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; }
.faq details + details { border-top: 1px solid var(--hairline); }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; gap: 12px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--tertiary); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { background: var(--hairline); }
.faq .a { padding: 0 16px 16px; color: var(--secondary); font-size: 15px; }
.faq .a p:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- checklist */
.checklist { margin-top: 20px; border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; }
.checklist .top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--grouped); font-size: 14px; color: var(--secondary); }
.checklist .trk { flex: 1; height: 6px; border-radius: 3px; background: var(--edge); overflow: hidden; }
.checklist .trk i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width 320ms var(--spring); }
.checklist .count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.checklist .reset { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 13.5px; font-weight: 500; padding: 2px 4px; }
.checklist ol { list-style: none; padding: 0; margin: 0; display: block; }
.checklist li { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; padding: 13px 16px; border-top: 1px solid var(--hairline); }
.checklist input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.checklist label { cursor: pointer; }
.checklist label b { font-weight: 600; display: block; }
.checklist label span { color: var(--secondary); font-size: 14.5px; display: block; }
.checklist li.done label b { color: var(--secondary); text-decoration: line-through; text-decoration-color: var(--control-edge); }
.jump { color: var(--accent); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; padding-top: 1px; }
.jump:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- guided tour over a screenshot */
.tour { margin-top: 22px; border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--content); }
.tour .stage { position: relative; overflow: hidden; background: var(--shell); border-bottom: 1px solid var(--hairline); }
.tour .pan { position: relative; transform-origin: 0 0; transition: transform 320ms var(--spring); }
.tour .pan img { width: 100%; }
.tour .pic { position: relative; }
.tour .rail { position: relative; z-index: 1; height: 30px; background: var(--material); border-bottom: 1px solid var(--hairline); }
.tour .rail .pin { top: 50%; }
.tour .ring { position: absolute; border-radius: 8px; outline: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(18, 18, 26, .38); pointer-events: none; transition: left 320ms var(--spring), top 320ms var(--spring), width 320ms var(--spring), height 320ms var(--spring); }
.tour .pin {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2px solid var(--content); background: var(--accent); color: var(--on-accent);
  font: 600 12px/20px var(--font); text-align: center; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); font-variant-numeric: tabular-nums;
}
.tour .pin[aria-current="true"] { background: var(--brand-highlight); }
.tour .pin:focus-visible { outline-offset: 3px; border-radius: 50%; }
.tour .panel { display: grid; gap: 4px 16px; padding: 16px; grid-template-columns: 1fr auto; align-items: start; }
.tour .panel h4 { margin: 0; font-size: 16.5px; }
.tour .panel p { margin: 4px 0 0; color: var(--secondary); font-size: 15px; grid-column: 1; }
.tour .ctl { display: flex; align-items: center; gap: 6px; grid-column: 2; grid-row: 1 / span 2; }
.tour .ctl span { font-size: 13px; color: var(--tertiary); font-variant-numeric: tabular-nums; margin-right: 4px; white-space: nowrap; }
.tour .ctl button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--control-edge); background: transparent; cursor: pointer; font-size: 16px; line-height: 1; }
.tour .ctl button:hover { background: var(--hairline); }
.tour ol.stops { margin: 0; padding: 12px 16px 16px 38px; display: grid; gap: 8px; font-size: 15px; }
.tour ol.stops b { font-weight: 600; }
.tour.live ol.stops { display: none; }
@media (max-width: 560px) { .tour .panel { grid-template-columns: 1fr; } .tour .ctl { grid-column: 1; grid-row: auto; margin-top: 8px; } }

/* ---------------------------------------------------------------- try-it demos
   Drawn with the app's tokens and the app's own labels, like the landing page's product mock. */
.demo { margin-top: 22px; border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--shell); }
.demo-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--content); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.demo-head .tag { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-wash); border-radius: 999px; padding: 2px 10px; }
.demo-head h4 { margin: 0; font-size: 15.5px; }
.demo-head .rst { margin-left: auto; background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 13.5px; font-weight: 500; padding: 2px 4px; }
.demo-stage { padding: 16px; }
.demo-say { padding: 14px 16px; background: var(--content); border-top: 1px solid var(--hairline); font-size: 15px; color: var(--secondary); min-height: 76px; }
.demo-say b { color: var(--ink); font-weight: 600; }
.demo-ctl { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 16px; }
.demo noscript, .tour noscript { display: block; padding: 16px; color: var(--secondary); font-size: 15px; }
.win { border-radius: 12px; overflow: hidden; background: var(--content); border: 1px solid var(--edge); box-shadow: var(--shadow-lift); font-size: 13px; line-height: 18px; color: var(--ink); }
.win-bar { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--material); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.win-bar .name { font-weight: 600; }
.win-bar .sp { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--secondary); border: 1px solid var(--edge); border-radius: 999px; padding: 1px 10px; background: var(--content); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--control-edge); flex: none; }
.chip.ok i { background: var(--ok); }
.chip.busy i { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.chip.warn { color: var(--danger); }
.chip.warn i { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
.tbtn { font-size: 12.5px; font-weight: 500; border: 1px solid var(--control-edge); border-radius: 6px; padding: 3px 10px; background: var(--content); cursor: pointer; white-space: nowrap; }
.tbtn:hover { background: var(--hairline); }
.tbtn.pri { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tbtn.pri:hover { background: var(--accent-hover); }
.tbtn.q { border-color: transparent; color: var(--secondary); background: transparent; }
.tbtn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.nbk { padding: 16px 16px 8px 6px; }
.cell { display: grid; grid-template-columns: 38px minmax(0, 1fr); margin-bottom: 10px; position: relative; }
.cell .cnt { font-family: var(--mono); font-size: 11px; color: var(--secondary); text-align: right; padding: 10px 8px 0 0; }
.cell .well { background: var(--grouped); border-radius: 9px; padding: 9px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 20px; white-space: pre; overflow-x: auto; }
.cell.sel::before { content: ""; position: absolute; left: 31px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--accent); }
.cell .tl { grid-column: 2; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--secondary); padding: 6px 4px 0; min-height: 26px; font-variant-numeric: tabular-nums; }
.cell .tl .st { color: var(--ink); font-weight: 500; }
.cell .tl.stale .st { color: var(--danger); }
.cell .tl button { margin-left: 4px; }
.cell .out { grid-column: 2; padding: 6px 4px 0; font-family: var(--mono); font-size: 12px; line-height: 19px; white-space: pre; overflow-x: auto; color: var(--ink); }
.cell .out.old { opacity: .6; }
/* The away demo: the runtime's own line, the notice above a notebook, and a closed tab. */
.rt-line { padding: 6px 14px; font-size: 12px; color: var(--secondary); background: var(--content); border-bottom: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.rt-line b { color: var(--ink); font-weight: 500; }
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; font-size: 12.5px; background: var(--accent-wash); color: var(--ink); border-bottom: 1px solid var(--hairline); }
.gone { border: 1px dashed var(--control-edge); border-radius: 12px; padding: 36px 20px; text-align: center; color: var(--secondary); font-size: 14px; line-height: 1.6; background: var(--content); }
.gone b { display: block; color: var(--ink); font-size: 15px; }
.gone .clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.k { color: var(--syn-keyword); } .s { color: var(--syn-string); } .n { color: var(--syn-number); } .f { color: var(--syn-function); } .cm { color: var(--syn-comment); }
.thread { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 280px; }
.bubble { align-self: flex-end; max-width: 86%; background: var(--grouped); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; line-height: 20px; }
.turn { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 20px; }
.tool { display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 12.5px; }
.tool::before { content: "✓"; color: var(--ok); font-weight: 700; width: 13px; flex: none; }
.tool.live::before { content: "◐"; color: var(--accent); }
.tool.x::before { content: "✕"; color: var(--danger); }
.changed { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--secondary); }
.fchip { font-family: var(--mono); font-size: 11px; border: 1px solid var(--edge); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.perm { border: 1px solid var(--edge); border-radius: 10px; background: var(--raised); box-shadow: var(--shadow-lift); padding: 12px; }
.perm-label { font-size: 11px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.perm-title { font-weight: 600; margin-top: 4px; font-size: 13.5px; }
.perm-hint { color: var(--tertiary); font-size: 12px; margin-top: 8px; }
.diff { margin-top: 8px; border-radius: 7px; background: var(--grouped); font-family: var(--mono); font-size: 11.5px; line-height: 19px; overflow-x: auto; padding: 4px 0; white-space: pre; }
.diff span { display: block; padding: 0 8px; }
.diff .add { background: var(--ok-wash); }
.diff .add::before { content: "+ "; color: var(--ok); }
.diff .ctx::before { content: "  "; }
.diff .del { background: var(--danger-wash); }
.diff .del::before { content: "− "; color: var(--danger); }
.perm-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.grants { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--secondary); padding: 8px 16px; border-bottom: 1px solid var(--hairline); background: var(--material); }
.grants .g { border: 1px solid var(--edge); border-radius: 999px; padding: 0 4px 0 10px; display: inline-flex; gap: 6px; align-items: center; background: var(--content); color: var(--ink); }
.grants .g button { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 500; padding: 1px 6px; }
.composer { margin: 0 16px 16px; border: 1px solid var(--control-edge); border-radius: 12px; padding: 10px 10px 8px 12px; background: var(--content); }
.composer .ph { color: var(--tertiary); font-size: 13px; }
.composer .ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.seg { display: inline-grid; grid-auto-flow: column; background: rgba(18, 18, 26, .06); border-radius: 8px; padding: 2px; font-size: 12.5px; font-weight: 500; }
:root[data-theme="dark"] .seg { background: rgba(0, 0, 0, .28); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg { background: rgba(0, 0, 0, .28); } }
.seg button { padding: 3px 12px; border-radius: 6px; color: var(--secondary); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.brief { padding: 20px; display: grid; gap: 14px; }
.brief h5 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.brief .fx { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; }
.brief .fx div { background: var(--content); padding: 9px 12px; }
.brief .fx dt { font-size: 11.5px; color: var(--tertiary); }
.brief .fx dd { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.brief ul { margin: 0; padding-left: 18px; color: var(--secondary); font-size: 13.5px; line-height: 1.55; display: grid; gap: 4px; }
.brief .foot { color: var(--secondary); font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--ok-wash); color: var(--ok); white-space: nowrap; }
.pill.flag { background: var(--accent-wash); color: var(--accent); }
.pill.mut { background: var(--grouped); color: var(--secondary); }
.pill.bad { background: var(--danger-wash); color: var(--danger); }
.banner { padding: 8px 16px; font-size: 12.5px; background: var(--danger-wash); color: var(--ink); border-bottom: 1px solid var(--hairline); }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; border: 1px solid var(--edge); border-radius: 999px; padding: 1px 10px; background: var(--content); }
.stages { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 16px 0; }
.stages button { border: 1px solid var(--control-edge); background: var(--content); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.stages button::before { content: attr(data-n); font-size: 11.5px; color: var(--tertiary); font-variant-numeric: tabular-nums; }
.stages button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stages button[aria-selected="true"]::before { color: inherit; opacity: .8; }
.duo { display: grid; gap: 12px; padding: 16px; }
.duo > div { background: var(--content); border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; }
.duo h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--tertiary); font-weight: 600; }
.duo p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.duo ul { margin: 6px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.55; display: grid; gap: 3px; }
@media (min-width: 700px) { .duo { grid-template-columns: 1fr 1fr; } }
.mon { width: 100%; border-collapse: collapse; font-size: 13px; }
.mon th { text-align: left; font-weight: 600; font-size: 12px; color: var(--secondary); padding: 8px 12px; background: var(--material); border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.mon td { padding: 8px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mon input { accent-color: var(--accent); width: 16px; height: 16px; }
.mon-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--edge); border-bottom: 1px solid var(--hairline); }
.mon-stats div { background: var(--content); padding: 10px 12px; }
.mon-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.mon-stats span { font-size: 12px; color: var(--secondary); }
.dialog { margin: 12px 16px 16px; border: 1px solid var(--edge); border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-window); padding: 16px; }
.dialog h5 { margin: 0; font-size: 15.5px; }
.dialog p { margin: 6px 0 0; font-size: 13.5px; color: var(--secondary); }
.dialog label { display: block; margin-top: 12px; font-size: 12.5px; font-weight: 600; }
.dialog input[type="text"], .dialog select { width: 100%; margin-top: 4px; height: 34px; border-radius: 7px; border: 1px solid var(--control-edge); background: var(--content); color: var(--ink); font: 400 14px/1 var(--font); padding: 0 10px; }
.dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.scroll-x { overflow-x: auto; }

/* ---------------------------------------------------------------- shortcuts */
.keys-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.keys-bar .search { flex: 1; min-width: 200px; max-width: 340px; }
.keys td:last-child { white-space: nowrap; text-align: right; }
.keys .or { color: var(--tertiary); font-size: 12.5px; margin: 0 4px; }
.keys tr[hidden] { display: none; }

/* ---------------------------------------------------------------- downloads + help */
.cards { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--content); border: 1px solid var(--edge); border-radius: 14px; padding: 22px; }
.card svg.i { width: 22px; height: 22px; color: var(--brand-primary); margin-bottom: 12px; display: block; }
.card h3 { margin: 0; font-size: 17px; }
.card p { color: var(--secondary); margin-top: 6px; font-size: 15px; line-height: 1.6; }
.card .btn { margin-top: 16px; }
.card .meta { font-size: 13px; color: var(--tertiary); margin-top: 10px; }
/* The three things Ai8 is for, on every page's first screen. */
.cards.features .card { display: flex; flex-direction: column; position: relative; }
.card .more { display: inline-flex; gap: 6px; margin-top: auto; padding-top: 14px; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.content .card a.more:not(.btn) { text-decoration: none; }
.content .card a.more:not(.btn):hover { text-decoration: underline; }
.card.soon { border-style: dashed; background: transparent; }
.card.soon > .pill.soon { position: absolute; top: 20px; right: 20px; }
.pill.soon { font-weight: 600; }
h2 .pill.soon, h3 .pill.soon { vertical-align: middle; margin-left: 8px; letter-spacing: 0; }
/* In a guide's reading column the three sit as rows: icon, then words. */
.doc .cards.features { grid-template-columns: 1fr; gap: 12px; }
.doc .cards.features .card { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 16px; padding: 18px 20px; }
.doc .cards.features .card > svg.i { grid-row: 1 / span 3; margin: 1px 0 0; }
.doc .cards.features .card > h3, .doc .cards.features .card > p, .doc .cards.features .card > .more { grid-column: 2; }
.doc .cards.features .card.soon > h3 { padding-right: 112px; }
.doc .cards.features .card .more { padding-top: 8px; }
.next { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.copy { position: relative; margin-top: 14px; }
.copy pre { background: var(--grouped); border-radius: 10px; padding: 14px 16px; font: 400 13px/1.7 var(--mono); overflow-x: auto; }
.copy button { position: absolute; top: 8px; right: 8px; }

/* ---------------------------------------------------------------- footer */
footer { padding: 36px 0 52px; color: var(--secondary); font-size: 14px; border-top: 1px solid var(--hairline); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
footer .lockup svg { height: 24px; }
footer nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .fine { width: 100%; color: var(--tertiary); font-size: 13px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .site-header, .toc, .demo, .search, .next, footer nav, .checklist .reset, .tour .ctl, .tour .pin, .tour .ring, .tour .rail { display: none !important; }
  .doc { display: block; padding: 0; }
  .tour.live ol.stops { display: grid; }
  .content section { break-inside: avoid-page; }
  .faq .a { display: block; }
}

.tour .pin { transform: scale(var(--inv, 1)); }

/* A long control name wraps on a phone instead of pushing the page sideways. */
@media (max-width: 559px) { .ui { white-space: normal; } }
@media (max-width: 559px) { .site-header .signin { display: none; } .site-header .search { width: auto; flex: 1; max-width: none; } }
.hero .search { width: 100%; }
.search input:not(:placeholder-shown) ~ kbd, .search input:focus ~ kbd { display: none; }

/* ---------------------------------------------------------------- contact: the way to reach us, on every page */
.card.contact { background: var(--accent-wash); border-color: transparent; }
.card.contact .btn { font-size: 16px; min-height: 44px; }
.site-header .help { display: none; }
@media (min-width: 560px) { .site-header .help { display: inline-flex; } }
.band { background: var(--band); color: var(--band-ink); padding: 44px 0; }
.band .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.band h2 { font-size: clamp(22px, 2.8vw, 28px); }
.band p { color: var(--band-secondary); margin-top: 6px; max-width: 560px; font-size: 16px; line-height: 1.55; }
.band .cta { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-band { background: var(--band-ink); color: var(--band); font-size: 16px; min-height: 44px; }
.btn-band:hover { background: var(--band-secondary); }
.btn-band-outline { color: var(--band-ink); border-color: var(--band-edge); background: transparent; min-height: 44px; }
.btn-band-outline:hover { background: var(--band-press); }
.band :focus-visible { outline-color: var(--band-ink); }
@media (max-width: 700px) { .band .cta { margin-left: 0; } }
@media print { .band .cta { display: none; } }
