/* The Fliin site (ADR 0013 §16): black tiles with a one-pixel edge, Geist,
   capsules and tactile buttons. Every color comes from tokens.css, the
   registry's roles, mixed here into the site's own tokens: no literal. */

@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("fonts/geist-400.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("fonts/geist-500.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("fonts/geist-600.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("fonts/geist-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url("fonts/geist-mono-500.woff2") format("woff2"); }

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

html {
  --font: Geist, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ease: cubic-bezier(.4, 0, .2, 1);
  /* What one presses springs back; what arrives eases out. */
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.23, 1, .32, 1);
  --header: 68px;
  --width: 1200px;
  --gutter: 24px;
  --r-tile: 28px;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 24px);
}

/* Dark, the default: the registry's black behind everything, previews
   included, tiles a few steps above it. */
:root[data-theme="dark"] {
  --page: var(--scrim);
  --ink: var(--on-surface);
  --ink-2: color-mix(in srgb, var(--on-surface) 68%, var(--page));
  --ink-3: color-mix(in srgb, var(--on-surface) 56%, var(--page));
  --tile: color-mix(in srgb, var(--on-surface) 6.5%, var(--page));
  --tile-2: color-mix(in srgb, var(--on-surface) 9.5%, var(--page));
  --tile-3: color-mix(in srgb, var(--on-surface) 14%, var(--page));
  --capsule: color-mix(in srgb, var(--on-surface) 5.5%, var(--page));
  --well: color-mix(in srgb, var(--on-surface) 3.5%, var(--page));
  --line: color-mix(in srgb, var(--on-surface) 11%, var(--page));
  --edge: inset 0 0 0 1px color-mix(in srgb, var(--on-surface) 7%, transparent), inset 0 1px 0 color-mix(in srgb, var(--on-surface) 10%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--scrim) 30%, transparent);
  --tact: color-mix(in srgb, var(--on-surface) 16%, var(--page));
  --tact-hover: color-mix(in srgb, var(--on-surface) 20%, var(--page));
  --tact-shadow: inset 0 1px 0 color-mix(in srgb, var(--on-surface) 11%, transparent), 0 0 0 1px color-mix(in srgb, var(--scrim) 60%, transparent), 0 2px 2px -1px color-mix(in srgb, var(--scrim) 40%, transparent);
  --thumb: color-mix(in srgb, var(--on-surface) 15%, var(--page));
  --thumb-shadow: inset 0 1px 0 color-mix(in srgb, var(--on-surface) 9%, transparent), 0 1px 0 color-mix(in srgb, var(--scrim) 50%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent) 45%, var(--on-surface));
  --accent-tint: color-mix(in srgb, var(--accent) 22%, var(--page));
  --ok: var(--success);
  --warn: var(--warning);
  --ok-tint: color-mix(in srgb, var(--success) 14%, var(--tile));
  --giant-line: color-mix(in srgb, var(--on-surface) 24%, var(--page));
  --veil: color-mix(in srgb, var(--page) 94%, transparent);
}
/* Light: the same structure, white tiles on a paper page. */
:root[data-theme="light"] {
  --page: color-mix(in srgb, var(--on-surface) 4.5%, var(--surface));
  --ink: var(--on-surface);
  --ink-2: color-mix(in srgb, var(--on-surface) 76%, var(--surface));
  --ink-3: color-mix(in srgb, var(--on-surface) 64%, var(--surface));
  --tile: var(--surface);
  --tile-2: color-mix(in srgb, var(--on-surface) 4%, var(--surface));
  --tile-3: color-mix(in srgb, var(--on-surface) 8%, var(--surface));
  --capsule: var(--surface);
  --well: color-mix(in srgb, var(--on-surface) 3.5%, var(--surface));
  --line: color-mix(in srgb, var(--on-surface) 9%, var(--surface));
  --edge: inset 0 0 0 1px color-mix(in srgb, var(--scrim) 8%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--scrim) 5%, transparent);
  --tact: var(--surface);
  --tact-hover: color-mix(in srgb, var(--on-surface) 3%, var(--surface));
  --tact-shadow: inset 0 -1px 0 color-mix(in srgb, var(--scrim) 6%, transparent), 0 0 0 1px color-mix(in srgb, var(--scrim) 12%, transparent), 0 2px 2px -1px color-mix(in srgb, var(--scrim) 10%, transparent);
  --thumb: var(--surface);
  --thumb-shadow: 0 0 0 1px color-mix(in srgb, var(--scrim) 8%, transparent), 0 1px 0 color-mix(in srgb, var(--scrim) 10%, transparent);
  --accent-ink: var(--link);
  --accent-tint: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --ok: var(--on-success-soft);
  --warn: color-mix(in srgb, var(--warning) 45%, var(--on-surface));
  --ok-tint: color-mix(in srgb, var(--success) 12%, var(--surface));
  --giant-line: color-mix(in srgb, var(--on-surface) 26%, var(--page));
  --veil: color-mix(in srgb, var(--page) 94%, transparent);
}

body { margin: 0; min-height: 100vh; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 16px; }
code, kbd, pre { font-family: var(--mono); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-tint); }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 50;
  background: var(--ink); color: var(--page);
  padding: 8px 12px; border-radius: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }

svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
.mark { display: inline-block; flex: none; width: 26px; height: 26px; background: url("brand/mark.png") center / contain no-repeat; }
/* The logo word is a mask: it takes the text color, in light as in dark. */
.wordmark {
  display: inline-block; flex: none; width: 40px; height: 19px; background: currentColor;
  -webkit-mask: url("brand/wordmark.png") center / contain no-repeat; mask: url("brand/wordmark.png") center / contain no-repeat;
}
@media (forced-colors: active) { .wordmark { forced-color-adjust: none; background: CanvasText; } }

html:not(.js) .theme-switch,
html:not(.js) .menu-open,
html:not(.js) .doc-actions,
html:not(.js) .accents { display: none; }

/* The shared pieces: an edge of one pixel inside, a capsule, a tile. */

.edge { box-shadow: var(--edge); }
.capsule { background: var(--capsule); border-radius: 999px; }
.tile { position: relative; background: var(--tile); border-radius: var(--r-tile); box-shadow: var(--edge); }
.mono { font-family: var(--mono); }

/* A tactile button: raised, it sinks a little under the finger and
   springs back. */
.tact {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--tact); color: var(--ink); box-shadow: var(--tact-shadow);
  font: 500 14px/20px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--spring), background-color .15s var(--ease);
}
.tact:hover { background: var(--tact-hover); }
.tact:active { transform: scale(.96); }
.tact.accent { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--on-accent) 22%, transparent), 0 0 0 1px color-mix(in srgb, var(--scrim) 40%, transparent), 0 2px 2px -1px color-mix(in srgb, var(--scrim) 30%, transparent); }
.tact.accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--on-accent)); }
.tact.large { min-height: 48px; padding: 0 22px; border-radius: 16px; font-size: 15px; }
.tact.small { min-height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13px; }
.tact[disabled] { cursor: not-allowed; opacity: .55; }
.tact[disabled]:hover { background: var(--tact); }
.tact[disabled]:active { transform: none; }
.tact svg { width: 15px; height: 15px; }
/* Copied: the label says so for a moment, with a check that pops. */
.copy-label { display: inline-flex; align-items: center; gap: 6px; }
.copied .copy-label { color: var(--ok); }
.copy-check { display: none; color: var(--ok); }
.copied .copy-check { display: block; animation: pop .4s var(--spring); }
.copied .copy-icon { display: none; }

.icon-button {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: inherit; border: 0; border-radius: 12px; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.icon-button:hover { background: var(--tile-2); }

/* A chip: a link with a count, a pill above a page. */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--tile); box-shadow: var(--edge); color: var(--ink-2);
  font: 500 13px/18px var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .2s var(--spring);
}
.chip:hover { color: var(--ink); }
.chip:active { transform: scale(.95); }
.chip-count { color: var(--ink-3); font-weight: 400; }

