/* openappdefinition.org
 *
 * The site's own look, drawn for it and kept apart from the design apps take by default: paper and
 * ink, the teal of the mark, and a highlighter yellow. Atkinson Hyperlegible Next sets text and
 * headings (800 for headings), Atkinson Hyperlegible Mono sets code and small labels; both are
 * served from assets/fonts/ with their licenses beside them. A section that shows things sits on a
 * tint that spans the window, a section that is read stays on the page ground, and white sheets
 * (a file, an app's window, a tile) stand out on the tint. The bar sits on a sheet with a thin line
 * under it, and the footer sits on ink.
 *
 * Colors are tokens on :root: the light values, then the dark values. The site is light unless a
 * person chose dark with the switch in the bar; the system's setting is not consulted, and the build
 * refuses a rule that asks for it. The build also checks that every text color reaches a contrast of
 * 4.5 to 1 on the grounds it is used on.
 *
 * Every rule is scoped to the site's own classes or to `.prose`, except for the page itself. The
 * playground and the component gallery draw inside the shadow root of <oad-playground>, which these
 * rules do not enter: those apps keep their own design and typefaces. The page gives that element
 * its height, and gives the playground's own frame the site's look through the custom properties
 * the playground reads on it (never the apps it runs).
 */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/atkinson-hyperlegible-next.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../assets/fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("../assets/fonts/atkinson-hyperlegible-mono.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root, :root[data-theme="light"] {
  /* tokens: light */
  --paper: #fbfcfd;
  --sheet: #ffffff;
  --panel: #f2f5f7;
  --well: #f5f6f8;
  --band: #ebf1f3;
  --band-edge: #d7e1e5;
  --ink: #14212b;
  --ink-2: #44535f;
  --ink-3: #5b6a76;
  --rule: #cdd7dd;
  --rule-soft: #e2e8ec;
  --outline: #7a8893;
  --teal: #0f6e6e;
  --teal-deep: #0b5656;
  --teal-wash: #e4f1f0;
  --on-teal: #ffffff;
  --marker: #ffe27a;
  --marker-soft: #fff4c4;
  --halo: #ffffff;
  --grid: rgba(15, 110, 110, 0.12);
  --grid-strong: rgba(15, 110, 110, 0.22);
  --foot: #14212b;
  --foot-edge: #14212b;
  --foot-ink: #ffffff;
  --foot-ink-2: #c3ced6;
  --foot-rule: #33434f;
  --mark-ground: #4db6ae;
  --sticker-ink: #14212b;
  --st-yellow: #ffe27a;
  --st-mint: #bfe6df;
  --st-sky: #cfe2f6;
  --st-coral: #ffd0c2;
  --st-lilac: #e2d8f8;
  --code-bg: #f2f5f7;
  --code-key: #0f6e6e;
  --code-string: #1d6b45;
  --code-number: #2456b8;
  --code-keyword: #8a5300;
  --code-muted: #5b6a76;
  --term-bg: #14212b;
  --term-edge: #14212b;
  --term-text: #eef2f5;
  --term-muted: #a9b7c1;
  --term-accent: #6cc5bd;
  --mark-bg: #fff4c4;
  --mark-edge: #c98a1a;
  --shadow: 0 1px 2px rgba(20, 33, 43, 0.05), 0 8px 24px rgba(20, 33, 43, 0.06);
  --shadow-high: 0 16px 48px rgba(20, 33, 43, 0.22), 0 2px 6px rgba(20, 33, 43, 0.08);
  --sticker-shadow: 0 1px 0 rgba(20, 33, 43, 0.18), 0 6px 14px -8px rgba(20, 33, 43, 0.45);
  --scroll-shade: rgba(20, 33, 43, 0.16);
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* tokens: dark */
  --paper: #0f161b;
  --sheet: #18232b;
  --panel: #1e2a33;
  --well: #121b21;
  --band: #132027;
  --band-edge: #22323b;
  --ink: #e7eef2;
  --ink-2: #b9c6cf;
  --ink-3: #9aa9b4;
  --rule: #3a4a55;
  --rule-soft: #26343d;
  --outline: #7d8c97;
  --teal: #4db6ae;
  --teal-deep: #7fd0c8;
  --teal-wash: #173634;
  --on-teal: #08201f;
  --marker: #6e5c12;
  --marker-soft: #2c2815;
  --halo: #18232b;
  --grid: rgba(77, 182, 174, 0.09);
  --grid-strong: rgba(77, 182, 174, 0.17);
  --foot: #090e12;
  --foot-edge: #22323b;
  --foot-ink: #e7eef2;
  --foot-ink-2: #a9b7c1;
  --foot-rule: #22323b;
  --mark-ground: #4db6ae;
  --sticker-ink: #14212b;
  --st-yellow: #e8cf6b;
  --st-mint: #a8d4cc;
  --st-sky: #b8cde4;
  --st-coral: #e9bcae;
  --st-lilac: #cbc1e6;
  --code-bg: #131c22;
  --code-key: #6cc5bd;
  --code-string: #7fcf9f;
  --code-number: #9bb8f5;
  --code-keyword: #e3b064;
  --code-muted: #9aa9b4;
  --term-bg: #090e12;
  --term-edge: #22323b;
  --term-text: #e7eef2;
  --term-muted: #a9b7c1;
  --term-accent: #6cc5bd;
  --mark-bg: #3a3120;
  --mark-edge: #e0aa55;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-high: 0 16px 48px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --sticker-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 8px 16px -8px rgba(0, 0, 0, 0.8);
  --scroll-shade: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root {
  --font-text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --s-body: 1.0625rem;
  --s-small: 0.9375rem;
  --s-tiny: 0.8125rem;
  --s-h3: 1.375rem;
  --s-h2: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem);
  --s-h1: clamp(2.25rem, 1.3rem + 3.2vw, 3.625rem);
  --radius-s: 6px;
  --radius-m: 8px;
  --radius: 10px;
  --radius-box: 12px;
  --radius-l: 16px;
  --quick: 120ms;
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --page-max: 1180px;
}
@media (max-width: 600px) { :root { --header-h: 58px; } }

/* ------------------------------------------------------------------ page */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--paper); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
.site-header :focus-visible, .site-footer :focus-visible, main:not(.playground-main) :focus-visible, .search-dialog :focus-visible, .skip-link:focus-visible {
  outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px;
}
main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-container { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: var(--gutter); top: -60px; z-index: 50; padding: 8px 14px; border-radius: 999px; background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); font: 600 15px/1.2 var(--font-text); text-decoration: none; }
.skip-link:focus { top: 10px; }

/* ------------------------------------------------------------------ the bar */