/* A segmented control: radio buttons in a well, a thumb that slides to
   the checked one. --n is the number of options. */
.segmented {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  margin: 0; padding: 3px; border: 0; min-width: 0; border-radius: 999px; background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
}
.segmented::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; inset-inline-start: 3px;
  width: calc((100% - 6px) / var(--n, 2)); border-radius: 999px;
  background: var(--thumb); box-shadow: var(--thumb-shadow);
  transition: translate .35s var(--spring);
}
.segmented:has(label:nth-of-type(2) input:checked)::before { translate: 100% 0; }
.segmented:has(label:nth-of-type(3) input:checked)::before { translate: 200% 0; }
.segmented:has(label:nth-of-type(4) input:checked)::before { translate: 300% 0; }
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; min-width: 56px; height: 32px; padding: 0 12px; border-radius: 999px; text-align: center;
  font: 500 12.5px/32px var(--font); color: var(--ink-3); white-space: nowrap;
  transition: color .2s var(--ease);
}
.segmented input:hover + span { color: var(--ink-2); }
.segmented input:checked + span { color: var(--ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* The same, with buttons: tabs (role=tab, aria-selected) or a choice
   (aria-pressed). site.js moves the thumb (--at). */
.switcher {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line);
}
.switcher::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; inset-inline-start: 3px;
  width: calc((100% - 6px) / var(--n, 2)); border-radius: 999px;
  background: var(--thumb); box-shadow: var(--thumb-shadow);
  translate: calc(var(--at, 0) * 100%) 0; transition: translate .35s var(--spring);
}
html:not(.js) .switcher::before { display: none; }
.switcher > button {
  position: relative; min-width: 72px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-3); font: 500 12.5px/32px var(--font); white-space: nowrap; cursor: pointer;
  transition: color .2s var(--ease);
}
.switcher > button:hover { color: var(--ink-2); }
.switcher > [aria-selected="true"], .switcher > [aria-pressed="true"] { color: var(--ink); }
.switcher > button:focus-visible { outline-offset: -2px; border-radius: 999px; }

/* Header over a veil: the logo, the tabs centered on the page, the
   brightness and Get started. The search opens with Cmd+K or Ctrl+K. */

.top {
  position: sticky; top: 0; z-index: 30;
  /* No backdrop blur: over the Flutter views it is computed again on
     every frame they draw. */
  background: var(--veil);
}
/* The Pro banner of the home page scrolls away; the row stays. */
.top.with-banner { top: -37px; }
.top-banner {
  display: flex; justify-content: center; align-items: center; gap: 10px; height: 37px; padding: 0 16px;
  border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); text-decoration: none;
}
.top-banner-cta { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--tile-2); box-shadow: var(--edge); color: var(--ink); font-weight: 500; }
.top-banner:hover .top-banner-cta { background: var(--tile-3); }
.top-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  max-width: calc(var(--width) + 2 * var(--gutter)); margin: 0 auto; padding: 14px var(--gutter);
}
.layout:not(.landing) ~ * .top-row, body:not([data-page="home"]) .top-row { max-width: 1440px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 40px; color: var(--ink); text-decoration: none; }
.top-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.get-started { height: 40px; border-radius: 999px; }
.top-tabs { display: flex; align-items: center; gap: 2px; padding: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top-tabs::-webkit-scrollbar { display: none; }
.top-tabs a {
  display: inline-flex; align-items: center; flex: none; height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.top-tabs a:hover { color: var(--ink); background: var(--tile-2); }
.top-tabs a[aria-current] { color: var(--ink); background: var(--tile-3); }
.top-tabs a:focus-visible { outline-offset: -2px; border-radius: 999px; }
.theme-switch { display: inline-flex; gap: 2px; padding: 4px; }
.theme-switch button {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.theme-switch svg { width: 15px; height: 15px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--tile-3); color: var(--ink); }
.menu-open { display: none; border-radius: 999px; }

/* Layout: the sidebar, the page, the table of contents; a landing page
   (home, theme, Pro, 404) has the whole width. */

.layout {
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 216px minmax(0, 1fr) 200px; gap: 0 40px; align-items: start;
}
.layout.landing { display: block; max-width: calc(var(--width) + 2 * var(--gutter)); }
.layout.landing > .sidebar { display: none; }
main { min-width: 0; padding: 24px 0 0; }
/* The focus that client-side navigation puts there, for screen readers, is not drawn. */
main:focus, main:focus-visible { outline: none; }
.layout:not(.landing) > .foot { grid-column: 1 / -1; }

.sidebar {
  position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); overflow: auto;
  padding: 24px 0 24px; font-size: 13.5px; line-height: 20px; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar h2 { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); padding: 0 12px; margin: 20px 0 6px; }
.sidebar h2:first-child { margin-top: 0; }
.side-count { font-family: var(--mono); font-weight: 400; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sidebar a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.sidebar a:hover { color: var(--ink); }
.sidebar a[aria-current] { color: var(--ink); font-weight: 500; }
.sidebar a:focus-visible { outline-offset: -2px; }
.side-pro { flex: none; height: 18px; padding: 0 7px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); font-size: 10.5px; line-height: 18px; font-weight: 500; }

.toc {
  position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); overflow: auto;
  padding: 32px 0 8px; scrollbar-width: none;
}
.toc h2 { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); margin: 0 0 12px; }
.toc ul, .toc-bar ul { list-style: none; margin: 0; padding: 0; }
.toc a, .toc-bar a {
  display: block; padding: 5px 8px 5px 14px; font-size: 13px; line-height: 18px;
  color: var(--ink-3); text-decoration: none; overflow-wrap: anywhere;
  transition: color .15s var(--ease);
}
.toc a:hover, .toc-bar a:hover { color: var(--ink); }
.toc a.active, .toc-bar a.active { color: var(--ink); }
/* A hooked list: a dashed rail runs from the top of the list down to the
   current row and turns into it; a dimmer one follows the pointer or the
   focus, under the first. site.js adds both and sets --to, the middle of
   the row they reach. */
.hook { position: relative; padding-inline-start: 14px; }
.toc .hook { padding-inline-start: 10px; }
.hook-rail {
  position: absolute; z-index: 0; top: -4px; inset-inline-start: 6px; width: 12px; height: calc(var(--to, 0px) + 4px);
  border: 0 dashed var(--rail); border-inline-start-width: 1.5px; border-block-end-width: 1.5px; border-end-start-radius: 7px;
  opacity: 0; pointer-events: none; transition: height .5s var(--spring), opacity .2s var(--ease);
}
.toc .hook-rail { inset-inline-start: 2px; }
.hook-rail.active { --rail: var(--accent); z-index: 1; }
.hook-rail.hover { --rail: color-mix(in srgb, var(--ink-3) 70%, transparent); }
.hook-rail.shown { opacity: 1; }
[data-page="components"] .doc h2, [data-page="blocks"] .doc h2, [data-page="components"] .toc a, [data-page="blocks"] .toc a, [data-page="components"] .toc-bar a, [data-page="blocks"] .toc-bar a, .chip-category { text-transform: capitalize; }

.toc-bar {
  display: none; position: sticky; top: var(--header); z-index: 20;
  margin: 0 var(--gutter); border-radius: 16px; background: var(--tile); box-shadow: var(--edge);
}
.toc-bar summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px;
  font-size: 13.5px; line-height: 20px; color: var(--ink-2); cursor: pointer; list-style: none;
}
.toc-bar summary::-webkit-details-marker { display: none; }
.toc-bar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-bar summary svg:last-child { transition: rotate .2s var(--ease); }
.toc-bar[open] summary svg:last-child { rotate: 180deg; }
.toc-bar summary:focus-visible { outline-offset: -2px; border-radius: 16px; }
.toc-bar ul { max-height: 50vh; overflow: auto; padding: 0 8px 12px; }

/* Page head: breadcrumbs, title, description, the copy buttons. */

.doc { animation: rise .5s var(--out) both; }
.doc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 16px 0 28px; }
.doc-title { flex: 1 1 420px; min-width: 0; max-width: 640px; }
.crumbs { margin: 0 0 10px; font-size: 13px; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.doc h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.04em; font-weight: 500; overflow-wrap: anywhere; }
.doc .lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 12px 0 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-actions .tact { min-height: 40px; font-size: 13px; border-radius: 12px; padding: 0 14px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 20px; }
/* The Pro mark: a chip that leads to the Pro page. Above the link that
   covers a tile, so that it stays its own target. */
.pro {
  position: relative; z-index: 1; display: inline-flex; align-items: center; flex: none; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 500; text-decoration: none;
}
.pro:hover { background: color-mix(in srgb, var(--accent) 30%, var(--tile)); }
.pro.large { height: 30px; padding: 0 12px; font-size: 13px; }

/* Preview: the stage tile, the live view on it, the variant capsule
   floating at its foot. */

.preview { margin: 0 0 12px; overflow: hidden; }
.preview-stage { position: relative; display: grid; place-items: center; padding: 56px 16px 88px; min-height: 440px; }
.stage-live { position: relative; width: 100%; height: var(--stage, 360px); }
.stage-pass, .stage-variant { position: absolute; top: 16px; z-index: 1; }
.stage-pass {
  inset-inline-start: 16px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px;
  border-radius: 999px; background: var(--ok-tint); color: var(--ok); font-size: 12px; font-weight: 500;
}
.stage-pass::before { content: ""; width: 6px; height: 6px; border-radius: 9px; background: currentColor; }
.stage-variant { inset-inline-end: 20px; top: 20px; font: 400 11.5px/1 var(--mono); color: var(--ink-3); }
.preview-bar {
  position: absolute; z-index: 2; bottom: 16px; inset-inline-start: 50%; translate: -50% 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 5px;
  max-width: calc(100% - 32px); width: max-content;
}
/* A phone: 8 px frame with rounded corners, the island at the top. */
.phone {
  position: relative; width: 352px; max-width: 100%; height: 640px;
  border: 8px solid var(--scrim); border-radius: 46px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.phone.screen { width: 406px; height: auto; aspect-ratio: 406 / 860; }
.phone::before {
  content: ""; position: absolute; top: 8px; inset-inline-start: 50%; translate: -50% 0; z-index: 1;
  width: 84px; height: 24px; border-radius: 999px; background: var(--scrim); pointer-events: none;
}
.screen-preview .preview-stage { padding-top: 64px; }
/* The stories as cards, under the stage. */
.state-picker { display: grid; gap: 16px; padding: 16px 20px 8px; border-top: 1px solid var(--line); }
.state-picker:empty { display: none; }
.state-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.state-group legend { padding: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); }
.state-list { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.state-card { position: relative; flex: none; display: grid; gap: 6px; width: 136px; cursor: pointer; scroll-snap-align: start; }
.state-card input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.state-thumb {
  display: grid; place-items: center; height: 96px; padding: 8px; border-radius: 16px; overflow: hidden;
  background: var(--well); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .15s var(--ease), transform .2s var(--spring);
}
.state-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.state-name { font-size: 12.5px; line-height: 18px; font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state-card:hover .state-thumb { box-shadow: inset 0 0 0 1px var(--ink-3); }
.state-card:active .state-thumb { transform: scale(.97); }
.state-card input:checked ~ .state-thumb { box-shadow: inset 0 0 0 2px var(--ink); }
.state-card input:checked ~ .state-name { color: var(--ink); }
.state-card input:focus-visible ~ .state-thumb { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.screen-preview .state-card { width: 96px; }
.screen-preview .state-thumb { height: auto; aspect-ratio: 390 / 844; padding: 0; border-radius: 14px; }
.screen-preview .state-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* The command capsule: the command, what comes with it, Copy. */
.command-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 6px 6px 6px 20px; border-radius: 20px; }
.command-bar code { flex: 1 1 200px; min-width: 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.command-bar code::before { content: "$ "; color: var(--ink-3); }
.command-note { font-size: 12.5px; color: var(--ink-3); }
.command-note a { color: var(--ink-2); }

/* Live previews: the placeholder image, then the Flutter view on top. */

.live { position: relative; overflow: hidden; width: 100%; height: 100%; }
.live-image { position: absolute; transition: opacity .25s var(--ease); }
/* The reference: the golden at its logical size, top-aligned at first, as the
   view renders it. A story: its content alone, rendered at 2x (srcset 2x),
   centered 16 px from the edges and shrunk if it doesn't fit, never enlarged,
   as the view places it (storyInset in catalog.dart). */
.live[data-kind="reference"] .live-image {
  inset-block-start: 0; inset-inline-start: 0;
  width: calc(var(--w) * 1px); max-width: none; height: auto;
}
.live[data-kind="story"] .live-image { inset: 16px; margin: auto; max-width: calc(100% - 32px); max-height: calc(100% - 32px); object-fit: contain; }
/* A full screen fills the view, without margin (Story.screen). */
.live[data-screen][data-kind="story"] .live-image { inset: 0; max-width: 100%; max-height: 100%; }
.live-sizer { position: fixed; top: 0; inset-inline-start: -100000px; pointer-events: none; }
.live-host { position: absolute; inset: 0; opacity: 0; transition: opacity .25s var(--ease); }
.live-view { position: absolute; inset: 0; }
.live-park { position: fixed; top: 0; inset-inline-start: -100000px; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }
.live.ready .live-host { opacity: 1; }
.live.ready .live-image { opacity: 0; }

/* Content: sections, text, code. */

.doc section { margin: 0 0 12px; }
.doc section > h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 500; margin: 48px 0 16px; }
.doc section > p, .doc section > ul:not(.tiles), .doc section > ol { font-size: 15px; line-height: 1.7; color: var(--ink-2); max-width: 760px; }
.doc section > ul:not(.tiles), .doc section > ol { padding-inline-start: 20px; margin: 0 0 16px; }
.doc section > ul:not(.tiles) li, .doc section > ol li { margin: 6px 0; }
.doc p a, .doc li a, .foot-license a { color: var(--ink); }
.doc :not(pre, .command-bar) > code { font-size: 12.5px; padding: 2px 6px; border-radius: 7px; background: var(--tile-2); color: var(--ink); }
.doc a > code { text-decoration: underline; text-underline-offset: 3px; }
.doc section > h3 { font-size: 17px; line-height: 1.4; font-weight: 500; margin: 32px 0 6px; }
.doc section > h3 + p { margin: 0 0 14px; }

.code { position: relative; margin: 12px 0; border-radius: 20px; background: var(--well); box-shadow: var(--edge); overflow: hidden; }
.code pre {
  margin: 0; padding: 18px 52px 18px 20px; overflow: auto; max-height: 600px;
  font-size: 13px; line-height: 1.7; color: var(--ink-2); tab-size: 2;
}
.code-copy { position: absolute; top: 8px; inset-inline-end: 8px; color: var(--ink-3); }
.code-copy:hover { color: var(--ink); }
.js .code[data-collapsible]:not(.open) pre {
  max-height: 168px; overflow: hidden;
  mask-image: linear-gradient(to bottom, black 45%, transparent);
}
.code-expand {
  position: absolute; bottom: 10px; inset-inline-start: 50%; translate: -50% 0;
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--tact); color: var(--ink); box-shadow: var(--tact-shadow);
  font: 500 12.5px/1 var(--font); cursor: pointer;
}
.code.open .code-expand { position: static; display: block; translate: none; margin: 0 auto 12px; }
.file-name { margin: 20px 0 -4px; }
.doc .file-name code { padding: 0; background: none; color: var(--ink-3); overflow-wrap: anywhere; }

/* An example: a tile, its live story on a stage, Preview and Code. */
.example { overflow: hidden; margin: 0 0 8px; }
.example-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 14px 0 20px; }
.example-head > div:first-child { flex: 1 1 280px; min-width: 0; padding-top: 4px; }
.example-head .switcher { flex: none; }
.example-head p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.example-head h3 { font-size: 15px; line-height: 1.4; font-weight: 500; }
.example-stage { display: grid; align-items: center; min-height: 240px; padding: 40px 24px; }
.example-stage .live { height: var(--tile); }
.example-stage.screen { justify-items: center; }
.example-stage.screen .phone { width: 320px; }
.example-stage.screen .live { height: 100%; }
.example .code { margin: 0 12px 12px; border-radius: 18px; }
.js .example[data-view="preview"] > .code, .js .example[data-view="code"] > .example-stage { display: none; }
html:not(.js) .example .switcher { display: none; }