/* On a sheet, spanning the window, a thin line under it; it stays at the top as the page scrolls. */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--sheet); color: var(--ink);
  border-bottom: 1px solid var(--band-edge);
  font-family: var(--font-text); font-size: var(--s-small); line-height: 1.4;
}
.site-header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; border-radius: var(--radius-m); }
.brand-mark { display: block; flex: none; }
.brand-mark-ground { fill: var(--teal); }
.brand-mark-ring { stroke: var(--on-teal); }
.brand-name { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.005em; white-space: nowrap; }
.site-nav { margin-inline-start: auto; }
.site-nav-links { display: flex; align-items: center; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.site-nav-links a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; text-underline-offset: 3px; }
.site-nav-links a:hover { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1px; }
.site-nav-links a[aria-current="page"] { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.site-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink); font: 500 14px/1 var(--font-text); cursor: pointer; transition: background-color var(--quick) ease, border-color var(--quick) ease; }
.tool-button:hover { background: var(--panel); border-color: var(--outline); }
.tool-button[hidden] { display: none; }
.search-open { padding-inline: 12px 8px; color: var(--ink-3); }
.search-key { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid var(--rule); border-radius: var(--radius-s); font: 500 12px/1 var(--font-mono); color: var(--ink-3); background: var(--panel); }
.theme-switch .icon-sun { display: none; }
[data-theme="dark"] .theme-switch .icon-sun { display: block; }
[data-theme="dark"] .theme-switch .icon-moon { display: none; }
/* The link to the repository is a round button that holds GitHub's own mark. GitHub's logo rules allow the mark
   in black or white only, so it is black on the light theme and white on the dark one, pointed at or not. */
.site-nav-repo { width: 40px; padding: 0; color: #000; text-decoration: none; }
.site-nav-repo:hover { color: #000; text-decoration: none; }
[data-theme="dark"] .site-nav-repo, [data-theme="dark"] .site-nav-repo:hover { color: #fff; }
.github-mark { display: block; flex: none; }
.menu-button { border: 1.5px solid var(--ink); font-weight: 600; padding-inline: 14px; }

@media (max-width: 1100px) {
  .search-open-label, .search-key { display: none; }
  .search-open { padding: 0; width: 40px; }
}
@media (max-width: 1000px) {
  .js .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; padding: 8px var(--gutter) 16px; background: var(--sheet); border-bottom: 1px solid var(--band-edge); box-shadow: var(--shadow); }
  .js .site-nav.is-open { display: block; }
  .js .site-nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .site-nav-links a { padding: 12px 14px; border-radius: var(--radius-box); font-size: 16px; }
  .js .site-nav-links a:hover { background: var(--panel); text-decoration: none; }
  .js .site-nav-links a[aria-current="page"] { background: var(--teal-wash); text-decoration: none; }
  .site-tools { margin-inline-start: auto; }
  html:not(.js) .site-header-inner { flex-wrap: wrap; height: auto; padding-block: 10px; }
  html:not(.js) .site-nav { order: 3; width: 100%; overflow-x: auto; }
}
@media (min-width: 1001px) { .menu-button { display: none !important; } }
/* A narrow header has no room for the link to the repository beside its name; the foot of every page has it. */
@media (max-width: 560px) { .site-nav-repo { display: none; } }
@media (max-width: 400px) {
  .site-header-inner { gap: 10px; }
  .brand-name { font-size: 16px; }
  .menu-label { display: none; }
  .menu-button { width: 40px; padding: 0; }
}
@media (max-width: 360px) { .brand-name { display: none; } }

/* ------------------------------------------------------------------ type and shared parts */

.eyebrow { margin: 0 0 12px; color: var(--ink-3); font: 400 var(--s-tiny)/1.4 var(--font-mono); letter-spacing: 0.01em; }
.eyebrow code { font-size: 1em; }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 46rem; margin: 0 0 16px; }
.note { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius-box); background: var(--teal-wash); color: var(--ink); }
/* Buttons: a pill with an ink edge; the one to press first is teal. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sheet); color: var(--ink); font: 600 1rem/1.2 var(--font-text); text-decoration: none; transition: background-color var(--quick) ease, border-color var(--quick) ease; }
.button:hover { background: var(--panel); }
.button-primary { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.button-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--on-teal); }
.button .arr { font-family: var(--font-mono); }

main:not(.playground-main) code, .site-footer code, .search-dialog code { font-family: var(--font-mono); font-size: 0.9em; }
main:not(.playground-main) :not(pre) > code:not(.ln) { padding: 0.1em 0.35em; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--rule-soft); overflow-wrap: anywhere; }
main:not(.playground-main) a:not(.button) { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
main:not(.playground-main) a:not(.button):hover { text-decoration-thickness: 2px; }
main:not(.playground-main) a code { color: inherit; }
main:not(.playground-main) p { text-wrap: pretty; }

/* Bands: what you look at sits on a tint that spans the window, what you read stays on the page
   ground. On a tint, the page ground and the panels inside it take the tint and the sheet. */
.band { padding-block: 76px; }
.band.tint { --paper: var(--band); --panel: var(--sheet); background: var(--band); border-block: 1px solid var(--band-edge); }
.band.tint + .band.tint { border-top: 0; }
.band h2 { margin: 0 0 12px; font-weight: 800; font-size: var(--s-h2); line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.section-lead { max-width: 46rem; margin: 0 0 32px; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 560px) { .band { padding-block: 52px; } }

/* The light and the dark picture of an app; the one that fits the theme shows. */
.shot-dark { display: none !important; }
[data-theme="dark"] .shot-dark { display: block !important; }
[data-theme="dark"] .shot-light { display: none !important; }
.shot-frame { border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--ink); background: var(--sheet); }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-frame-phone { border-radius: 22px; }
.shot-frame-phone img { aspect-ratio: 390 / 640; object-fit: cover; object-position: top; }

/* Real output of a command, set as a terminal sets it, in both modes. */
.terminal { margin: 0; padding: 14px 18px; border-radius: var(--radius); background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-edge); font: 12.5px/1.65 var(--font-mono); white-space: pre; overflow-x: auto; tab-size: 2; }
.terminal-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-prompt { color: var(--term-accent); user-select: none; -webkit-user-select: none; }
.term-command { color: var(--term-text); font-weight: 600; }
.term-gap { color: var(--term-muted); font-style: italic; font-family: var(--font-text); font-size: 12px; }
.term-gap::before { content: "\22EF  "; font-style: normal; }
.terminal:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* A document's own lines, highlighted. */
.example-code { min-width: 0; }
.example-code .excerpt-block + .excerpt-block { margin-top: 16px; }
.excerpt-where { margin: 0 0 6px; color: var(--ink-3); font: 400 var(--s-tiny)/1.4 var(--font-mono); }
.excerpt-where code { font-size: 1em; }
.example-code .hl { margin: 0; }
/* The excerpt keeps its lines and scrolls sideways in its own box; a shade at an edge says there is
   more that way (the covers move with the text, the shades stay with the box). */
.example-code .hl pre {
  margin: 0; white-space: pre; overflow-x: auto; overflow-wrap: normal; border: 1.5px solid var(--ink);
  background:
    linear-gradient(to right, var(--sheet) 40%, transparent) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--sheet) 40%, transparent) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shade), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shade), transparent) right center / 14px 100% no-repeat scroll,
    var(--sheet);
}
.hl .hll { display: block; width: max-content; min-width: calc(100% + 32px); margin-inline: -16px; padding-inline: 16px; background: var(--mark-bg); box-shadow: inset 3px 0 0 var(--mark-edge); }

/* ------------------------------------------------------------------ home */

.home { font-size: var(--s-body); line-height: 1.55; }
.home h1, .home h2, .home h3, .home h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; line-height: 1.12; }
.home h2 { font-size: var(--s-h2); }
.home h3 { font-size: var(--s-h3); line-height: 1.2; }
.home p { margin: 0; }
.home img { display: block; max-width: 100%; height: auto; }
.home figure { margin: 0; }
.home .band { padding-block: 0 76px; }
.home .band > .site-container { padding-top: 76px; }
.home .band.last { padding-bottom: 76px; }
.mono { font-family: var(--font-mono); }

/* the opening: drafting paper behind the words, the request and its app */
.opening { position: relative; isolation: isolate; }
.opening::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 112px 112px, 112px 112px, 28px 28px, 28px 28px;
  background-position: calc(50% + 14px) -1px;
  -webkit-mask-image: radial-gradient(130% 125% at 100% 0%, #000 0%, rgba(0,0,0,0.6) 40%, transparent 80%);
          mask-image: radial-gradient(130% 125% at 100% 0%, #000 0%, rgba(0,0,0,0.6) 40%, transparent 80%);
}
.open { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
.open h1 { font-size: var(--s-h1); letter-spacing: -0.02em; }
.open .lede { margin-top: 22px; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 34ch; }
.open .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.open .after { margin-top: 18px; font-size: var(--s-small); color: var(--ink-3); }
.cover { position: relative; }
.ask { position: relative; z-index: 2; max-width: 440px; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 14px 14px 14px 4px; padding: 14px 18px 16px; font-size: 1.0625rem; line-height: 1.45; }
.ask .who { display: block; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-3); margin-bottom: 4px; }
.cover .later { position: absolute; z-index: 3; right: 6%; top: 10px; display: flex; align-items: flex-end; gap: 6px; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--teal-deep); }
.cover .later svg { width: 92px; height: 70px; }
.cover .later-words { margin-bottom: 46px; }
.window { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.window .strip { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-3); background: var(--sheet); }
.window .strip i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); display: inline-block; }
.window img { width: 100%; }
.cover .window { margin-top: 18px; margin-left: 9%; }
.crop { position: relative; overflow: hidden; }
.top-crop { position: relative; overflow: hidden; }
.top-crop img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.ar-cover { aspect-ratio: 1650 / 620; }
.ar-made { aspect-ratio: 1650 / 880; }
.ar-browser { aspect-ratio: 1650 / 900; }
.ar-chat { aspect-ratio: 780 / 470; }

/* the walk */
.walk-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 28px; margin-bottom: 40px; }
.walk-head h2 { grid-column: 2; }
.walk-head p { grid-column: 2; margin-top: 10px; color: var(--ink-2); max-width: 62ch; }
.walk-steps { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: walk; }
.walk-steps::before { content: ""; position: absolute; left: 35px; top: 30px; bottom: 30px; border-left: 2px dotted var(--rule); }
.step { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 28px; padding-bottom: 54px; position: relative; counter-increment: walk; }
.step:last-child { padding-bottom: 0; }
.num { position: relative; z-index: 1; width: 60px; height: 60px; margin-left: 6px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.num::before { content: counter(walk); }
.step-body { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 20px 48px; align-items: start; padding-top: 12px; }
.step-body.full { grid-template-columns: minmax(0, 1fr); }
.step-text h3 { margin-bottom: 10px; }
.step-text p { color: var(--ink-2); max-width: 60ch; }
.step-body.full .step-text { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 10px 48px; align-items: baseline; }
.step-body.full .step-text h3 { margin: 0; }
.cap { margin-top: 10px; font-size: var(--s-tiny); color: var(--ink-3); font-family: var(--font-mono); line-height: 1.5; }

/* letter keys shared by the request, the file and the app */
.key { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: var(--on-teal); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; line-height: 1; flex: none; transition: transform .15s ease, box-shadow .15s ease; }
[data-key].on .key, .pin.on { transform: scale(1.18); box-shadow: 0 0 0 4px var(--marker); }

/* step 1: the request, marked up */
.slip { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 14px 14px 14px 4px; padding: 20px 24px; font-size: 1.3125rem; line-height: 1.75; max-width: 640px; }
.slip mark { background: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%); color: inherit; padding: 0 1px; transition: background .15s ease; }
.slip mark.on { background: var(--marker); }
.slip mark .key { width: 19px; height: 19px; font-size: 0.6875rem; vertical-align: 0.45em; margin-left: 2px; }