.facts { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 24px; margin: 20px 0 0; font-size: 14px; line-height: 24px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0 0 12px; color: var(--ink-2); }
.facts ul { margin: 0; padding-inline-start: 18px; }
.facts .state-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.facts .state-tags li { padding: 2px 10px; border-radius: 999px; background: var(--tile-2); color: var(--ink-2); font-size: 12.5px; line-height: 22px; font-weight: 500; }

/* Goldens: one tile per platform and brightness, four frames. */
.goldens { display: grid; gap: 12px; margin-top: 16px; }
.goldens figure { margin: 0; }
.golden-group { padding: 16px 16px 12px; border-radius: 24px; background: var(--tile); box-shadow: var(--edge); }
.golden-group > figcaption { margin: 0 0 12px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.golden-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.golden-frame { overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.golden-frame img { display: block; width: 100%; height: auto; }
.golden-row figcaption { margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--ink-3); text-align: center; }
.goldens.wide .golden-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 48px 0 0; }
.pager a { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 18px 20px; border-radius: 20px; background: var(--tile); box-shadow: var(--edge); font-size: 14px; text-decoration: none; transition: background-color .15s var(--ease); }
.pager a:hover { background: var(--tile-2); }
.pager-rel { font-size: 12px; color: var(--ink-3); }
.pager-name { font-weight: 500; }
.pager-next { align-items: flex-end; text-align: end; }

/* The footer: four columns of links, the motto, the licenses and the
   brightness, then the logo word drawn in dashes, very large. */
.foot { margin-top: 96px; padding: 56px 0 0; border-top: 1px solid var(--line); overflow: hidden; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.foot p { margin: 0; }
.foot-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; max-width: 900px; margin: 0 auto; }
.foot-head { margin-bottom: 10px !important; font-weight: 500; color: var(--ink); }
.foot-columns ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-columns a { display: inline-flex; align-items: center; min-height: 28px; color: var(--ink-3); text-decoration: none; transition: color .15s var(--ease); }
.foot-columns a:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 56px; text-align: center; }
.foot-tag { display: inline-flex; align-items: center; gap: 8px; }
.foot-tag .mark { width: 18px; height: 18px; }
.foot-license a { color: var(--ink-2); }
.foot-bottom .theme-switch { margin-top: 4px; }
.foot-word { display: flex; justify-content: center; margin-top: 24px; user-select: none; }
.foot-word svg { width: min(100%, 680px); height: auto; margin-bottom: -6%; overflow: visible; }
.foot-word text {
  font: 600 200px/1 var(--font); letter-spacing: -.06em; text-transform: lowercase; text-anchor: middle;
  fill: none; stroke: var(--giant-line); stroke-width: 1.5; stroke-dasharray: 8 7;
}

/* Tiles of a grid: the home page, the lists. */

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; animation: rise .5s var(--out) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }
.card-stage { position: relative; display: grid; place-items: center; height: 220px; }
.card-stage > img { max-width: calc(100% - 40px); max-height: calc(100% - 40px); object-fit: contain; }
.card-stage .live { position: absolute; inset: 0; }
.card-foot { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 14px 12px 20px; font-size: 13.5px; }
.card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; text-decoration: none; }
.card-go { margin-inline-start: auto; }
/* The whole card leads to the page; the Pro mark and the live view stay
   their own targets. */
.card-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .live { z-index: 1; }
.card-go { display: grid; place-items: center; flex: none; width: 28px; height: 28px; color: var(--ink-3); transition: color .15s var(--ease), transform .3s var(--spring); }
.card:hover .card-go { color: var(--ink); transform: rotate(-45deg); }
.card:hover { background: var(--tile-2); }
.card { transition: background-color .2s var(--ease); }
.phones { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phones .card-stage { height: auto; aspect-ratio: 300 / 420; padding: 20px 20px 0; align-items: end; overflow: hidden; }
.phones .card-stage > img { max-width: 100%; max-height: none; width: 100%; border-radius: 22px 22px 0 0; object-fit: cover; object-position: top; }

.swatches { display: grid; gap: 8px; }
.swatches div { display: flex; gap: 4px; flex-wrap: wrap; }
.swatches span { width: 32px; height: 32px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); }
.card-stage .swatches span { width: 18px; height: 18px; border-radius: 5px; }

/* Home. */

.hero { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 64px 0 44px; text-align: center; }
.hero > * { animation: rise .6s var(--out) both; }
.hero > :nth-child(2) { animation-delay: 60ms; }
.hero > :nth-child(3) { animation-delay: 120ms; }
.hero > :nth-child(4) { animation-delay: 240ms; }
.hero h1 { font-size: clamp(44px, 7vw, 72px); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; max-width: 12ch; }
.hero-lead { margin: 0; max-width: 470px; font-size: 16px; color: var(--ink-2); }
/* The mark sits in the second line at the height of the lowercase. */
.hero-tail { white-space: nowrap; }
.hero-tail .mark { width: .8em; height: .8em; margin: 0 .02em; vertical-align: -.1em; }
.tact.pill { min-height: 44px; padding: 0 20px; border-radius: 999px; }
.tact.pill svg { width: 14px; height: 14px; }
/* The clients fliin init configures, as plain names. */
.hero-agents { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 64px; }
.hero-agents p { margin: 0; font-size: 13px; color: var(--ink-3); }
.hero-agents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 36px; }
.hero-agents a { display: inline-flex; align-items: center; min-height: 40px; font-size: 19px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-3); text-decoration: none; transition: color .15s var(--ease); }
.hero-agents a:hover { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; margin-top: 8px; }
.command { display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 0; max-width: 100%; height: 48px; padding: 0 4px 0 18px; border-radius: 16px; background: var(--capsule); }
.command code { flex: 1; min-width: 0; text-align: start; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command code::before { content: "$ "; color: var(--ink-3); }
.command .icon-button { color: var(--ink-3); }
.command .icon-button:hover { color: var(--ink); }

.section { padding: 112px 0 0; }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 32px; text-align: center; }
.section-head.split { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; text-align: start; }
.section-head h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; max-width: 20ch; }
.section-head p { margin: 0; max-width: 480px; color: var(--ink-2); }
/* The home sections: a label, the title in two tones, the lead beside. */
.split-head { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; margin-bottom: 40px; text-align: start; }
.split-head h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.04; letter-spacing: -.04em; max-width: 18ch; }
.split-head h2 span, .hero h1 .hero-tail { display: block; color: var(--ink-3); }
.split-lead { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; flex: 0 1 400px; padding-bottom: 4px; }
.split-lead p { font-size: 15px; }
.split-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.split-head .eyebrow svg { width: 16px; height: 16px; }
.split-head .eyebrow .mark { width: 18px; height: 18px; }