/* step 2: the exploded drawing, lines of the file led to what they make */
.exploded { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; margin-top: 8px; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.leaders .halo { stroke: var(--halo); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.leaders .line { stroke: var(--teal); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .15s ease; }
.leaders .line.on { stroke-width: 2.75; }
.leaders .dot { fill: var(--teal); }
.file { position: relative; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; }
.file-head { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: var(--s-tiny); }
.grp { position: relative; padding: 10px 14px 12px; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; }
.grp .key { margin-top: 1px; }
.grp.on { background: var(--marker-soft); }
.grp-plain { grid-template-columns: minmax(0, 1fr); }
.home .grp-plain code.ln, .grp-plain .ln-note { grid-column: 1; }
.home code.ln { display: grid; grid-template-columns: 3.2ch minmax(0, 1fr); column-gap: 1.2ch; grid-column: 2; font-family: var(--font-mono); font-size: inherit; }
.ln .n { color: var(--ink-3); text-align: right; user-select: none; -webkit-user-select: none; }
.ln .t { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
/* The file's own indentation, kept as spaces and drawn narrower, so a copied line keeps it. */
.ln .ind { font-size: 0.3em; }
.ln .t b { font-weight: 600; color: var(--teal-deep); }
.ln-note { grid-column: 2; margin-top: 4px; font-family: var(--font-text); font-size: var(--s-small); line-height: 1.4; color: var(--ink-2); }
.ln-gap { padding: 0 14px 0 46px; color: var(--ink-3); line-height: 1; letter-spacing: 0.2em; font-size: 0.875rem; }
.grp-plain + .ln-gap { padding-left: 14px; }
.dim { position: absolute; left: -30px; top: 40px; bottom: 10px; width: 14px; border-left: 1.5px solid var(--ink-3); }
.dim::before, .dim::after { content: ""; position: absolute; left: -6px; width: 11px; border-top: 1.5px solid var(--ink-3); }
.dim::before { top: 0; } .dim::after { bottom: 0; }
.dim span { position: absolute; left: -12px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; background: var(--paper); padding: 0 6px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); }
.app-fig { position: relative; }
.app-fig .window { position: relative; }
.pins { position: absolute; inset: 0; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; box-shadow: 0 0 0 2.5px var(--sheet); font-size: 0.8125rem; }
.pin.on { box-shadow: 0 0 0 2.5px var(--sheet), 0 0 0 6px var(--marker); }
/* Where each letter stands on the picture of Trip savings in a wide window, in its own proportions: beside what
   it names, never on it, and at a height where nothing stands between it and the picture's left edge, which is
   the way its line comes. */
.pin-a { left: 81.6%; top: 30.4%; }
.pin-b { left: max(2.6%, 15px); top: 46.3%; }
.pin-c { left: 25.3%; top: 70.3%; }
.pin-d { left: 91.7%; top: 81%; }
/* On a small screen the picture is small too, so the letters are smaller, to cover less of it. */
@media (max-width: 640px) {
  .pin { width: 18px; height: 18px; font-size: 0.6875rem; box-shadow: 0 0 0 2px var(--sheet); }
  .pin-b { left: max(2.6%, 12px); }
}

/* step 3: the explanation */
.printout { background: var(--panel); border-radius: var(--radius); padding: 16px 20px; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; }
.printout .ph { font-size: var(--s-tiny); color: var(--ink-3); margin-bottom: 8px; }
.printout ul { margin: 0; padding: 0; list-style: none; }
.printout li { padding-left: 2ch; text-indent: -2ch; }
.printout li + li { margin-top: 4px; }

/* step 4: three places */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home .place h4 { margin: 0 0 8px; font-size: var(--s-small); font-weight: 800; }
.chat { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; }
.chat .me { justify-self: end; max-width: 86%; background: var(--teal-wash); border-radius: 12px 12px 4px 12px; padding: 6px 10px; font-size: var(--s-tiny); line-height: 1.4; }
.chat .appcard { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.agent .file { font-size: 0.78rem; }

/* step 5 */
.keepask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* the answer: couldn't I just ask my chat? */
.versus { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; align-items: start; }
.home .versus h2 { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem); }
.versus .honest { margin-top: 12px; color: var(--ink-2); max-width: 42ch; }
.versus .more { margin-top: 14px; font-size: var(--s-small); }
.vs { width: 100%; border-collapse: collapse; border-bottom: 1.5px solid var(--ink); font-size: var(--s-small); line-height: 1.45; }
.vs th { text-align: left; vertical-align: bottom; font-family: var(--font-mono); font-weight: 400; font-size: var(--s-tiny); color: var(--ink-3); padding: 0 18px 8px 0; border-bottom: 1px solid var(--ink); }
.vs th.ours { color: var(--teal-deep); font-weight: 600; }
.vs td { vertical-align: top; padding: 11px 18px 11px 0; border-bottom: 1px solid var(--rule); }
.vs tr:last-child td { border-bottom: 0; }
.vs td:last-child, .vs th:last-child { padding-right: 0; }
.vs .what { width: 22%; font-weight: 800; color: var(--ink); }
.vs .theirs { width: 30%; color: var(--ink-2); }
.vs .ours { color: var(--ink); }
.vs td.ours { padding-left: 26px; position: relative; }
.vs td.ours::before { content: ""; position: absolute; left: 6px; top: 15px; width: 5px; height: 10px; border: solid var(--teal); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.vs td > span.l { display: none; }
.vs .ref { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }

.section-head { max-width: 720px; }
.section-head p { margin-top: 10px; color: var(--ink-2); }

/* the wall: how far it stretches. The tiles are pictures taken at their own proportions. */
.wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 236px 236px auto; gap: 22px;
  grid-template-areas:
    "o o o o o o f f a a a a"
    "o o o o o o f f s s s s"
    "k k k k k k k k k k k k";
  margin-top: 34px; }
.hung { position: relative; margin: 0; min-width: 0; display: flex; flex-direction: column; }
.hung .pic { flex: 1; min-height: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--sheet); }
.hung .pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.sticker { position: relative; z-index: 2; align-self: flex-start; max-width: calc(100% - 22px); margin: -34px 0 0 12px; padding: 8px 12px 9px; border-radius: 6px; background: var(--c); color: var(--sticker-ink);
  transform: rotate(var(--tilt, -1deg)); transform-origin: 0 100%; box-shadow: var(--sticker-shadow); transition: transform .2s ease; }
.hung:hover .sticker { transform: rotate(0deg); }
.sticker b, .nslip b { display: block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; }
.sticker q, .nslip q { display: block; font-style: italic; font-size: 0.9375rem; line-height: 1.32; quotes: "\201C" "\201D"; }
.w-o { grid-area: o; --c: var(--st-yellow); --tilt: -1.2deg; }
.w-o .sticker { position: absolute; left: 6px; bottom: 18px; margin: 0; max-width: 24em; }
.w-o .sticker q { font-size: 1.0625rem; }
.w-f { grid-area: f; --c: var(--st-sky); --tilt: 1deg; }
.w-f .sticker { margin-left: 6px; max-width: calc(100% - 10px); }
.w-a { grid-area: a; --c: var(--st-mint); --tilt: 0.8deg; }
.w-s { grid-area: s; --c: var(--st-lilac); --tilt: -0.8deg; }
.wall-end { grid-area: k; display: grid; gap: 22px; align-content: start; }
.slips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-content: start; padding-top: 8px; }
.nslip { background: var(--c); color: var(--sticker-ink); border-radius: 6px; padding: 14px 16px 16px; transform: rotate(var(--tilt, 0deg)); box-shadow: var(--sticker-shadow); }
.nslip q { font-size: 1rem; margin-top: 4px; }
.k1 { --c: var(--st-mint); --tilt: -0.7deg; } .k2 { --c: var(--st-yellow); --tilt: 0.6deg; } .k3 { --c: var(--st-coral); --tilt: -0.5deg; }
.wall-more { font-size: var(--s-small); font-weight: 600; }

/* the ledger: everyday uses */
.ledger { width: 100%; margin-top: 28px; border-collapse: collapse; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.ledger th { text-align: left; font-family: var(--font-mono); font-weight: 400; font-size: var(--s-tiny); color: var(--ink-3); padding: 10px 20px 10px 0; border-bottom: 1px solid var(--ink); }
.ledger td { vertical-align: top; padding: 16px 24px 16px 0; border-bottom: 1px solid var(--rule); font-size: var(--s-small); line-height: 1.45; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td:last-child, .ledger th:last-child { padding-right: 0; }
.ledger .job { width: 21%; font-weight: 800; font-size: 1rem; color: var(--ink); }
.ledger .said-it { width: 46%; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink); }
.ledger .said-it q { quotes: "\201C" "\201D"; }
.ledger .got { color: var(--ink-2); }
.ledger .got b { display: block; color: var(--ink); font-weight: 800; }
.ledger .got .thumb { float: right; width: 128px; margin: 2px 0 6px 14px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--well); }
.ledger .got .thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 0 0; }
.week .all { margin-top: 14px; font-size: var(--s-small); }

/* the pieces */
.pieces-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.kinds { margin: 18px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.875rem; columns: 2; column-gap: 24px; }
.kinds li { padding: 5px 0; border-bottom: 1px dotted var(--rule); break-inside: avoid; }
.pieces .more { margin-top: 18px; font-size: var(--s-small); }
.tray { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding: 20px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--sheet); }
.piece { margin: 0; }
.piece .well { height: 112px; display: grid; place-items: center; border: 1px dashed var(--rule); border-radius: 6px; background: var(--well); padding: 8px; }
.piece .well img { width: auto; height: auto; max-width: 100%; max-height: 94px; border-radius: 4px; }
.piece figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-2); }
.piece figcaption b { color: var(--ink); font-weight: 600; }

/* how to start */
.routes { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; margin-top: 30px; }
.route { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px 26px; background: var(--sheet); }
.home .route h3 { font-size: 1.25rem; }
.route .tag { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--teal-deep); background: var(--teal-wash); border-radius: 4px; padding: 2px 8px; }
.route ol { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 12px; }
.route ol li { counter-increment: r; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; color: var(--ink-2); }
.route ol li::before { content: counter(r); width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.875rem; color: var(--ink); }
.route ol li strong { color: var(--ink); }
.later-routes { display: grid; gap: 0; border: 1.5px solid var(--rule); border-radius: var(--radius); background: transparent; }
.later-routes .r { padding: 18px 22px; }
.later-routes .r + .r { border-top: 1px solid var(--rule); }
.home .later-routes h3 { font-size: 1.0625rem; }
.later-routes p { margin-top: 4px; color: var(--ink-2); font-size: var(--s-small); }
.later-routes .wait { padding: 12px 22px; border-top: 1px solid var(--rule); font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-3); }
.home h3 a { color: inherit !important; text-decoration-thickness: 1px; }