/* A terminal window: three dots and a title, then lines of mono text. */
.window { width: 100%; max-width: 860px; border-radius: 18px; background: var(--well); box-shadow: var(--edge), 0 24px 60px -24px color-mix(in srgb, var(--scrim) 60%, transparent); font: 400 13px/1.6 var(--mono); overflow: hidden; text-align: start; }
.window-head { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font: 400 12px/1 var(--font); color: var(--ink-3); }
.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 10px; height: 10px; border-radius: 9px; background: var(--tile-3); }
.window-body { display: grid; gap: 6px; padding: 12px 20px 24px; color: var(--ink-2); }
.window-body > span { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-command { color: var(--ink); }
.term-command::before { content: "$ "; color: var(--ink-3); }
.term-file { padding-inline-start: 2ch; color: var(--ink); }
.term-ok { color: var(--ok); }
.term-warn { color: var(--warn); }
.term-accent { color: var(--accent-ink); }
.term-dim { color: var(--ink-3); }
.term-caret::after { content: ""; display: inline-block; width: 8px; height: 16px; vertical-align: -3px; background: var(--ink-2); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.showcase.update-demo {
  min-height: 0; padding: 40px 56px;
  background:
    radial-gradient(60% 70% at 100% 0%, color-mix(in srgb, var(--ok) 26%, transparent), transparent 70%),
    radial-gradient(55% 70% at 0% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    var(--tile);
}
.update-demo .window { min-height: 320px; }

/* A showcase: the demo on a backdrop tinted by the accent, a capsule
   floating at its foot. --show follows the accent picked on the page. */
.showcase {
  --show: var(--show-light, var(--accent));
  position: relative; display: grid; place-items: center; min-height: 560px; padding: 48px 24px 104px; overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--show) 34%, transparent), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, color-mix(in srgb, var(--show) 20%, transparent), transparent 70%),
    radial-gradient(40% 50% at 100% 80%, color-mix(in srgb, var(--show) 14%, transparent), transparent 70%),
    var(--tile);
}
:root[data-theme="dark"] .showcase { --show: var(--show-dark, var(--accent)); }
.showcase-bar {
  position: absolute; z-index: 2; bottom: 24px; inset-inline-start: 50%; translate: -50% 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 5px 5px 5px 16px;
  max-width: calc(100% - 32px); width: max-content;
}
.accents { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 4px; border: 0; min-width: 0; }
.accent-dot { position: relative; display: grid; place-items: center; width: 32px; height: 32px; }
.accent-dot input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.accent-dot .dot { width: 20px; height: 20px; border-radius: 999px; background: var(--light); box-shadow: inset 0 1px 1px color-mix(in srgb, var(--surface) 25%, transparent), inset 0 -2px 4px color-mix(in srgb, var(--scrim) 25%, transparent); pointer-events: none; transition: transform .35s var(--spring); }
:root[data-theme="dark"] .accent-dot .dot { background: var(--dark); }
.accent-dot:hover .dot { transform: scale(1.1); }
.accent-dot input:checked + .dot { transform: scale(1.15); outline: 2px solid var(--ink-2); outline-offset: 2px; }
.accent-dot input:focus-visible + .dot { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.showcase-bar .accents { padding: 0; }
.showcase-label { margin-inline-end: 6px; font-size: 13px; color: var(--ink-2); }
.showcase-bar .tact svg, .showcase-cta svg { width: 14px; height: 14px; }
.showcase-cta { position: absolute; z-index: 2; bottom: 24px; inset-inline-start: 50%; translate: -50% 0; }
.theme-demo .phone { width: 300px; height: auto; aspect-ratio: 406 / 860; }
.theme-demo .phone .live { position: relative; }
.agents-demo { min-height: 420px; }
.chat { display: grid; gap: 10px; width: 100%; max-width: 460px; }
.chat-ask { justify-self: end; max-width: 300px; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--tile-3); font-size: 14px; }
.chat-answer { display: grid; gap: 4px; padding: 14px; border-radius: 18px 18px 18px 4px; background: var(--well); box-shadow: var(--edge); font: 400 13px/1.5 var(--mono); }
.chat-answer > span { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; color: var(--ink-3); }
.chat-answer > .chat-title { padding-top: 0; }
.chat-answer > .chat-picked { border-radius: 8px; background: var(--accent-tint); color: var(--accent-ink); }
.chat-run { justify-self: start; padding: 8px 14px; border-radius: 999px; background: var(--well); box-shadow: var(--edge); font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); }
.chat-run code::before { content: "$ "; color: var(--ink-3); }

/* Four points under a showcase. */
.features { list-style: none; margin: 40px 0 0; padding: 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.feature-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; border-radius: 11px; background: var(--tile-2); box-shadow: var(--edge); color: var(--ink); }
.feature-icon svg { width: 16px; height: 16px; }
.features h3 { font-size: 15px; line-height: 22px; font-weight: 500; }
.features p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.features code { font-size: 12.5px; padding: 1px 5px; border-radius: 6px; background: var(--tile-2); color: var(--ink); }

/* The home page's last word: the title in two tones, the command, three
   ways in. */
.closing { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 128px 0 32px; text-align: center; }
.closing h2 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; }
.closing h2 span { display: block; color: var(--ink-3); }
.closing .command { flex: none; width: min(100%, 420px); padding-inline-end: 5px; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tact.invert { background: var(--ink); color: var(--page); }
.tact.invert:hover { background: color-mix(in srgb, var(--ink) 86%, var(--page)); }

/* Fliin Pro, in a card at the bottom of the screen on the home page, until
   it is closed. */
.pro-card { position: fixed; z-index: 25; inset-block-end: 20px; inset-inline-start: 20px; width: 272px; overflow: hidden; box-shadow: var(--edge), 0 24px 48px -12px color-mix(in srgb, var(--scrim) 45%, transparent); animation: rise .5s var(--out) .6s both; }
.pro-card[hidden] { display: none; }
.pro-card-art {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 132px;
  background:
    radial-gradient(80% 90% at 0% 100%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    radial-gradient(70% 80% at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    var(--tile-2);
}
.pro-card-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.pro-card-logo .mark { width: 30px; height: 30px; }
.pro-card-now { font-size: 12px; color: var(--ink-2); }
.pro-card-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; color: var(--ink-2); }
.pro-card-body { padding: 16px 16px 16px; }
.pro-card-body h2 { font-size: 15px; line-height: 22px; font-weight: 500; }
.pro-card-body p { margin: 6px 0 0; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.pro-card-cta { width: 100%; margin-top: 16px; }
/* Dark grey in both themes: the light theme's buttons are white. */
:root[data-theme="light"] .pro-card-cta { background: color-mix(in srgb, var(--on-surface) 78%, var(--surface)); color: var(--surface); }
:root[data-theme="light"] .pro-card-cta:hover { background: color-mix(in srgb, var(--on-surface) 70%, var(--surface)); }

/* Fliin Pro: a grid of screens, the top of each in a phone that the
   card's foot cuts. */
.screen-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.screen-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; animation: rise .5s var(--out) both; animation-delay: calc(var(--i, 0) * 40ms); transition: background-color .2s var(--ease); }
.screen-card:hover { background: var(--tile-2); }
.screen-stage { position: relative; height: 220px; padding: 20px 20px 0; overflow: hidden; }
.screen-stage::after { content: ""; position: absolute; inset: auto 0 0; height: 56px; background: linear-gradient(transparent, var(--tile)); pointer-events: none; transition: background .2s var(--ease); }
.screen-card:hover .screen-stage::after { background: linear-gradient(transparent, var(--tile-2)); }
.screen-phone { width: min(62%, 220px); margin: 0 auto; padding: 6px 6px 0; border-radius: 26px 26px 0 0; background: var(--scrim); box-shadow: 0 0 0 1px var(--line); transition: transform .4s var(--spring); }
.screen-card:hover .screen-phone { transform: translateY(-4px); }
.screen-phone img { display: block; width: 100%; border-radius: 20px 20px 0 0; }
.screen-card .card-foot { position: relative; z-index: 1; }
.split-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Quick start: the commands of the chosen app in a terminal window. */
.showcase.start-demo { min-height: 0; padding: 40px 56px; }
.start-lines ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.start-lines li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); animation: rise .45s var(--out) both; animation-delay: calc(var(--i) * 60ms); }
.start-lines li code::before { content: "$ "; color: var(--ink-3); }
.start-lines li span { color: var(--ink-3); text-align: end; }
.start-panel[hidden] { display: none; }
.start-more { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.start-more:hover { color: var(--ink); }
html:not(.js) .start-panel + .start-panel { margin-top: 16px; }
.tag-accent { align-self: flex-start; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-ink); font-size: 12px; line-height: 24px; font-weight: 500; }