@media (max-width: 1040px) {
  .open { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .open .lede { max-width: 52ch; }
  .opening::before { -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.5) 30%, transparent 55%); mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,0.5) 30%, transparent 55%); }
  .exploded { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .leaders, .dim { display: none; }
  .step-body.full .step-text { grid-template-columns: minmax(0, 1fr); }
  .versus { grid-template-columns: minmax(0, 1fr); }
  .pieces-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .routes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .step-body { grid-template-columns: minmax(0, 1fr); }
  .places { grid-template-columns: minmax(0, 1fr); }
  .keepask { grid-template-columns: minmax(0, 1fr); }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-template-areas: "o o" "f a" "f s" "k k"; }
  .wall .hung .pic { height: 210px; flex: none; }
  .w-o .pic { height: 320px !important; }
  .w-f .pic { height: auto !important; flex: 1; min-height: 300px; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: auto !important; }
  .ledger tr { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .ledger tr:last-child { border-bottom: 0; }
  .ledger td { padding: 0; border: 0; }
  .ledger td + td { margin-top: 8px; }
  .ledger td[data-l]::before { content: attr(data-l); display: block; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-3); margin-bottom: 2px; }
}
@media (max-width: 560px) {
  .home .band > .site-container { padding-top: 52px; }
  .home .band { padding-bottom: 52px; }
  .open { padding-top: 32px; padding-bottom: 52px; }
  .ln .ind { font-size: 0.08em; }
  .file-head { flex-direction: column; gap: 0; }
  .grp { padding: 10px 12px 12px; column-gap: 8px; }
  .tray { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .piece .well { height: 110px; }
  .step, .walk-head { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; }
  .num { width: 40px; height: 40px; margin-left: 2px; font-size: 1.25rem; }
  .walk-steps::before { left: 21px; }
  .step-body { padding-top: 4px; }
  .walk-head h2, .walk-head p { grid-column: 1 / -1; }
  .slip { font-size: 1.125rem; padding: 16px 18px; }
  .cover .window { margin-left: 0; }
  .cover .later { display: none; }
  .vs thead { display: none; }
  .vs, .vs tbody, .vs tr, .vs td { display: block; width: auto !important; }
  .vs tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .vs tr:last-child { border-bottom: 0; }
  .vs td { padding: 0; border: 0; }
  .vs td + td { margin-top: 6px; }
  .vs td.ours { padding-left: 0; }
  .vs td.ours::before { display: none; }
  .vs td[data-l] > span.l { display: block; font-family: var(--font-mono); font-size: var(--s-tiny); color: var(--ink-3); }
  .wall { grid-template-columns: minmax(0, 1fr); grid-template-areas: "o" "a" "f" "s" "k"; }
  .w-o .pic { height: 230px !important; }
  .w-f .pic { min-height: 0; height: 300px !important; flex: none; }
  .w-o .sticker { position: relative; left: auto; bottom: auto; margin: -34px 0 0 10px; }
  .slips { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ledger .got .thumb { width: 104px; }
}

/* ------------------------------------------------------------------ what shows each difference */

.claims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 8px 0 0; padding: 0; list-style: none; }
.claims li { border-top: 1px solid var(--rule); }
main .claims a.claim { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0; color: var(--ink); text-decoration: none; }
.claim-icon { display: block; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--teal-wash); color: var(--teal-deep); }
.claim-name { display: block; font-weight: 800; font-size: 1.125rem; line-height: 1.3; }
.claim-more { display: block; margin-top: 2px; color: var(--ink-2); font-size: var(--s-small); line-height: 1.5; }
main .claims a.claim:hover .claim-name { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 760px) { .claims { grid-template-columns: minmax(0, 1fr); } }