/* The Pro page: the plans side by side, the steps, the questions. */
.landing-head { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 0 40px; text-align: center; animation: rise .5s var(--out) both; }
.landing-head h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.04; letter-spacing: -.045em; font-weight: 500; }
.landing-head .lead { margin: 0; max-width: 560px; font-size: 16px; color: var(--ink-2); }
.landing-section { padding: 72px 0 0; }
.landing-section > h2 { margin: 0 0 20px; font-size: 28px; line-height: 1.15; letter-spacing: -.03em; font-weight: 500; }
.landing-section > p, .landing-section > ul, .landing-section > ol { max-width: 760px; color: var(--ink-2); line-height: 1.7; }
.landing-section > ul, .landing-section > ol { padding-inline-start: 20px; }
.landing-section h3 { margin: 28px 0 6px; font-size: 16px; font-weight: 500; }
.landing-section code { font-size: 12.5px; padding: 2px 6px; border-radius: 7px; background: var(--tile-2); color: var(--ink); }
.landing-section .code code, .landing-section .command-bar code { padding: 0; background: none; }
.landing-section .tiles + p { margin-top: 24px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.plan { display: flex; flex-direction: column; padding: 28px; }
.plan h3 { margin: 0; font-size: 18px; font-weight: 500; }
.plan p { margin: 0; }
.plan-seats { min-height: 40px; color: var(--ink-3); font-size: 14px; line-height: 20px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 4px !important; }
.plan-amount { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -.04em; }
.plan-price del { color: var(--ink-3); font-size: 18px; }
.plan-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-3); font-size: 13.5px; }
.plan-launch { padding: 0 9px; border-radius: 999px; background: var(--ok-tint); color: var(--ok); font-size: 12px; line-height: 22px; font-weight: 500; }
.plan-features { flex: 1; display: grid; align-content: start; gap: 10px; margin: 24px 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.plan-features li { display: flex; gap: 10px; }
.plan-features svg { width: 16px; height: 20px; color: var(--ok); }
.plan-buy { width: 100%; }
.plan-note { font-size: 13.5px; color: var(--ink-3); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.steps li { counter-increment: step; position: relative; min-height: 26px; padding-inline-start: 40px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--tile-2); box-shadow: var(--edge); color: var(--ink); font: 500 12.5px/1 var(--mono); }
.faq { display: grid; gap: 8px; max-width: 820px; }
.faq details { padding: 0 20px; border-radius: 20px; background: var(--tile); box-shadow: var(--edge); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: rotate .25s var(--spring); color: var(--ink-3); }
.faq details[open] summary svg { rotate: 180deg; }
.faq summary:focus-visible { outline-offset: 4px; border-radius: 12px; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.65; }
.faq-terms { margin-top: 16px !important; color: var(--ink-3) !important; font-size: 14px; }

/* A license, as written in its file. */
.license-text p, .license-text li { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.license-text ul { margin: 0 0 16px; padding-inline-start: 20px; }
.license-text li { margin: 6px 0; }
.license-text strong { color: var(--ink); font-weight: 600; }
.note { margin: 0 0 24px; padding: 14px 18px; border-radius: 18px; background: var(--tile); box-shadow: var(--edge), inset 3px 0 0 var(--ink); }
.doc .note p { margin: 0; color: var(--ink); }

/* The 404 page. */
.lost { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 120px 0 40px; text-align: center; }
.lost h1 { font-size: clamp(40px, 6vw, 60px); letter-spacing: -.045em; font-weight: 500; }
.lost p { margin: 0; color: var(--ink-2); }

/* Theme page: the settings in a tile on the left, the live preview on the
   right, the preset capsule floating at its foot (ADR 0016 §7). */

body[data-page="theme"] .layout.landing { max-width: none; }
.studio { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0 0; }
.studio-field { display: grid; gap: 8px; }
.studio-field + .studio-field { margin-top: 8px; }
.studio-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); }
.studio-group > .picker + .picker { margin-top: 2px; }
.studio-panel {
  position: sticky; top: calc(var(--header) + 8px); display: flex; flex-direction: column;
  max-height: calc(100vh - var(--header) - 16px); margin: 0; overflow: hidden;
}
.studio-intro { padding: 24px 20px 16px; }
.studio-intro h1 { font-size: 32px; line-height: 1.1; letter-spacing: -.035em; font-weight: 500; }
.studio-intro p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.studio-scroll { display: grid; align-content: start; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
.studio-scroll::-webkit-scrollbar { display: none; }
.studio-group { display: grid; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.studio-group h2 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); }
.studio-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.studio-history { display: flex; gap: 2px; }
.studio-history .icon-button, .studio-group-head .studio-lock { width: 32px; height: 32px; border-radius: 10px; }
.studio-history .icon-button:disabled { opacity: .35; cursor: default; background: none; }
/* The ready-made presets: a card each, its base and its accent. */
.studio-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.studio-vignette {
  display: flex; flex-direction: column; gap: 6px; min-height: 44px; padding: 6px 6px 8px; border: 0; border-radius: 14px;
  background: var(--tile-2); color: var(--ink-2); font: 400 12px/16px var(--font); text-align: start; cursor: pointer;
}
/* The panel's transitions run under the pointer only: when the solver
   answers, every chip, card and orb that changes at once would otherwise
   animate together over the views being redrawn, and stall the page
   (check.dart, presetPageResponsive: 940 ms, 190 ms without). */
.studio-vignette:hover { color: var(--ink); transition: background-color .15s var(--ease), transform .2s var(--spring), color .15s var(--ease); }
.studio-vignette:active { transform: scale(.95); }
.studio-vignette[aria-pressed="true"] { background: var(--tile-3); color: var(--ink); box-shadow: var(--thumb-shadow); }
.studio-vignette { --s: var(--v-surface); --c: var(--v-card); --a: var(--v-accent); --t: var(--v-text); }
:root[data-theme="dark"] .studio-vignette { --s: var(--vd-surface); --c: var(--vd-card); --a: var(--vd-accent); --t: var(--vd-text); }
.vignette-art { display: flex; flex-direction: column; justify-content: space-between; gap: 5px; height: 46px; padding: 6px; border-radius: 9px; background: var(--s); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 12%, transparent); }
.vignette-card { display: grid; gap: 3px; padding: 4px 5px; border-radius: var(--v-radius); background: var(--c); }
.vignette-card span { height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--t) 70%, transparent); }
.vignette-card span + span { width: 60%; background: color-mix(in srgb, var(--t) 30%, transparent); }
.vignette-button { align-self: flex-end; width: 46%; height: 9px; border-radius: var(--v-button); background: var(--a); }
.vignette-name { padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Short settings: chips of radio buttons. */
.studio-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt > span, .studio-style {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 12px;
  background: var(--tile-2); color: var(--ink-2); font: 400 13px/18px var(--font); white-space: nowrap; cursor: pointer;
}
.opt:hover > span, .studio-style:hover { color: var(--ink); transition: background-color .15s var(--ease), color .15s var(--ease), transform .2s var(--spring); }
.opt:active > span, .studio-style:active { transform: scale(.95); }
.opt input:checked + span, .studio-style[aria-pressed="true"] { background: var(--tile-3); color: var(--ink); box-shadow: var(--thumb-shadow); }
.opt input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.opt .glyph { display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.opt .swatch { flex: none; width: 14px; height: 14px; }
.studio-style > svg { display: none; }
/* The primary colors: orbs that grow when chosen. */
.orbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 2px 0; border: 0; min-width: 0; }
.orb { position: relative; display: grid; place-items: center; width: 36px; height: 36px; }
.orb input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.orb .swatch { width: 26px; height: 26px; box-shadow: inset 0 1px 1px color-mix(in srgb, var(--surface) 25%, transparent), inset 0 -2px 4px color-mix(in srgb, var(--scrim) 25%, transparent); pointer-events: none; }
.orb:hover .swatch { transform: scale(1.1); transition: transform .35s var(--spring); }
.orb input:checked + .swatch { transform: scale(1.18); outline: 2px solid var(--ink-2); outline-offset: 2px; }
.orb input:focus-visible + .swatch { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.swatch { display: block; width: 18px; height: 18px; border-radius: 999px; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--scrim) 12%, transparent); }
/* Long settings: a row that shows its name, its value and a preview, and
   opens onto its options; one open at a time. */
.picker { position: relative; }
.picker summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 40px 6px 12px;
  border-radius: 14px; background: var(--tile-2); list-style: none; cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease);
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary:hover, .picker details[open] > summary { background: var(--tile-3); }
.picker:has(.studio-lock) summary { padding-inline-end: 76px; }
.picker summary > svg { position: absolute; top: 18px; inset-inline-end: 14px; color: var(--ink-3); transition: transform .25s var(--spring); }
.picker details[open] > summary > svg { transform: rotate(180deg); }
.picker-text { display: grid; flex: 1; min-width: 0; margin-inline-end: 28px; }
.picker-label { font-size: 11.5px; line-height: 16px; color: var(--ink-3); }
.picker-value { overflow: hidden; font-size: 13.5px; line-height: 20px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.picker-art { display: grid; flex: none; place-items: center; width: 28px; height: 28px; color: var(--ink); }
.picker-menu { display: grid; gap: 8px; padding: 6px 0 4px; }
.picker-options { display: grid; gap: 1px; min-width: 0; margin: 0; padding: 0; border: 0; }
.picker-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; line-height: 20px; color: var(--ink-2); cursor: pointer; }
.picker-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.picker-option:hover { background: var(--tile-2); color: var(--ink); }
.picker-option:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.picker-option:has(input:checked) { color: var(--ink); font-weight: 500; }
.picker-glyph { display: grid; flex: none; place-items: center; width: 28px; height: 24px; }
.picker-name { flex: 1; min-width: 0; }
.picker-option > svg { visibility: hidden; }
.picker-option:has(input:checked) > svg { visibility: visible; }
.studio-lock {
  position: absolute; top: 10px; inset-inline-end: 38px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px;
  background: none; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.studio-group-head .studio-lock { position: static; }
.studio-lock svg { width: 14px; height: 14px; }
.picker:hover .studio-lock, .studio-group:hover .studio-lock, .studio-lock:focus-visible, .studio-lock[aria-pressed="true"] { opacity: 1; }
.studio-lock:hover { color: var(--ink); }
.studio-lock[aria-pressed="true"] { color: var(--ink); background: var(--tile-3); }
@media (hover: none) { .studio-lock { opacity: 1; } }
.studio-more { display: grid; gap: 6px; }
/* The value previews. */
.glyph { display: grid; place-items: center; width: 24px; height: 20px; color: var(--ink); }
svg.glyph { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
svg.glyph .filled { fill: currentColor; fill-opacity: .2; }
.text-glyph { font-weight: 600; line-height: 20px; }
.font-glyph { font-size: 16px; font-weight: 500; line-height: 20px; }
.icon-glyph svg { width: 18px; height: 18px; }
.card-glyph { width: 22px !important; height: 16px !important; border-radius: 4px; background: var(--tile-3); }
.card-glyph.raised { box-shadow: 0 2px 0 color-mix(in srgb, var(--scrim) 25%, transparent), 0 0 0 1px color-mix(in srgb, var(--scrim) 8%, transparent); }
.card-glyph.outlined { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.card-glyph.flat { box-shadow: 0 0 0 1px color-mix(in srgb, var(--scrim) 8%, transparent); }
.motion-glyph { position: relative; width: 24px !important; height: 4px !important; border-radius: 2px; background: var(--tile-3); overflow: hidden; }
.motion-glyph::after { content: ""; position: absolute; inset-block: 0; width: 8px; border-radius: 2px; background: var(--ink); animation: motion-glyph 1.6s ease-in-out infinite alternate; }
.motion-glyph.fast::after { animation-duration: 1.1s; }
.motion-glyph.slow::after { animation-duration: 2.3s; }
@keyframes motion-glyph { from { inset-inline-start: 0; } to { inset-inline-start: 16px; } }
.studio-brand { display: flex; align-items: center; gap: 8px; }
.studio-brand[hidden], .studio-nearest[hidden] { display: none; }
.studio-brand input[type="color"] { flex: none; width: 40px; height: 40px; padding: 3px; border: 0; border-radius: 12px; background: var(--tile-2); box-shadow: var(--edge); cursor: pointer; }
.studio-brand input[type="text"] { flex: 1; min-width: 0; font-family: var(--mono); text-transform: uppercase; }
.studio-brand input[aria-invalid] { box-shadow: inset 0 0 0 1px var(--danger); }
.studio-nearest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.studio-actions { display: grid; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.studio-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.studio-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.theme-status { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.theme-status:empty { display: none; }
/* The preview: tabs at the top, blocks at the height of their content
   (fliin:size), the capsule pinned to the bottom of the screen. */
.studio-preview { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: calc(100vh - var(--header) - 16px); padding: 16px 16px 0; background: var(--tile); }
/* The capsule comes right after the tabs for the keyboard, at the foot of
   the preview for the eye. */
.studio-preview > .studio-dock { order: 1; }
.studio-preview[data-brightness="light"] { background: color-mix(in srgb, var(--scrim) 4%, var(--surface)); }
.studio-preview[data-brightness="dark"] { background: color-mix(in srgb, var(--on-surface) 6%, var(--scrim)); }
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 16px; }
.studio-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--capsule); box-shadow: var(--edge); }
.studio-tabs [role="tab"] { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 400 13px/32px var(--font); cursor: pointer; white-space: nowrap; transition: color .15s var(--ease), background-color .15s var(--ease); }
.studio-tabs [role="tab"]:hover { color: var(--ink); }
.studio-tabs [role="tab"][aria-selected="true"] { background: var(--tile-3); color: var(--ink); }
.studio-tabs [role="tab"]:focus-visible { outline-offset: -2px; border-radius: 999px; }
.studio-tab-panel[hidden] { display: none; }
.studio-grid { list-style: none; margin: 0; padding: 0; columns: auto 320px; column-gap: 14px; }
.studio-tile { break-inside: avoid; height: var(--tile); margin: 0 0 14px; border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-surface) 8%, transparent); transition: height .2s var(--ease); }
.studio-tile .live { height: 100%; }
.studio-grid.phones { columns: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.phone-tile { height: auto; margin: 0; overflow: visible; box-shadow: none; }
.phone-tile .phone { width: 406px; height: auto; aspect-ratio: 406 / 860; }
.studio-dock {
  position: sticky; bottom: 16px; z-index: 3; display: flex; justify-content: center; padding: 8px 0 16px; pointer-events: none;
}
.studio-capsule {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 6px; max-width: 100%;
  background: var(--capsule); box-shadow: var(--edge), 0 0 0 1px color-mix(in srgb, var(--scrim) 30%, transparent); pointer-events: auto;
}
.studio-code { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 400 13px/1 var(--mono); cursor: pointer; }
.studio-code:hover { color: var(--ink); }
.studio-code code { color: var(--ink); }
.studio-capsule .tact { border-radius: 999px; }
.studio-capsule .tact svg { transition: transform .5s var(--spring); }
.studio-capsule [data-preset-shuffle]:hover svg { transform: rotate(180deg); }
.studio-variants { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0;
  border: 0; border-radius: 24px; background: var(--tile); color: var(--ink); box-shadow: var(--edge);
}
.studio-dialog[open] { animation: dialog-in .35s var(--spring); }
.studio-dialog.wide { width: min(760px, calc(100vw - 32px)); }
.studio-dialog::backdrop { background: color-mix(in srgb, var(--scrim) 55%, transparent); }
.studio-dialog-body { display: grid; gap: 12px; margin: 0; padding: 22px 24px 24px; }
.studio-dialog-body > * { min-width: 0; margin: 0; }
.studio-dialog h2 { font-size: 20px; line-height: 28px; font-weight: 500; }
.studio-dialog h3 { margin-top: 8px; font-size: 14.5px; line-height: 22px; font-weight: 500; }
.studio-dialog p { font-size: 14px; line-height: 22px; color: var(--ink-2); }
.studio-dialog .code { margin: 0; }
.studio-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-dialog .studio-field { display: grid; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 500; }
.studio-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.studio-error { color: var(--danger); }
.studio-error:empty { display: none; }
.studio-fonts { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; font-size: 14px; }
.table-wrap { overflow: auto; border-radius: 20px; background: var(--tile); box-shadow: var(--edge); }
.strings { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 24px; }
.strings th, .strings td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.strings thead th { font-weight: 500; color: var(--ink-3); }
.strings tbody th { font-weight: 400; }
.strings td { white-space: normal; min-width: 140px; color: var(--ink-2); }
.strings tr:last-child > * { border-bottom: 0; }
input[type="text"], input[type="search"] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--well);
  border: 0; border-radius: 12px; padding: 0 12px; height: 40px; width: 100%; box-shadow: inset 0 0 0 1px var(--line);
}