.proofs { counter-reset: proof; }
.proof { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; padding: 48px 0; border-top: 1px solid var(--rule); }
.proofs .section-lead + .proof { border-top: 0; padding-top: 8px; }
.proof-text { counter-increment: proof; }
.proof-text h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-weight: 800; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.proof-text h3::before { content: counter(proof); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 800 16px/1 var(--font-text); letter-spacing: 0; }
.proof-text p { margin: 0 0 14px; }
.proof .proof-source { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; }
@media (min-width: 1001px) { .proof-text { position: sticky; top: calc(var(--header-h) + 32px); } }
.proof-show { min-width: 0; }
.proof-figure { margin: 0; min-width: 0; }
.proof-figure figcaption, .device figcaption, .page-figure figcaption { margin-top: 10px; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.proof-figure .example-code { margin-bottom: 12px; }
.device-pair { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 20px; align-items: end; margin-bottom: 28px; }
.device { margin: 0; min-width: 0; }
.drawn-note { margin: 24px 0 0; padding: 16px 20px; max-width: 52rem; border-radius: var(--radius); background: var(--sheet); border: 1.5px solid var(--ink); color: var(--ink); }
.proof-text code, .drawn-note code { white-space: nowrap; }
@media (max-width: 1000px) { .proof { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 40px 0; } }
@media (max-width: 600px) {
  .device-pair { grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; }
  .shot-frame-phone { border-radius: 16px; }
  .proof-text h3 { font-size: 1.3125rem; }
  .terminal { font-size: 11.5px; padding: 12px 14px; }
}

/* ------------------------------------------------------------------ examples */

.example-group + .example-group { margin-top: 56px; }
.example-group h2 { margin: 0 0 6px; font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.15; }
.example-group > p { margin: 0 0 24px; color: var(--ink-2); max-width: 46rem; }
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin: 0; padding: 0; list-style: none; }
.example { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.example:has(.example-link:focus-visible) { outline: 3px solid var(--teal); outline-offset: 3px; }
.example-shot { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.example-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.example-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 20px 18px; }
.example h3 { margin: 0 0 6px; font-weight: 800; font-size: 1.1875rem; line-height: 1.25; }
.examples .example h3 .example-link { color: var(--ink); text-decoration: none; }
.examples .example h3 .example-link::after { content: ""; position: absolute; inset: 0; }
.examples .example h3 .example-link:focus-visible { outline: none; }
.example p { margin: 0 0 10px; color: var(--ink-2); font-size: var(--s-small); line-height: 1.5; }
.example .example-shows { color: var(--ink-3); font: 400 var(--s-tiny)/1.5 var(--font-mono); }
.example .example-open { margin: auto 0 0; padding-top: 4px; color: var(--teal-deep); font-weight: 600; font-size: var(--s-small); }
.example:hover .example-open { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) { .examples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .examples { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* One app as it opens for a reader of each of its languages: phone pictures side by side, each
   under the name of its language written in that language. */
.readers { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.readers > li { flex: 1 1 0; min-width: 0; max-width: 320px; }
.reader { margin: 0; }
.reader-name { margin: 0 0 12px; font-weight: 800; font-size: 1.125rem; line-height: 1.3; color: var(--ink); }
.readers-figure > figcaption { max-width: 46rem; }
.shot-frame-reader { border-radius: 22px; }
.readers-more { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 32px 0 0; }
.readers-more a:not(.button) { font-weight: 600; }
@media (max-width: 700px) { .readers { flex-direction: column; gap: 24px; } .readers > li { flex: none; width: 100%; } }

/* ------------------------------------------------------------------ docs */

.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.parts li { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.part-link { font-size: 1.125rem; font-weight: 800; text-decoration: none !important; }
.part-link:hover { text-decoration: underline !important; }
.parts p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--s-small); line-height: 1.55; }
@media (max-width: 1000px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .parts { grid-template-columns: minmax(0, 1fr); } }
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0; padding: 0; list-style: none; }
.ref-card { position: relative; padding: 20px 22px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--sheet); }
.ref-card h3 { margin: 0 0 6px; font-weight: 800; font-size: 1.25rem; line-height: 1.25; }
.ref-card p { margin: 0; color: var(--ink-2); }
.ref-card .ref-files { margin-top: 10px; font: 400 var(--s-tiny)/1.5 var(--font-mono); color: var(--ink-3); }
@media (max-width: 760px) { .refs { grid-template-columns: minmax(0, 1fr); } }
.status { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; }
.status p { max-width: 42rem; margin: 0 0 14px; }
.status h2 { margin-bottom: 16px; }
@media (max-width: 800px) { .status { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* ------------------------------------------------------------------ components */

.components-main { display: block; padding-bottom: 88px; }
.components-head { padding-top: 40px; margin-bottom: 24px; }
.components-head h1 { margin: 0 0 16px; font-weight: 800; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.02em; }
.components-head .lead { max-width: 46rem; }
.gallery-frame { overflow: hidden; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--sheet); }
/* The gallery's height: the window below the header, less room for the words above, within bounds. */
.page-components oad-playground.gallery-app { display: block; height: clamp(540px, calc(100vh - var(--header-h) - 96px), 820px); height: clamp(540px, calc(100dvh - var(--header-h) - 96px), 820px); }
.gallery-noscript { padding: 24px; }
.gallery-note { max-width: 46rem; margin: 12px 0 0; color: var(--ink-3); font-size: 14.5px; }
.components-section { margin-top: 64px; }
.components-section h2 { margin: 0 0 12px; font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.01em; }
.control-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.control-index li { padding: 14px 0 16px; border-top: 1px solid var(--rule); }
.control-index .control-link { font-weight: 600; }
.control-index .control-link code { font-size: 15px; }
.control-index p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 1000px) { .control-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .control-index { grid-template-columns: minmax(0, 1fr); } .page-components oad-playground.gallery-app { height: clamp(520px, calc(100dvh - var(--header-h) - 64px), 720px); } }
.byo { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; padding: 28px 32px; border-radius: var(--radius); background: var(--band); border: 1px solid var(--band-edge); }
.byo h2 { margin-bottom: 8px; }
.byo p { margin: 0; max-width: 40rem; }
@media (max-width: 800px) { .byo { flex-direction: column; align-items: flex-start; padding: 22px; } }

/* ------------------------------------------------------------------ plain pages */

.page { padding-top: 40px; padding-bottom: 80px; }
/* A page that reads as a column starts at the header's left edge and keeps its lines short. */
.page-narrow > * { max-width: 40rem; }
.page-head { margin-bottom: 32px; }
.page h1, .prose h1 { margin: 0 0 16px; font-weight: 800; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.page > section > h2, .page section > h2 { margin: 40px 0 12px; font-weight: 800; font-size: 1.5rem; line-height: 1.25; }
.page p { max-width: 40rem; }
.page pre { margin: 16px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--rule-soft); font: 13.5px/1.6 var(--font-mono); overflow-x: auto; }
.page-note { margin-top: 32px; color: var(--ink-3); }
.page section > h3 { margin: 32px 0 10px; font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.page section > h2 + h3 { margin-top: 16px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; margin: 0 0 12px; padding-left: 38px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--sheet); border: 1.5px solid var(--ink); color: var(--ink); font: 800 13px/1 var(--font-text); }
.steps-long { margin: 16px 0 20px; }
.steps-long > li { margin-bottom: 14px; }
.steps-long pre { margin: 10px 0; }
.page .plain-list { margin: 0 0 16px; padding-left: 1.2em; }
.page .plain-list li { margin: 0 0 10px; }
.page-figure { margin: 24px 0; }
/* A page with code wider than its reading column: the column of text stays where it is. */
.page-wide-code > * { max-width: 48rem; }
.page-wide-code p, .page-wide-code .plain-list { max-width: 40rem; }
/* An index page: its lead, its words and its list share one width. */
.page-index .page-head > *, .page-index .index-list { max-width: 46rem; }
/* A page made of bands: its head on the page ground, then sections that span the window. */
.page-top { padding-top: 40px; padding-bottom: 48px; }
.page-top .page-head { margin-bottom: 0; }
.page-top h1 { margin: 0 0 16px; font-weight: 800; font-size: var(--s-h1); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.page-top .page-head + section { margin-top: 36px; }
.claims-title { margin: 0 0 4px; font: 400 var(--s-tiny)/1.4 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 600px) { .page-top { padding-top: 28px; padding-bottom: 36px; } }

/* Who a page is for, and the button that copies its own text as Markdown. */
.page-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 20px; padding: 10px 0; border-block: 1px solid var(--rule-soft); }
.page-head .page-tools { margin: 0 0 16px; }
.for-whom { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.5; }
.page-head > .for-whom { margin: 0 0 14px; }
.page .page-tools .for-whom { max-width: none; flex: 1 1 20rem; }
.copy-md { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--sheet); color: var(--ink); font: 600 13.5px/1 var(--font-text); cursor: pointer; transition: background-color var(--quick) ease; }
.copy-md:hover { background: var(--panel); }
.copy-md[hidden] { display: none; }
.copy-md.is-done { border-color: var(--teal); color: var(--teal-deep); }
.copy-md:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.crumbs { margin: 0 0 20px; font: 400 var(--s-tiny)/1.5 var(--font-mono); color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--outline); }
main:not(.playground-main) .crumbs a { color: var(--ink-3); }

.index-list { margin: 0; padding: 0; list-style: none; max-width: 52rem; }
.index-item { padding: 20px 0; border-top: 1px solid var(--rule); }
.index-item p { margin: 6px 0 0; }
.index-link { font-size: 1.25rem; font-weight: 800; text-decoration: none !important; }
.index-link:hover { text-decoration: underline !important; }
.index-meta { color: var(--ink-3); font-size: 14px; }
.index-list-numbered { counter-reset: topic; }
.index-list-numbered .index-item { counter-increment: topic; position: relative; padding-left: 44px; }
.index-list-numbered .index-item::before { content: counter(topic); position: absolute; left: 0; top: 22px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--sheet); color: var(--ink); font: 800 13px/1 var(--font-text); }

/* ------------------------------------------------------------------ documentation pages */

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 32px; padding-bottom: 96px; }
.doc-side-inner { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding: 4px 8px 24px 0; font-size: 14px; line-height: 1.45; scrollbar-width: thin; }
.doc-side-title { margin: 0 0 8px; font: 400 12px/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.doc-pages { margin: 0 0 28px; padding: 0; list-style: none; }
.doc-pages a { display: block; padding: 6px 10px; border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.doc-pages a:hover { background: var(--panel); }
.doc-pages a[aria-current="page"] { background: var(--teal-wash); color: var(--ink); font-weight: 700; }
.doc-toc, .doc-toc ol { margin: 0; padding: 0; list-style: none; }
.doc-toc ol { padding-left: 12px; border-left: 1px solid var(--rule-soft); margin: 2px 0 6px 10px; }
.doc-toc a { display: block; padding: 4px 10px; color: var(--ink-3); text-decoration: none; border-radius: var(--radius-s); }
.doc-toc a:hover { color: var(--ink); background: var(--panel); }
/* The heading being read, marked by the site's script as the page scrolls. The weight stays the same so that no
   line of the list changes its length. */
.doc-toc a[aria-current="location"] { color: var(--ink); background: var(--teal-wash); }
.doc-main { min-width: 0; max-width: 50rem; }
/* The page's headings in a column of their own, on a screen wide enough for it beside the list of pages and the
   article at their full widths. The list of pages and the article keep their places: the column stands in the
   empty space to the right of them, past the edge the header keeps to. The grid is therefore wider than its box:
   its columns have fixed widths (a column that may shrink would be pressed into the box instead). The column is as
   wide as the list of pages, so a heading takes as many lines in it as it does under that list. The width asked
   of the screen is in em (1680px at the usual text size), so that it grows with the article's width where a
   person has set larger text. */
.doc-rail { display: none; }
@media (min-width: 105em) {
  .doc { grid-template-columns: 250px 56px 50rem 40px 250px; gap: 0; }
  .doc-side { grid-column: 1; }
  .doc-main { grid-column: 3; }
  .doc-rail { display: block; grid-column: 5; min-width: 0; }
  .doc-rail-inner { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding: 4px 8px 24px 0; font-size: 14px; line-height: 1.45; scrollbar-width: thin; }
  .doc-side .doc-side-toc { display: none; }
}
.doc-toc-inline { display: none; margin: 0 0 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.doc-toc-inline > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.doc-toc-inline > summary::-webkit-details-marker { display: none; }
.doc-toc-inline > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); margin-top: -4px; transition: transform var(--quick) ease; }
.doc-toc-inline[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.doc-toc-inline-body { padding: 4px 16px 16px; font-size: 15px; max-height: 70vh; overflow-y: auto; }
@media (max-width: 1100px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .doc-side { display: none; }
  .doc-toc-inline { display: block; }
  .doc-main { max-width: 50rem; width: 100%; }
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
main:not(.playground-main) .pager a { display: block; padding: 16px 20px; border: 1.5px solid var(--ink); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; background: var(--sheet); }
main:not(.playground-main) .pager a:hover { background: var(--panel); }
.pager-next { grid-column: 2; text-align: right; }
.pager-label { display: block; color: var(--ink-3); font: 400 var(--s-tiny)/1.5 var(--font-mono); }
@media (max-width: 600px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager-next { grid-column: 1; } }

/* ------------------------------------------------------------------ prose (rendered markdown) */

.prose { font-size: 16px; line-height: 1.65; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { font-weight: 800; letter-spacing: -0.01em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h2 { margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--rule); font-size: 1.625rem; line-height: 1.25; }
.prose h1 + h2, .prose h1 + p + h2 { border-top: 0; padding-top: 0; }
.prose h3 { margin: 32px 0 10px; font-size: 1.25rem; line-height: 1.3; }
.prose h4 { margin: 24px 0 8px; font-size: 1.0625rem; line-height: 1.35; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
/* Running text keeps a comfortable line; tables and code may use the column's whole width. */
.prose > p, .prose > ul, .prose > ol, .prose > blockquote { max-width: 38rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose li > p { margin: 0 0 8px; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.anchor { margin-left: 0.4em; color: var(--outline) !important; text-decoration: none !important; font-weight: 400; opacity: 0; transition: opacity var(--quick) ease; }
h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, h5:hover > .anchor, h6:hover > .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { display: none; } }

.code-label { margin: 20px 0 -6px; font: 400 var(--s-tiny)/1.4 var(--font-mono); color: var(--ink-3); }
.hl { margin: 16px 0; }
.hl pre, .prose pre { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--rule-soft); font: 13.5px/1.6 var(--font-mono); overflow-x: auto; tab-size: 2; color: var(--ink); }
.prose .hl { margin: 16px 0 20px; }
.hl .linenos { display: inline-block; min-width: 2.6em; padding-right: 1em; color: var(--code-muted); text-align: right; user-select: none; -webkit-user-select: none; }
.hl .nt, .hl .nf, .hl .na { color: var(--code-key); }
.hl .s, .hl .s1, .hl .s2, .hl .sb, .hl .sd, .hl .se, .hl .sh, .hl .si, .hl .sx { color: var(--code-string); }
.hl .m, .hl .mi, .hl .mf, .hl .mh, .hl .il { color: var(--code-number); }
.hl .kc, .hl .k, .hl .kd, .hl .kn, .hl .kr, .hl .nb { color: var(--code-keyword); }
.hl .p, .hl .o, .hl .c, .hl .c1, .hl .cm, .hl .err { color: var(--code-muted); }
.hl .err { border: 0; background: none; }
.code-wrap { position: relative; }
.copy-button { position: absolute; top: 8px; right: 8px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink-3); font: 500 12px/1.4 var(--font-text); cursor: pointer; opacity: 0; transition: opacity var(--quick) ease; }
.code-wrap:hover .copy-button, .copy-button:focus-visible, .copy-button.is-done { opacity: 1; }
@media (hover: none) { .copy-button { opacity: 1; } }

.table-wrap { margin: 20px 0 24px; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.table-wrap.is-wide table { min-width: 40rem; }
.table-wrap th { text-align: left; font-weight: 700; background: var(--panel); color: var(--ink); white-space: nowrap; }
.table-wrap th, .table-wrap td { padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
.table-wrap tr:last-child td { border-bottom: 0; }
/* A short piece of code in a table (a field, a control, a diagnostic code, a short signature: the build marks
   it) is never broken, so the column of a table's names is as wide as its longest name. Longer code in a table (an
   expression, a pattern) breaks at its spaces only. A cell of running text keeps a readable width. The selectors
   repeat the one that lets code in running text break anywhere, so that these are the stronger. */
main:not(.playground-main) .table-wrap :is(td, th) code:not(.ln) { overflow-wrap: normal; word-break: normal; }
main:not(.playground-main) .table-wrap :is(td, th) code.whole:not(.ln) { white-space: nowrap; }
.table-wrap td.says { min-width: 11rem; }
/* On a small screen a table of two columns gives way before it scrolls inside its own box: a heading may take two
   lines, a short signature may wrap at its spaces, a long name may go to a new line after one of its dots (a name
   still never breaks inside a word), longer code may break anywhere, as in running text, and the words beside it
   keep a narrower column. A table of more columns scrolls inside its box there in any case and keeps the rules
   above. */
@media (max-width: 700px) {
  main:not(.playground-main) .table-wrap:not(.is-wide) :is(td, th) code:not(.ln) { overflow-wrap: anywhere; }
  main:not(.playground-main) .table-wrap:not(.is-wide) :is(td, th) code.whole:is(.spaced, .long):not(.ln) { white-space: normal; overflow-wrap: normal; }
  .table-wrap:not(.is-wide) td.says { min-width: 8rem; }
  .table-wrap:not(.is-wide) th { white-space: normal; }
}
/* The places after a dot where a long name may go to a new line are for that case only; a browser takes such a place
   even in text that does not wrap, so everywhere else they are taken out. */
.table-wrap.is-wide code.long wbr { display: none; }
@media (min-width: 701px) { .table-wrap code.long wbr { display: none; } }

/* ------------------------------------------------------------------ catalog */

.jump { margin: 0 0 40px; padding: 20px 24px; background: var(--band); border: 1px solid var(--band-edge); border-radius: var(--radius); }
.jump-title { margin: 0 0 10px; font: 400 12px/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.jump ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
main:not(.playground-main) .jump a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); text-decoration: none; }
.jump a code { background: none !important; border: 0 !important; padding: 0 !important; font-size: 13.5px; }
main:not(.playground-main) .jump a:hover { border-color: var(--ink); }
.jump-more { margin: 0; font-size: 15px; }
.catalog > section > h2 { margin: 56px 0 8px; font-weight: 800; font-size: 1.875rem; }
.section-intro { color: var(--ink-2); max-width: 46rem; margin: 0 0 24px; }
.contract { padding: 28px 0 24px; border-top: 1px solid var(--rule); max-width: 56rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.contract h3 { margin: 0 0 8px; font-size: 1.3125rem; font-weight: 800; }
.contract h3 code { font-family: var(--font-mono); font-size: 0.92em; background: none !important; border: 0 !important; padding: 0 !important; }
.contract h4 { margin: 20px 0 8px; font: 400 12px/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.contract-intent { margin: 0; font-size: 16.5px; }
.contract-facts { margin: 18px 0 0; color: var(--ink-3); font-size: 14.5px; }
.fields { margin: 0; }
.field { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.field:last-child { border-bottom: 0; }
.field dt { font-size: 14.5px; line-height: 1.6; }
.field dd { margin: 2px 0 0; color: var(--ink); font-size: 15px; }
.field-name { font-weight: 600; color: var(--ink); }
.field-flags { color: var(--ink-3); font-size: 13.5px; }
.payload { margin: 8px 0 0 16px; padding-left: 12px; border-left: 2px solid var(--rule-soft); }
.payload-title { margin: 0; color: var(--ink-3); font-size: 13px; }
.commands dt code { font-size: 14px; }

/* ------------------------------------------------------------------ guide examples */

.guide-example { margin-top: 40px; }
.guide-code { margin: 12px 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.guide-code > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.guide-code > .hl { margin: 0; padding: 0 8px 8px; }
.guide-code > .hl pre { max-height: 32rem; overflow: auto; }

/* ------------------------------------------------------------------ playground */

/* The page gives the playground the window below the site's header, which scrolls away with the
   page here rather than staying over the playground; the footer follows. Everything else the
   playground draws in its own shadow root. */
.page-playground .site-header { position: relative; }
/* The playground spans the window, so the header and footer do too, and the brand starts where the
   playground's first button does (16px from the edge, 12px where the playground is narrower). */
.page-playground .site-header-inner, .page-playground .site-footer-inner { max-width: none; padding-inline: 16px; }
@media (max-width: 999px) { .page-playground .site-header-inner, .page-playground .site-footer-inner { padding-inline: 12px; } }
.page-playground .playground-main { display: block; }
.page-playground oad-playground.oadpg-root { height: calc(100vh - var(--header-h) - 1px); height: calc(100dvh - var(--header-h) - 1px); }
/* The playground's own frame takes the site's look through the custom properties it reads on its element
   (packages/web/README.md); the apps it runs keep their own design. The tokens change with the theme, so
   the frame follows light and dark with them. */
.page-playground oad-playground.oadpg-root {
  background: var(--paper);
  --oadpg-ground: var(--paper);
  --oadpg-panel: var(--sheet);
  --oadpg-text: var(--ink);
  --oadpg-muted: var(--ink-2);
  --oadpg-line: var(--rule);
  --oadpg-line-strong: var(--ink);
  --oadpg-accent: var(--teal);
  --oadpg-on-accent: var(--on-teal);
  --oadpg-accent-tint: var(--teal-wash);
  --oadpg-on-accent-tint: var(--teal-deep);
  --oadpg-focus: var(--teal);
  --oadpg-marker: var(--marker-soft);
  --oadpg-marker-edge: var(--marker);
  --oadpg-marker-strong: color-mix(in srgb, var(--marker) 55%, var(--marker-soft));
  --oadpg-font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --oadpg-font-display: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --oadpg-font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --oadpg-radius: var(--radius);
  --oadpg-radius-small: var(--radius-s);
  --oadpg-radius-medium: var(--radius-m);
  --oadpg-radius-large: var(--radius-l);
}
.playground-noscript { padding: 24px var(--gutter); }

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

/* On ink (in dark, the deepest ground): the mark, the name, the links, and where the project stands. */
.site-footer { background: var(--foot); border-top: 1px solid var(--foot-edge); color: var(--foot-ink-2); font-size: var(--s-small); line-height: 1.5; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px 40px; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding: 34px var(--gutter) 40px; }
.footer-name { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; font-size: 1.0625rem; color: var(--foot-ink); }
.footer-mark { width: 26px; height: 26px; flex: none; }
.footer-mark-ground { fill: var(--mark-ground); }
.footer-mark-ring { stroke: var(--foot); }
.footer-links { flex: 1 1 32rem; max-width: 46rem; }
.footer-links ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--foot-ink); text-decoration: none; text-underline-offset: 3px; }
.footer-links a:hover { text-decoration: underline; }
.footer-stands { flex-basis: 100%; margin: 0; padding-top: 16px; border-top: 1px solid var(--foot-rule); display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-stands a { color: var(--foot-ink); text-underline-offset: 3px; }
.footer-stands strong { color: var(--foot-ink); }
@media (max-width: 760px) { .footer-links ul { justify-content: flex-start; } }

/* ------------------------------------------------------------------ search */

.search-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 96px)); margin: 72px auto auto; padding: 0; border: 1.5px solid var(--ink); border-radius: var(--radius-l); background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-high); font: 400 15px/1.5 var(--font-text); overflow: hidden; }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog::backdrop { background: rgba(10, 14, 20, 0.45); }
.search-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.search-input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--ink); font: 400 17px/1.3 var(--font-text); outline: none; }
.search-dialog .search-input:focus-visible { outline: none; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-input::placeholder { color: var(--ink-3); opacity: 1; }
.search-close { flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink-3); font: 500 13px/1 var(--font-text); cursor: pointer; }
.search-status { margin: 0; padding: 8px 18px 0; color: var(--ink-3); font-size: 13px; }
.search-results { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 6px 8px 10px; list-style: none; }
.search-results a { display: block; padding: 8px 12px; border-radius: var(--radius-box); color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--teal-wash); color: var(--ink); }
.search-hit-title { display: block; font-weight: 700; }
.search-hit-where { display: block; color: var(--ink-3); font-size: 13px; }
.search-results a[aria-selected="true"] .search-hit-where { color: var(--ink-2); }

/* ------------------------------------------------------------------ phones and motion */

@media (max-width: 600px) {
  .lead { font-size: 1.0625rem; }
  .page { padding-top: 28px; }
  .page h1, .prose h1 { font-size: 28px; line-height: 1.15; }
  [data-page="spec"] .prose h1 { font-size: 24px; }
  .prose h2 { font-size: 1.4375rem; margin-top: 40px; padding-top: 22px; }
  .prose h3 { font-size: 1.1875rem; }
  .hl pre, .prose pre, .page pre { font-size: 13px; padding: 12px 14px; }
  .index-link { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.nowrap { white-space: nowrap; }
.compare table { table-layout: fixed; }
.page-index .index-item p { max-width: none; }