/* ⌘K search. */

.search {
  width: min(580px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0;
  background: var(--tile); color: var(--ink);
  border: 0; border-radius: 24px; box-shadow: var(--edge);
}
.search[open] { animation: dialog-in .35s var(--spring); }
.search::backdrop { background: color-mix(in srgb, var(--scrim) 45%, transparent); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.search-box input { border: 0; background: transparent; box-shadow: none; font-size: 16px; padding: 0 4px; color: var(--ink); height: 44px; }
.search-box input:focus-visible { outline: none; }
.search-box:focus-within { box-shadow: inset 0 -2px 0 var(--focus-ring); }
#search-results { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
#search-results li { display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; padding: 8px 12px; border-radius: 14px; cursor: pointer; font-size: 14px; }
#search-results li[aria-selected="true"] { background: var(--tile-3); }
#search-results li span:last-child { color: var(--ink-3); font: 400 12px/1 var(--mono); text-align: end; }
#search-results .empty { color: var(--ink-3); cursor: default; }
.search-hint { margin: 0; padding: 10px 18px 14px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); }

/* The navigation drawer, below 768 px. */

.drawer {
  margin: 0; margin-inline-start: auto; width: min(85vw, 332px); height: 100%; max-height: none;
  padding: 12px 0 0; border: 0; background: var(--page); color: var(--ink);
  box-shadow: var(--edge);
}
.drawer[open] { animation: drawer-in .35s var(--out); }
.drawer::backdrop { background: color-mix(in srgb, var(--scrim) 40%, transparent); }
.drawer-close { display: grid; margin: 0 12px 0 auto; }
.drawer .sidebar { position: static; display: block; max-height: none; padding: 8px 16px 24px; }

.toast {
  position: fixed; inset-block-end: 24px; inset-inline-start: 50%; translate: -50% 16px; z-index: 60;
  padding: 10px 16px; border-radius: 14px; scale: .96;
  background: var(--tile-3); color: var(--ink); box-shadow: var(--edge); font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity .18s, translate .45s var(--spring), scale .45s var(--spring);
}
.toast.show { opacity: 1; translate: -50% 0; scale: 1; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dialog-in { from { transform: translateY(8px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Widths. */

@media (max-width: 1279px) {
  .layout { grid-template-columns: 216px minmax(0, 1fr); }
  .toc { display: none; }
  .toc-bar { display: block; }
  html { scroll-padding-top: calc(var(--header) + 64px); }
}

@media (max-width: 1023px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .studio-panel { position: static; max-height: none; }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .golden-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below the width where the tabs fit centered between the logo and the
   end of the header, they take a row of their own. */
@media (max-width: 959px) {
  html { --header: 112px; }
  .top-row { grid-template-columns: 1fr auto; row-gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .top-tabs { grid-column: 1 / -1; grid-row: 2; scroll-snap-type: x proximity; }
  .top-tabs a { flex: 1 0 auto; justify-content: center; padding: 0 10px; scroll-snap-align: start; }
}

@media (max-width: 899px) {
  .showcase.update-demo, .showcase.start-demo { padding: 24px; }
}

@media (max-width: 767px) {
  html { --gutter: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > .sidebar { display: none; }
  html.js .menu-open { display: inline-grid; }
  .get-started { display: none; }
  .doc h1 { font-size: 36px; }
  .preview-stage { padding: 56px 12px 140px; }
  .stage-variant { display: none; }
  .phone { width: 300px; height: 560px; }
  .phone.screen { width: 100%; max-width: 330px; height: auto; }
  .pager, .plans, .facts { grid-template-columns: minmax(0, 1fr); }
  .plan-seats { min-height: 0; }
  .section { padding-top: 80px; }
  .foot { padding-top: 64px; }
}

@media (max-width: 639px) {
  /* Two columns, a fixed height: the story shrinks to fit. */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-stage { height: 150px; }
  .card-foot { padding: 10px 10px 10px 14px; font-size: 13px; }
  .card-go { display: none; }
  .features { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .closing { padding-top: 96px; }
  .hero-agents { margin-top: 48px; }
  .hero-agents ul { gap: 0 24px; }
  .hero-agents a { font-size: 17px; }
  .pro-card { inset-inline: 16px; inset-block-end: 16px; width: auto; }
  .pro-card-art { display: none; }
  .pro-card-body { padding-inline-end: 44px; }
  .showcase { display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 0; padding: 32px 16px 20px; }
  .theme-demo .phone { width: 260px; }
  .showcase-bar, .showcase-cta { position: static; translate: none; }
  .showcase-bar { padding: 5px; }
  .showcase-label { display: none; }
  .features li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; }
  .feature-icon { grid-row: span 2; margin: 0; }
  .features p { margin-top: 2px; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: minmax(0, 1fr); }
  .showcase.update-demo, .showcase.start-demo { padding: 12px; }
  .window { font-size: 12px; }
  .window-body { padding: 8px 14px 18px; }
  .start-lines li { flex-direction: column; gap: 0; }
  .start-lines li span { text-align: start; }
  .phones .card-stage { padding: 14px 14px 0; }
  .studio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-preview { padding: 10px 10px 0; }
  .studio-grid { columns: 1; }
  .phone-tile .phone { width: 100%; max-width: 330px; }
  .golden-row { grid-template-columns: minmax(0, 1fr); }
}

/* Under a finger, every target is at least 44 px. */
@media (pointer: coarse) {
  .chip, .tact, .tact.small, .icon-button, .sidebar a, .opt > span, .studio-style, .studio-vignette, .foot-columns a, .toc-bar a, .picker-option, .start-more { min-height: 44px; }
  .icon-button { min-width: 44px; }
  .top-tabs a, .theme-switch button { height: 44px; }
  .theme-switch button { width: 44px; }
  .segmented span { height: 44px; line-height: 44px; }
  .switcher > button { height: 44px; }
  .accent-dot, .orb { width: 44px; height: 44px; }
  .brand, .get-started { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
