@import url("site-header.css");
@import url("./code.css");
@import url("./fonts.css");

:root {
  color-scheme: light;
  --canvas: #f9f6f0;
  --surface-soft: #f2ede5;
  --ink-strong: #3d2645;
  --accent: #b893c7;
  --accent-soft: #eadff0;
  --nav-hover: #e8e8e8;
  --link: #745080;
  --border: #3d2645;
  --shadow: 0 10px 28px rgb(61 38 69 / 10%);
  --header-height: 3.5rem;
  --sidebar-width: 15rem;
  --toc-width: 12rem;
  --radius: 0;
  --font-sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Literata", Iowan Old Style, Charter, Georgia, serif;
  --font-serif: var(--font-heading);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #211a23;
  --surface-soft: #382d3b;
  --ink-strong: #f8effa;
  --accent: #b893c7;
  --accent-soft: #4a3750;
  --nav-hover: #382d3b;
  --link: #d8b9e3;
  --border: #d8b9e3;
  --shadow: 0 12px 32px rgb(0 0 0 / 30%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #211a23;
    --surface-soft: #382d3b;
    --ink-strong: #f8effa;
    --accent: #b893c7;
    --accent-soft: #4a3750;
    --nav-hover: #382d3b;
    --link: #d8b9e3;
    --border: #d8b9e3;
    --shadow: 0 12px 32px rgb(0 0 0 / 30%);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.68 var(--font-sans);
  text-rendering: optimizeLegibility;
}
body.sidebar-open { overflow: hidden; }
a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 200ms ease, text-decoration-color 300ms ease;
}
a:hover, a:focus-visible { text-decoration-color: currentColor; }
button, select, input { font: inherit; font-family: var(--font-ui); }
button, select { color: inherit; }
:where(a, button, select, input, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.55rem 0.75rem;
  transform: translateY(-150%);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-strong);
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.header-button, .product-select {
  min-height: 2.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}
.header-button { padding: 0.35rem 0.7rem; cursor: pointer; }

.header-button, .product-select { transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.header-button:hover, .header-button:focus-visible, .product-select:hover, .product-select:focus-visible { border-color: var(--border); background: var(--accent-soft); box-shadow: 0 2px 4px rgb(0 0 0 / 12%); }
.docs-local-bar { display: none; }
.product-select { max-width: 11rem; padding: 0.25rem 1.8rem 0.25rem 0.55rem; }

.docs-shell {
  min-height: 100vh;
  padding-top: var(--header-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
}
body[data-has-toc="false"] .docs-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.docs-sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  padding: 1.35rem 1rem 2rem 2rem;
  background-image: linear-gradient(var(--hairline), var(--hairline));
  background-position: 1rem 0;
  background-size: 1px 100%;
  background-repeat: no-repeat;
  border-right: 1px solid var(--hairline);
  background-color: var(--canvas);
}
.sidebar-group { margin: 0; }
.sidebar-group + .sidebar-group { margin-top: 1.2rem; }
.sidebar-group-title { position: relative; margin: 0 0 .4rem; padding: .2rem 0; color: var(--ink-strong); font: 500 .9rem/1.4 var(--font-heading); letter-spacing: normal; text-transform: none; }
.sidebar-group-title::before { content: ""; position: absolute; left: -1rem; top: 50%; width: .65rem; border-top: 1px solid var(--joint); }
.sidebar-group-title > button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.sidebar-group-title > button::after { content: "⌄"; float: right; font: .8rem var(--font-ui); }
.sidebar-group-title > button[aria-expanded="false"]::after { content: "›"; }
.sidebar-project { display: grid; gap: .35rem; margin: 0 0 1.5rem; font: .75rem var(--font-ui); color: var(--ink-muted); }
.sidebar-project .product-select { width: 100%; max-width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; color: var(--ink-strong); font: 500 .9rem var(--font-ui); }
.sidebar-link {
  display: block;
  margin: 0.1rem 0;
  padding: 0.35rem 0.55rem;
  border-radius: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}
.sidebar-link:hover, .sidebar-link:focus-visible { background: var(--nav-hover); color: var(--ink-strong); }
.sidebar-link[aria-current="location"] { background: transparent; color: var(--ink-strong); }
.sidebar-context-link.is-ancestor { background: transparent; color: var(--ink-strong); }
.sidebar-link[aria-current="page"] { position: relative; background: transparent; color: var(--ink-strong); font-weight: 600; }
.sidebar-link[aria-current="page"]::before { content: ""; position: absolute; top: 50%; left: -1rem; width: .8rem; border-top: 1px solid var(--joint); }
.sidebar-python-group .sidebar-group-title, .sidebar-context-group .sidebar-group-title { overflow-wrap: anywhere; font-family: var(--font-mono); letter-spacing: normal; text-transform: none; }
.sidebar-python-symbol, .sidebar-context-link { overflow-wrap: anywhere; font-size: 0.82rem; }
.sidebar-python-symbol code, .sidebar-context-link code { font-family: var(--font-mono); }
.sidebar-context-link[data-depth="1"] { padding-left: 1rem; }
.sidebar-context-link[data-depth="2"] { padding-left: 1.45rem; }
.sidebar-context-link[data-depth="3"] { padding-left: 1.9rem; }
.sidebar-context-link[data-depth="4"] { padding-left: 2.35rem; }
.sidebar-meta { margin-top: 1.5rem; color: var(--ink-muted); font-size: 0.78rem; }
.sidebar-meta code { font-size: inherit; }
.sidebar-developer-group { background: transparent; }

.docs-main {
  grid-column: 2;
  width: min(100%, 56rem);
  margin: 0 auto;
  padding: 2.4rem 3rem 4rem;
}
.breadcrumbs { margin: 0 0 1.4rem; color: var(--ink-muted); font-size: 0.82rem; }
.breadcrumbs a { color: inherit; }
.docs-article { min-width: 0; }
.docs-article > h1:first-child { margin-top: 0; }
.docs-article h1, .docs-article h2, .docs-article h3,
.docs-article h4, .docs-article h5, .docs-article h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--ink-strong);
  line-height: 1.2;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.docs-article h1 { margin: 0 0 1.2rem; font-size: clamp(2rem, 4vw, 2.6rem); }
.docs-article h2 { margin: 2.5rem 0 1.1rem; font-size: 1.7rem; }
.docs-article > h2 { position: relative; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.docs-article > h2::before { content: ""; position: absolute; top: -4px; left: -4px; width: 8px; height: 8px; pointer-events: none; background: linear-gradient(var(--joint), var(--joint)) left center / 8px 1px no-repeat, linear-gradient(var(--joint), var(--joint)) center bottom / 1px 8px no-repeat; }
.docs-article h3 { margin: 2.2rem 0 0.7rem; font-size: 1.28rem; }
.docs-article h4 { margin: 1.8rem 0 0.55rem; font-size: 1.05rem; }
.docs-article p { margin: 0.8rem 0 1.1rem; }
.docs-article > p:first-of-type { color: var(--ink-muted); font-size: 1.08rem; }
.product-hero {
  position: relative;
  margin: -0.4rem 0 3rem;
  padding: 0 0 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.product-hero-logo { display: block; width: min(18rem, 70%); height: auto; margin-bottom: 1.25rem; background-position: left center; background-repeat: no-repeat; background-size: contain; }
.product-logo-gammaloop { aspect-ratio: 1.888 / 1; background-image: url("gammalooplogo-light.svg"); background-position: center; background-size: contain; }
:root[data-theme="dark"] .product-logo-gammaloop { background-image: url("gammalooplogo-dark.svg"); }
.developer-hero-logo { display: block; width: min(18rem, 70%); aspect-ratio: 1.888 / 1; margin-bottom: 1.25rem; background: url("gammaloop-construction-light.svg") left center / contain no-repeat; }
:root[data-theme="dark"] .developer-hero-logo { background-image: url("gammaloop-construction-dark.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .product-logo-gammaloop { background-image: url("gammalooplogo-dark.svg"); }
  :root:not([data-theme]) .developer-hero-logo { background-image: url("gammaloop-construction-dark.svg"); }
}
.product-logo-spenso { aspect-ratio: 637 / 189; border-radius: 1rem; background-image: url("spensologo.svg"); }
.product-hero h1 { max-width: 12ch; margin: 0.25rem 0 0.7rem; }
.product-hero > p:not(.product-eyebrow) { max-width: 42rem; color: var(--ink-muted); font-size: 1.08rem; }
.product-eyebrow { margin: 0; color: var(--link); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.2rem; }
.hero-action { padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); color: var(--ink-strong); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.hero-action:hover { background: var(--accent-soft); box-shadow: 0 2px 0 var(--border); }
.hero-action.primary { background: var(--ink-strong); color: var(--canvas); }
.docs-article ul, .docs-article ol { padding-left: 1.35rem; }
.docs-article li { margin: 0.32rem 0; }
.docs-article code, .api-signature, .api-member-signature {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.docs-article :not(pre) > code {
  padding: 0.08em 0.28em;
  border: 1px solid var(--hairline);
  border-radius: 0.2rem;
  background: var(--surface);
}
.docs-article a, .docs-article :not(pre) > code { overflow-wrap: anywhere; }
.docs-article :where(img, svg, video, canvas, iframe) { max-width: 100%; }
.docs-article math { font-family: "STIX Two Math", math; font-synthesis: none; }
.docs-article math[display="block"] { display: block math; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.docs-article pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.2rem 0 1.6rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.55;
}
.syntax-call { color: var(--syntax-call); }
.syntax-comment { color: var(--syntax-comment); font-style: italic; }
.syntax-keyword, .syntax-operator { color: var(--syntax-keyword); }
.syntax-label { color: var(--syntax-label); }
.syntax-number { color: var(--syntax-number); }
.syntax-property { color: var(--syntax-property); }
.syntax-raw { color: var(--syntax-raw); }
.syntax-string { color: var(--syntax-string); }
.docs-article table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.docs-article th, .docs-article td { padding: 0.55rem 0.7rem; border: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.docs-article th { background: var(--accent-soft); color: var(--ink-strong); }
.api-parameter-table { max-width: 100%; table-layout: fixed; }
.api-parameter-table :is(th, td):nth-child(1) { width: 18%; }
.api-parameter-table :is(th, td):nth-child(2) { width: 30%; max-width: 22rem; }
.api-parameter-table :is(th, td):nth-child(3) { width: 12%; }
.api-parameter-table :is(th, td):nth-child(-n + 3) > code { overflow-wrap: break-word; white-space: normal; }
.api-parameter-table tbody th { background: transparent; font-weight: inherit; }
.api-parameter-label { display: none; }
@media (max-width: 40rem) {
  .reference-table-wrap > .api-parameter-table { display: block; }
  .api-parameter-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .api-parameter-table tbody { display: block; }
  .api-parameter-table tbody tr { display: block; margin: 0 0 1rem; border: 1px solid var(--hairline); }
  .api-parameter-table tbody :is(th, td):nth-child(n) { display: block; width: auto; max-width: none; border: 0; padding: .45rem .7rem; background: var(--canvas); }
  .api-parameter-table tbody th { background: var(--accent-soft); }
  .api-parameter-table tbody td + td { border-top: 1px solid var(--hairline); }
  .api-parameter-label { display: block; margin-bottom: .15rem; color: var(--ink-muted); font: .7rem/1.5 var(--font-ui); }
  .api-parameter-table tbody p { margin: .25rem 0; }
}
.docs-article blockquote { margin: 1.4rem 0; padding: 0.5rem 1rem; border-left: 1px solid var(--border); background: var(--surface); }
.docs-article > div:not([class]), .docs-article .callout {
  margin: 1.4rem 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: transparent;
}
.docs-article > div:not([class]):has(+ div:not([class])) { border-bottom: 0; }
.docs-article > div:not([class]) p:first-child { margin-top: 0; color: var(--ink-strong); font-weight: 700; }
.docs-article > div:not([class]) p:last-child { margin-bottom: 0; }

.docs-toc {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  width: var(--toc-width);
  overflow-y: auto;
  padding: 1.8rem 1rem 2rem;
  border-left: 1px solid var(--hairline);
  background: var(--canvas);
}
.toc-title { margin: 0 0 0.6rem; color: var(--ink-strong); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.toc-link { display: block; margin: 0 -0.4rem; padding: 0.2rem 0.4rem; border-radius: 0.2rem; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.35; text-decoration: none; transition: background-color 200ms ease, color 200ms ease; }
.toc-link[data-level="3"] { padding-left: 1.1rem; }
.toc-link:hover, .toc-link:focus-visible { background: var(--nav-hover); color: var(--ink-strong); }
.toc-link.active { color: var(--link); }

.page-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 3.5rem; padding-top: 1.3rem; border-top: 1px solid var(--hairline); }
.page-nav-link { min-height: 4.6rem; padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, color 200ms ease, transform 200ms ease; }
.page-nav-link:hover, .page-nav-link:focus-visible { transform: translateY(-1px); border-color: var(--accent); background: var(--accent); color: #211526; box-shadow: 0 2px 4px rgb(0 0 0 / 15%); }
.page-nav-link:hover .page-nav-label, .page-nav-link:focus-visible .page-nav-label { color: #211526; }
.page-nav-link.next { text-align: right; }
.page-nav-label { display: block; color: var(--ink-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.page-feedback { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.page-feedback a { padding: 0.45rem 0.65rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); color: var(--link); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; }
.page-feedback a:hover, .page-feedback a:focus-visible { border-color: var(--border); background: var(--accent-soft); }
.page-footer { margin-top: 2.5rem; color: var(--ink-muted); font-size: 0.78rem; }

.api-component-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 1.4rem 0; border-top: 1px solid var(--hairline); }
.api-component-card { min-width: 0; padding: 1.4rem 0; border: 0; border-bottom: 1px solid var(--hairline); border-radius: var(--radius); background: transparent; }
.api-component-card h2 { margin-top: 0; padding-top: 0; border-top: 0; font-size: 1.35rem; }
.reference-context { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.reference-lede { max-width: 54rem; color: var(--ink-strong); font-size: 1.05rem; }
.legacy-reference-anchor { display: block; width: 0; height: 0; overflow: hidden; scroll-margin-top: calc(var(--header-height) + 1rem); }
.api-symbol-list { margin: 1rem 0 2rem; border-top: 1px solid var(--hairline); }
.api-symbol-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--hairline); }
.api-symbol-card > div { min-width: 0; }
.api-symbol-name { display: block; margin: 0.3rem 0; font-size: 1.05rem; }
.api-symbol-name a { color: var(--ink-strong); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.api-symbol-card p { margin: 0; color: var(--ink-muted); font-size: 0.82rem; }
.api-symbol-meta { flex: 0 0 auto; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.api-member-heading { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline; }
.api-member-heading h3, .api-member-heading h4, .api-member-heading h5, .api-member-heading h6 { flex: 0 1 auto; min-width: 0; margin: 0; color: var(--ink-strong); font-size: 1rem; font-weight: 650; }
.api-kind {
  display: inline-block;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 600;
}
.api-feature-requirement { padding: 0.55rem 0.7rem; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink-strong); }
.api-feature-requirement code { margin-left: 0.25rem; }
.api-signature, .api-member-signature { white-space: pre-wrap; }
.api-signature a, .api-member-signature a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.16em; }
.api-member-list { margin: 1rem 0 2rem; border-top: 1px solid var(--hairline); }
.api-member, .api-overload, .api-member-anchor-alias { scroll-margin-top: calc(var(--header-height) + 1rem); }
.api-member.api-member-flat { margin: 0; padding: 1rem 0; border-right: 0; border-bottom: 1px solid var(--hairline); border-left: 0; background: transparent; }
.api-member-flat > .api-member-heading { min-width: 0; justify-content: flex-start; cursor: default; }
.api-member-flat > .api-member-heading > .reference-permalink { margin-left: auto; }
.api-member-flat > .api-member-heading code, .api-symbol-siblings code, .cli-argument h3 code, .reference-setting-flat h3 code, .settings-namespace-list code { overflow-wrap: anywhere; }
.api-member-flat > .api-member-body { padding-top: 0.65rem; border-top: 0; }
.api-symbol-siblings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2rem 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.api-symbol-siblings a { min-width: 0; display: grid; gap: 0.25rem; padding: 0.75rem; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); text-decoration: none; }
.api-symbol-siblings span { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.api-overloads { display: grid; gap: 0; margin-top: 0.9rem; }
.api-overloads > h4, .api-overloads > h5, .api-overloads > h6, .api-overload > h5, .api-overload > h6 { margin: 0; }
.api-overload { min-width: 0; padding: 0.7rem 0; border: 0; border-top: 1px solid var(--hairline); background: transparent; }
.api-docstring { white-space: normal; }
.api-doc-section { margin: 1rem 0; }
.api-doc-section h2, .api-doc-section h3, .api-doc-section h4, .api-doc-section h5, .api-doc-section h6 { margin: 0 0 0.55rem; color: var(--ink-strong); font-size: 0.86rem; }
.api-doc-definitions { display: grid; grid-template-columns: minmax(8rem, 0.7fr) minmax(12rem, 1.3fr); margin: 0; border-top: 1px solid var(--hairline); }
.api-doc-definitions dt, .api-doc-definitions dd { min-width: 0; margin: 0; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--hairline); }
.api-doc-definitions dt { color: var(--ink-strong); }
.api-doc-definitions dt span { display: block; margin-top: 0.15rem; color: var(--ink-muted); font-size: 0.75rem; }
.api-doc-definitions dd p { margin: 0; }
.api-doc-type { color: var(--ink-muted); }
.stub-source { margin: 2rem 0; padding: 0.85rem 1rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface-soft); }
.stub-source p { margin-bottom: 0; }
.reference-summary { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.reference-coverage { margin: 1.6rem 0; padding: 1rem 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: transparent; }
.reference-coverage > h2 { margin-top: 0; }
.reference-coverage > p { max-width: 54rem; color: var(--ink-muted); font-size: 0.84rem; }
.reference-coverage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; border-top: 1px solid var(--hairline); }
.reference-coverage-grid article { min-width: 0; display: grid; gap: 0.25rem; padding: 0.8rem 0 0; background: transparent; }
.reference-coverage-grid strong { color: var(--ink-muted); font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; line-height: 1; }
.reference-coverage-grid span { font-size: 0.78rem; font-weight: 650; }
.reference-coverage-grid small { color: var(--ink-muted); font-size: 0.75rem; }
.reference-guide-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.reference-guide-links a {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}
.reference-guide-links a { padding: 0.45rem 0.65rem; font-size: 0.82rem; }
.reference-jump-nav { margin: 1.5rem 0 2.2rem; padding: 0.9rem 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: transparent; }
.reference-jump-nav > h2 { margin: 0 0 0.75rem; font-size: 1.25rem; }
.reference-jump-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem; }
.reference-jump-group { min-width: 0; }
.reference-jump-group > h3 { margin: 0 0 0.35rem; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.reference-jump-list { display: grid; margin: 0; padding: 0; list-style: none; }
.reference-jump-list li { min-width: 0; margin: 0; border-top: 1px solid var(--hairline); }
.reference-jump-list a { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; align-items: baseline; padding: 0.38rem 0.2rem; text-decoration: none; }
.reference-jump-list a > span { min-width: 0; display: grid; gap: 0.12rem; }
.reference-jump-list code { overflow-wrap: anywhere; color: var(--ink-strong); font-size: 0.76rem; }
.reference-jump-summary { overflow: hidden; color: var(--ink-muted); font-size: 0.75rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.reference-jump-list small { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.reference-tools { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; gap: 0.4rem 0.8rem; align-items: end; margin: 1.5rem 0; padding: 0.85rem 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: transparent; }
.reference-tools label { grid-column: 1 / -1; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.reference-tools output { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; }
.reference-permalink { display: inline-block; width: fit-content; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; }
.reference-detail-heading { display: flex; gap: 0.5rem; align-items: baseline; margin: 3rem 0 0.85rem; }
.reference-detail-heading h2 { margin: 0; }
.reference-aliases { color: var(--ink-muted); font-size: 0.82rem; }
.reference-copy-row { position: relative; min-width: 0; padding-right: 3rem; }
.reference-copy-row pre { min-width: 0; margin: 0; padding-right: 3.6rem; }
button[data-copy-target] { display: none; }
.js button[data-copy-target] {
  --copy-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='13' height='13' x='8' y='8' rx='2'/%3E%3Cpath d='M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3'/%3E%3C/g%3E%3C/svg%3E");
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--border) 12%, transparent);
  color: var(--link);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}
.js button[data-copy-target]::before {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  background: currentColor;
  content: "";
  -webkit-mask: var(--copy-icon) center / contain no-repeat;
  mask: var(--copy-icon) center / contain no-repeat;
}
.js button[data-copy-target]:hover { border-color: var(--border); background: var(--accent-soft); }
.js button[data-copy-target][data-copy-state="copied"] {
  --copy-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5'/%3E%3C/svg%3E");
}
.js button[data-copy-target][data-copy-state="copied"]::before { transform: translateY(0.04rem); }
.js button[data-copy-target][data-copy-feedback]::after {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  padding: 0.22rem 0.42rem;
  border-radius: 0.2rem;
  background: var(--ink-strong);
  color: var(--canvas);
  content: attr(data-copy-feedback);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
}
.copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.api-example-copy-row { margin: 1.2rem 0 1.6rem; }
.typst-api-module pre { max-height: 30rem; overflow: auto; }
.reference-table-wrap { width: 100%; overflow-x: auto; }
.reference-table-wrap > table { display: table; overflow: visible; }
.reference-table-wrap:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.reference-table-scroll-hint { margin: .4rem 0 .5rem; color: var(--ink-muted); font: .75rem/1.5 var(--font-ui); }
.reference-table-scroll-hint[hidden] { display: none; }
.reference-missing { color: var(--ink-muted); font-size: 0.82rem; }
.cli-command-family { margin: 2rem 0; }
.cli-command-family > h2 { padding-bottom: 0.55rem; border-bottom: 1px solid var(--border); }
.cli-command-list { display: grid; }
.cli-command-link { display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-width: 0; padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--hairline); color: var(--ink-strong); text-decoration: none; }
.cli-command-link:hover, .cli-command-link:focus-visible { padding-left: 0.55rem; background: var(--accent-soft); }
.cli-command-link > span:first-child { min-width: 0; display: grid; gap: 0.2rem; }
.cli-command-link small { overflow: hidden; color: var(--ink-muted); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.cli-settings-callout { margin: 2.5rem 0; padding: 1.2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.cli-settings-callout h2 { margin: 0.45rem 0; }
.cli-argument-section { margin: 2.2rem 0; }
.cli-argument-section > h2 { padding-bottom: 0.55rem; border-bottom: 1px solid var(--border); }
.cli-argument { padding: 1rem 0.2rem; border-bottom: 1px solid var(--hairline); scroll-margin-top: calc(var(--header-height) + 1rem); }
.cli-argument > header, .reference-setting-flat > header { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.cli-argument h3, .reference-setting-flat h3 { min-width: 0; margin: 0; font-size: 0.95rem; }
.cli-related nav, .settings-hierarchy nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); border-top: 1px solid var(--hairline); }
.cli-related nav a, .settings-hierarchy nav a { min-width: 0; display: grid; gap: 0.25rem; padding: 0.75rem 0.2rem; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.cli-related nav span, .settings-hierarchy nav span { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.settings-namespace-list { display: grid; margin: 1rem 0 2rem; border-top: 1px solid var(--border); }
.settings-namespace-list > a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.2rem; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.settings-namespace-list span { color: var(--ink-muted); font-size: 0.75rem; }
.reference-setting { min-width: 0; padding: 0.85rem; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--canvas); scroll-margin-top: calc(var(--header-height) + 1rem); }
.reference-setting-list { margin: 1.5rem 0; border-top: 1px solid var(--border); }
.reference-setting.reference-setting-flat { margin: 0; padding: 1.15rem 0.2rem; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.reference-setting-path { margin: 0.25rem 0 0.65rem; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; overflow-wrap: anywhere; }
.reference-default details { min-width: 0; }
.reference-default summary { width: fit-content; color: var(--link); cursor: pointer; }
.reference-default pre { max-height: 22rem; margin: 0.5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reference-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.reference-facts > div { min-width: 0; padding: 0.55rem; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.reference-facts dt { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.reference-facts dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; font-size: 0.75rem; }
.reference-setting:target, .cli-argument:target, .api-member:target, .api-overload:target, .api-member-anchor-alias:target > .api-member { outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 3px; }
[data-reference-entry][hidden], [data-reference-group][hidden] { display: none !important; }
.reference-hub-grid { display: grid; grid-template-columns: minmax(0, 1fr); margin: 1.5rem 0; border-top: 1px solid var(--hairline); }
.reference-hub-card { min-width: 0; padding: 1.5rem 0; border-bottom: 1px solid var(--hairline); background: transparent; }
.reference-hub-card h2 { margin: 0 0 0.6rem; font-family: var(--font-serif); font-size: 1.5rem; }
.reference-hub-card h2 a { color: var(--ink-strong); text-decoration: none; }

.search-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: min(42rem, calc(100vh - 2rem)); padding: 0; border: 1px solid var(--border); border-radius: 0.5rem; background: var(--canvas); color: var(--ink); box-shadow: var(--shadow); }
.search-dialog::backdrop { background: rgb(33 21 38 / 55%); backdrop-filter: blur(3px); }
.search-form { position: sticky; top: 0; display: flex; gap: 0.5rem; padding: 0.8rem; border-bottom: 1px solid var(--hairline); background: var(--canvas); }
.search-input, .reference-tools input {
  flex: 1; min-width: 0; padding: 0.7rem 0.85rem; border: 1px solid var(--hairline);
  border-radius: 0; color: var(--ink); font-size: 16px; --field-mark: var(--joint);
  background: linear-gradient(var(--field-mark), var(--field-mark)) left top / 9px 2px no-repeat,
    linear-gradient(var(--field-mark), var(--field-mark)) left top / 2px 9px no-repeat,
    linear-gradient(var(--field-mark), var(--field-mark)) right bottom / 9px 2px no-repeat,
    linear-gradient(var(--field-mark), var(--field-mark)) right bottom / 2px 9px no-repeat,
    var(--surface-soft);
}
.search-input:focus, .reference-tools input:focus { --field-mark: var(--link); outline: 1px solid var(--link); outline-offset: -1px; }
.search-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-results { margin: 0; padding: 0.6rem; list-style: none; }
.search-result a { display: block; padding: 0.65rem 0.75rem; border-radius: var(--radius); text-decoration: none; }
.search-result a:hover, .search-result a[aria-selected="true"] { background: var(--accent-soft); outline: 1px solid var(--link); outline-offset: -1px; }
.search-result-title { display: block; color: var(--ink-strong); font-weight: 600; }
.search-result-kind { display: block; margin: 0.15rem 0; color: var(--link); font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; }
.search-result-summary { display: -webkit-box; overflow: hidden; color: var(--ink-muted); font-size: 0.82rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.search-empty { padding: 1.2rem; color: var(--ink-muted); }
.sidebar-backdrop { display: none; }

.developer-main { width: min(100%, 62rem); }
.developer-article > p, .developer-article > ul, .developer-article > ol, .developer-article > blockquote { max-width: 48rem; }
.developer-hero, .developer-note-hero {
  margin: 0 0 2.5rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
}
.developer-hero h1, .developer-note-hero h1 { max-width: none; margin: 0.55rem 0 0.8rem; font-family: var(--font-serif); font-weight: 500; }
.developer-hero > p:not(.product-eyebrow), .developer-note-hero > p:not(.product-eyebrow, .developer-source) { max-width: 48rem; color: var(--ink-muted); font-size: 1.06rem; }
.developer-audience {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(16rem, 1.3fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--canvas);
  font-size: 0.82rem;
}
.developer-audience strong { color: var(--ink-strong); }
.developer-audience span { color: var(--ink-muted); }
.developer-audience a { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.developer-section { margin: 0 0 4.5rem; scroll-margin-top: calc(var(--header-height) + 1rem); }
.developer-section + .developer-section { padding-top: 3rem; border-top: 1px solid var(--border); }
.developer-section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr); gap: 1rem 2rem; align-items: end; margin-bottom: 1.5rem; }
.developer-section-heading h2 { margin: 0; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 500; }
.developer-section-heading > p:last-child { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }
.developer-card-grid { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--hairline); }
.developer-archive { grid-column: 1 / -1; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.developer-archive > summary { padding: 0.9rem 1.35rem; color: var(--ink-muted); cursor: pointer; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.developer-archive > .developer-card-grid { border-left: 0; }
.developer-card { min-width: 0; display: flex; flex-direction: column; padding: 1.5rem 0; border-bottom: 1px solid var(--hairline); background: transparent; }
.developer-card:hover { background: transparent; }
.developer-card-meta { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.5rem; align-items: center; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.developer-card-meta > :last-child { margin-left: auto; }
.developer-card h3 { margin: 0.8rem 0 0.65rem; font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; line-height: 1.3; }
.developer-card h3 a { color: var(--ink-strong); text-decoration: none; }
.developer-card > p { margin: 0; color: var(--ink-muted); font-size: 0.86rem; }
.developer-status { display: inline-flex; align-items: center; width: fit-content; padding: 0.18rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--accent-soft); color: var(--ink-strong); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; line-height: 1.35; text-transform: uppercase; }
.developer-status-implemented { background: #d8ebdf; color: #183d2a; }
.developer-status-proposal { background: #f1dfbd; color: #553711; }
.developer-status-investigation-record, .developer-status-archived-baseline { border-style: dashed; background: var(--surface-soft); color: var(--ink-muted); }
:root[data-theme="dark"] .developer-status-implemented { background: #294638; color: #d8ebdf; }
:root[data-theme="dark"] .developer-status-proposal { background: #513f25; color: #f1dfbd; }
.developer-note-title { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: flex-end; }
.developer-note-title h1 { flex: 1 1 24rem; }
.developer-note-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1.15rem; }
.developer-kind, .developer-lifecycle { color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.developer-lifecycle { padding-left: 0.4rem; border-left: 1px solid var(--border); }
.developer-source { margin-top: 1.2rem !important; font-family: var(--font-mono); font-size: 0.75rem !important; text-transform: uppercase; }
.developer-record-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -1.5rem 0 3rem; border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface); }
.developer-record-meta > div { min-width: 0; padding: 0.75rem 0.9rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.developer-record-meta dt { margin-bottom: 0.2rem; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.developer-record-meta dd { margin: 0; color: var(--ink-strong); font-size: 0.82rem; overflow-wrap: anywhere; }
.developer-record-meta code { font-size: 0.75rem; }
.developer-record-meta[data-freshness="stale"], .developer-record-meta[data-freshness="unreviewed"], .developer-record-meta[data-freshness="disposition-due"] { border-top-color: #a6422b; box-shadow: inset 0 0.2rem #a6422b; }
.developer-record-meta[data-freshness="review-due"] { border-top-color: #ae7418; box-shadow: inset 0 0.2rem #ae7418; }
.developer-record-scopes,
.developer-record-meta > div:nth-last-child(2):nth-child(odd):has(+ .developer-record-scopes),
.developer-record-meta > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.developer-record-scopes ul { display: grid; gap: 0.45rem; margin: 0.35rem 0 0; padding-left: 1.1rem; }
.developer-missing { color: #8b3825; }
.developer-diagram { margin: 2rem 0; }
.developer-diagram iframe { width: 100%; height: min(62vh, 40rem); min-height: 28rem; border: 1px solid var(--border); background: var(--surface); box-shadow: 0.35rem 0.35rem 0 var(--accent-soft); }
.developer-diagram > p { margin-top: 1rem; }
.developer-inline-toc { display: none; margin: 0 0 1.5rem; border: 1px solid var(--border); background: var(--surface); }
.developer-inline-toc summary { padding: 0.7rem 0.85rem; color: var(--ink-strong); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; cursor: pointer; text-transform: uppercase; }
.developer-inline-toc nav { max-height: 20rem; overflow-y: auto; padding: 0.2rem 0.7rem 0.8rem; border-top: 1px solid var(--hairline); }
.developer-inline-toc a { display: block; padding: 0.25rem 0.35rem; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.35; text-decoration: none; }
.developer-inline-toc a[data-level="3"] { padding-left: 1.2rem; }
.developer-inline-toc a:hover, .developer-inline-toc a:focus-visible { background: var(--nav-hover); color: var(--ink-strong); }
.docs-inline-toc { display: none; margin: 0 0 1.5rem; border: 1px solid var(--hairline); background: var(--surface); }
.docs-inline-toc summary { padding: 0.7rem 0.85rem; color: var(--ink-strong); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; cursor: pointer; text-transform: uppercase; }
.docs-inline-toc nav { max-height: 20rem; overflow-y: auto; padding: 0.2rem 0.7rem 0.8rem; border-top: 1px solid var(--hairline); }
.docs-inline-toc a { display: block; padding: 0.25rem 0.35rem; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.35; text-decoration: none; }
.docs-inline-toc a[data-level="3"] { padding-left: 1.2rem; }
.docs-inline-toc a:hover, .docs-inline-toc a:focus-visible { background: var(--nav-hover); color: var(--ink-strong); }

.portal-body {
  --portal-header-height: 56px;
  min-height: 100vh;
  background: var(--canvas);
}
.portal-body a { color: inherit; }
html:has(.portal-body) { --header-height: 56px; }
.portal-main {
  width: min(92rem, 100%);
  margin: 0 auto;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.portal-section { scroll-margin-top: 1rem; }
.portal-kicker {
  margin: 0;
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portal-hero {
  position: relative;
  isolation: isolate;
  min-height: 28rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.portal-graph-theme-dark { display: none; }
:root[data-theme="dark"] .portal-graph-theme-light { display: none; }
:root[data-theme="dark"] .portal-graph-theme-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .portal-graph-theme-light { display: none; }
  :root:not([data-theme]) .portal-graph-theme-dark { display: block; }
}
.portal-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 5rem);
  background: linear-gradient(90deg, color-mix(in srgb, var(--canvas) 97%, transparent) 0 38%, color-mix(in srgb, var(--canvas) 84%, transparent) 72%, transparent);
}
.portal-hero h1 {
  max-width: 22ch;
  margin: 1.1rem 0 1.5rem;
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 4.3vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.portal-lede { max-width: 50rem; margin: 0; color: var(--ink-muted); font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.65; }
.portal-hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 2.1rem; }
.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.3rem;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  background: var(--canvas);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.portal-body .portal-button-primary { background: var(--ink-strong); color: var(--canvas); }
.portal-button:hover, .portal-button:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent); }
.portal-hero-art {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: 26rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  border-left: 1px solid var(--border);
  background-color: var(--surface-soft);
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 2rem 2rem;
}
.portal-hero-art::before { content: ""; position: absolute; inset: 10% -25% auto auto; z-index: 0; width: 22rem; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%; background: var(--accent-soft); opacity: 0.7; }
.portal-wordmark { position: relative; z-index: 3; width: min(12rem, 62%); min-height: 7.5rem; background: left center / contain no-repeat url("local-unitarity-light.svg"); }
:root[data-theme="dark"] .portal-wordmark { background-image: url("local-unitarity-dark.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .portal-wordmark { background-image: url("local-unitarity-dark.svg"); }
}
.portal-graph-field {
  position: absolute;
  inset: 6.5rem -3rem 3.8rem -2rem;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.portal-process-graph {
  position: absolute;
  left: var(--graph-x);
  top: var(--graph-y);
  width: var(--graph-width);
  opacity: 0.92;
  transform: translate(-50%, -50%) rotate(var(--graph-rotation));
  transform-origin: center;
}
.portal-process-graph:nth-child(3n + 1) { opacity: 0.84; }
.portal-process-graph:nth-child(3n) { opacity: 0.98; }
.portal-process-graph > img { width: 100%; height: auto; vertical-align: top; }
.portal-process-graph:nth-child(1) { --graph-x: 12%; --graph-y: 12%; --graph-width: 36%; --graph-rotation: -12deg; }
.portal-process-graph:nth-child(2) { --graph-x: 66%; --graph-y: 8%; --graph-width: 43%; --graph-rotation: 6deg; }
.portal-process-graph:nth-child(3) { --graph-x: 39%; --graph-y: 30%; --graph-width: 53%; --graph-rotation: 4deg; }
.portal-process-graph:nth-child(4) { --graph-x: 91%; --graph-y: 29%; --graph-width: 36%; --graph-rotation: -10deg; }
.portal-process-graph:nth-child(5) { --graph-x: 13%; --graph-y: 51%; --graph-width: 42%; --graph-rotation: 11deg; }
.portal-process-graph:nth-child(6) { --graph-x: 64%; --graph-y: 53%; --graph-width: 57%; --graph-rotation: -7deg; }
.portal-process-graph:nth-child(7) { --graph-x: 94%; --graph-y: 66%; --graph-width: 34%; --graph-rotation: 12deg; }
.portal-process-graph:nth-child(8) { --graph-x: 29%; --graph-y: 77%; --graph-width: 46%; --graph-rotation: -6deg; }
.portal-process-graph:nth-child(9) { --graph-x: 68%; --graph-y: 86%; --graph-width: 48%; --graph-rotation: 9deg; }
.portal-process-graph:nth-child(10) { --graph-x: 5%; --graph-y: 94%; --graph-width: 49%; --graph-rotation: -8deg; }
.portal-process-graph:nth-child(11) { --graph-x: 89%; --graph-y: 103%; --graph-width: 46%; --graph-rotation: 7deg; }
.portal-topics, .portal-examples { padding: 2.5rem clamp(1.5rem, 5vw, 5rem); border-bottom: 1px solid var(--border); }
.portal-topic-heading { padding-bottom: 1.5rem; }
.portal-topic-heading h2 { margin: 0; color: var(--ink-strong); font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.portal-topic-heading p { max-width: 50rem; margin: 1rem 0 0; color: var(--ink-muted); }
.portal-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.portal-topic-card { min-width: 0; display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid var(--hairline); border-radius: 0.35rem; background: var(--surface); }
.portal-topic-card h3 { margin: 0 0 0.7rem; font-size: 1.16rem; font-weight: 600; line-height: 1.3; color: var(--ink-strong); }
.portal-topic-card > p { margin: 0; color: var(--ink-muted); font-size: 0.94rem; line-height: 1.65; }
.portal-topic-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: auto; padding-top: 1.25rem; font-size: 0.86rem; }
.portal-topic-links a { text-decoration: none; }
.portal-topic-links a:hover, .portal-topic-links a:focus-visible { text-decoration: underline; }
.portal-topic-card .portal-topic-libraries { margin-top: 1.2rem; padding-top: 0.8rem; border-top: 1px solid var(--hairline); font-size: 0.76rem; }
.portal-topic-libraries a { color: var(--ink-muted); text-decoration: none; }
.portal-topic-libraries a:hover, .portal-topic-libraries a:focus-visible { color: var(--link); text-decoration: underline; }
.portal-example { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.2rem 0; border-top: 1px solid var(--hairline); text-decoration: none; }
.portal-example h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--ink-strong); }
.portal-example p { margin: 0; color: var(--ink-muted); font-size: 0.88rem; }
.portal-example:hover h3, .portal-example:focus-visible h3 { text-decoration: underline; }
.portal-example-runtime { flex-shrink: 0; font-size: 0.78rem; color: var(--link); }
.portal-library-note { padding: 2rem clamp(1.5rem, 5vw, 5rem); background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.portal-library-note p { margin: 0; }
.portal-library-note a { white-space: normal; }
.portal-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); gap: 1px; background: var(--border); }
.portal-project-card { min-width: 0; display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.6rem); background: var(--canvas); }
.portal-project-card h2 { margin: 0 0 0.8rem; font-size: 1.5rem; font-weight: 600; }
.portal-project-card h2 a { color: var(--ink-strong); text-decoration: none; }
.portal-project-card h2 a:hover, .portal-project-card h2 a:focus-visible { color: var(--link); text-decoration: underline; }
.portal-project-summary { margin: 0; color: var(--ink-muted); }
.portal-packages { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 1.5rem; }
.portal-packages-label { flex-basis: 100%; color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.portal-package { padding: 0.16rem 0.42rem; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-strong); font-family: var(--font-mono); font-size: 0.75rem; }
.portal-card-links { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 2rem; }
.portal-card-links a { padding: 0.3rem 0.52rem; border: 1px solid var(--hairline); background: var(--canvas); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; }
.portal-card-links a:hover, .portal-card-links a:focus-visible { border-color: var(--border); background: var(--surface); }
.portal-text-link { display: inline-flex; gap: 0.4rem; margin-top: 1rem; color: var(--link) !important; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.portal-text-link:hover, .portal-text-link:focus-visible { text-decoration: underline; }
.portal-funding { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 5rem); border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.portal-funding-mark { display: grid; place-items: center; width: 3.5rem; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%; background: var(--accent); color: #211526; font-family: var(--font-serif); font-size: 1.8rem; }
.portal-funding h2 { margin: 0.35rem 0 0; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 500; line-height: 1; letter-spacing: -0.025em; }
.portal-funding-copy > p:last-child { max-width: 50rem; margin: 0.65rem 0 0; color: var(--ink-muted); }
.portal-funding > .portal-text-link { margin-top: 0; }
.portal-showcase { border-bottom: 1px solid var(--border); }
.portal-showcase .portal-topic-heading { padding: 2.5rem var(--portal-gutter) 1.5rem; }
.portal-showcase-frame { padding: 0 var(--portal-gutter) 1rem; }
.portal-showcase-frame > [data-showcase] { min-height: 12rem; border: 1px solid var(--border); background: #211a23; }
.portal-showcase .gl-showcase-cover { background: rgb(33 26 35 / 92%); }
.portal-showcase .gl-showcase-cover-label { font: 0.875rem/1.5 var(--font-ui); letter-spacing: normal; }
.portal-showcase-credit { margin: 0; padding: 0 var(--portal-gutter) clamp(3rem, 6vw, 5rem); color: var(--ink-muted); font-size: 0.82rem; }
html:not(.js) .portal-showcase { display: none; }
.portal-footer { width: min(92rem, 100%); min-height: 16rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; align-items: start; margin: 0 auto; padding: clamp(2rem, 5vw, 4.5rem); border-right: 1px solid var(--border); border-left: 1px solid var(--border); }
.portal-footer > div { display: flex; gap: 1rem; align-items: center; }
.portal-footer p { margin: 0; color: var(--ink-muted); font-size: 0.82rem; }
.portal-footer strong { color: var(--ink-strong); font-family: var(--font-serif); font-size: 1.3rem; }
.portal-footer nav { display: grid; gap: 0.35rem; }
.portal-footer nav a { width: fit-content; font-family: var(--font-mono); font-size: 0.7rem; text-decoration: none; text-transform: uppercase; }
.portal-footer > p { text-align: right; }

.portal-subpage-main { min-height: 65vh; }
.portal-page-hero { padding: clamp(4rem, 9vw, 8rem) clamp(1.5rem, 7vw, 7rem); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.portal-page-hero h1 { max-width: 12ch; margin: 1rem 0 1.5rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.05em; }
.portal-page-hero > p:not(.portal-kicker) { max-width: 52rem; color: var(--ink-muted); font-size: 1.05rem; }
.portal-page-note { padding: 1.5rem clamp(1.5rem, 5vw, 5rem); border-top: 1px solid var(--border); background: var(--accent-soft); }
.portal-page-note p { max-width: 60rem; margin-bottom: 0; color: var(--ink-muted); }

.about-page-hero { background: linear-gradient(120deg, var(--surface-soft), var(--accent-soft)); }
.about-origin { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 0.85fr); border-bottom: 1px solid var(--border); }
.about-origin-copy { padding: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 6vw, 6rem); }
.about-origin h2, .about-pillars > header h2, .about-affiliations > header h2, .about-next h2 { margin: 0.8rem 0 1.5rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4.8rem); font-weight: 500; line-height: 0.96; letter-spacing: -0.045em; }
.about-origin-copy > p:not(.portal-kicker) { max-width: 46rem; color: var(--ink-muted); font-size: 1rem; line-height: 1.75; }
.about-origin-copy > nav, .about-next nav { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.about-equation { min-height: 38rem; display: grid; grid-template-rows: minmax(19rem, 1fr) auto auto; gap: clamp(1rem, 3vw, 2rem); overflow: hidden; padding: clamp(2rem, 5vw, 4rem); border-left: 1px solid var(--border); background: var(--surface); }
.about-equation-illustration { min-height: 19rem; display: grid; place-items: center; }
.about-equation-graph { width: 100%; max-height: 23rem; object-fit: contain; opacity: 0.88; }
.about-equation-formula { padding-top: clamp(1rem, 2vw, 2rem); border-top: 1px solid var(--hairline); }
.about-equation-formula img { width: 100%; height: auto; max-height: 9rem; object-fit: contain; object-position: left center; }
.about-equation > small { max-width: 28rem; color: var(--ink-muted); }
.about-pillars, .about-affiliations { border-bottom: 1px solid var(--border); }
.about-pillars > header, .about-affiliations > header { padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 6rem) 2.5rem; border-bottom: 1px solid var(--border); }
.about-pillars > header h2, .about-affiliations > header h2 { max-width: 15ch; }
.about-affiliations > header > p:last-child { max-width: 44rem; color: var(--ink-muted); }
.about-pillars > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-pillar { min-height: 20rem; padding: clamp(1.5rem, 4vw, 3.5rem); border-right: 1px solid var(--border); }
.about-pillar:last-child { border-right: 0; }
.about-pillar h2 { margin: 3rem 0 1rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(2rem, 3vw, 3rem); font-weight: 500; line-height: 1; }
.about-pillar > p:last-child { color: var(--ink-muted); }
.about-affiliations > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-affiliation { position: relative; min-height: 18rem; display: grid; align-content: start; padding: clamp(1.5rem, 4vw, 3.5rem); border-right: 1px solid var(--border); color: var(--ink-strong); text-decoration: none; transition: background-color 180ms ease, box-shadow 180ms ease; }
.about-affiliation:last-child { border-right: 0; }
.about-affiliation:hover, .about-affiliation:focus-visible { background: var(--accent-soft); box-shadow: inset 0.35rem 0 var(--accent); }
.about-affiliation > span, .about-affiliation > small { color: var(--link); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.about-affiliation strong { margin: 2rem 0 0.25rem; font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; }
.about-affiliation p { max-width: 35rem; color: var(--ink-muted); }
.about-affiliation b { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--link); }
.about-funding { border-bottom: 1px solid var(--border); }
.about-next { padding: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 6vw, 6rem); border-bottom: 1px solid var(--border); }
.about-next h2 { max-width: 13ch; }

.talks-page-hero h1 { max-width: none; }
.talks-provenance { font-family: var(--font-ui); font-size: 0.75rem !important; }
.talk-year { display: grid; grid-template-columns: clamp(15rem, 20vw, 18rem) minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.talk-year > h2 { margin: 0; padding: clamp(1.5rem, 4vw, 3.5rem); padding-inline: clamp(1.5rem, 3vw, 3rem); border-right: 1px solid var(--border); color: var(--link); font-family: var(--font-serif); font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 500; line-height: 1; }
.talk-year > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.talk-card { min-height: 18rem; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background-color 180ms ease, box-shadow 180ms ease; }
.talk-card:nth-child(2n) { border-right: 0; }
.talk-card:nth-last-child(-n + 2) { border-bottom: 0; }
.talk-card:hover { background: var(--accent-soft); box-shadow: inset 0.3rem 0 var(--accent); }
.talk-card-date { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0.75rem; border-right: 1px solid var(--hairline); color: var(--link); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.talk-card-date time { font-weight: 700; }
.talk-card-date span { margin-top: 0.2rem; color: var(--ink-muted); }
.talk-card-copy { display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 2.4rem); }
.talk-card-copy .portal-kicker a { color: inherit; text-decoration: none; }
.talk-card-copy h3 { margin: 1.1rem 0 1rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(1.55rem, 2.7vw, 2.3rem); font-weight: 600; line-height: 1.05; }
.talk-card-copy > p:not(.portal-kicker) { margin: 0; color: var(--ink-muted); font-size: 0.82rem; }
.talk-card-copy > p strong { color: var(--ink-strong); }
.talk-card-copy nav { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; padding-top: 1.5rem; }
.talk-card-copy nav a { padding: 0.3rem 0.52rem; border: 1px solid var(--hairline); background: var(--surface); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; text-transform: uppercase; }
.talk-card-copy nav a:hover, .talk-card-copy nav a:focus-visible { border-color: var(--border); background: var(--canvas); }

.people-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.people-card { min-height: 24rem; display: grid; grid-template-columns: minmax(10rem, 0.85fr) minmax(14rem, 1.15fr); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--canvas); }
.people-card:nth-child(2n) { border-right: 0; }
.people-card-portrait, .people-card-initials { width: 100%; height: 100%; min-height: 24rem; border-right: 1px solid var(--border); object-fit: cover; }
.people-card-portrait { object-position: left center; }
#ben-ruijl > .people-card-portrait { object-position: center; }
.people-card-initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--ink-strong); font-family: var(--font-serif); font-size: 4rem; }
.people-card-copy { display: flex; flex-direction: column; padding: clamp(1.4rem, 3vw, 2.5rem); }
.people-card h2 { margin: 0 0 0.65rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(2rem, 3vw, 3rem); font-weight: 600; line-height: 1; }
.people-card-copy > p:not(.portal-kicker) { color: var(--ink-muted); }
.people-card nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 1.5rem; }
.people-card nav a { padding: 0.3rem 0.5rem; border: 1px solid var(--hairline); background: var(--surface); font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; }
.people-card nav a:hover, .people-card nav a:focus-visible { border-color: var(--border); background: var(--accent-soft); }
.portal-page-hero-compact { padding: clamp(1.5rem, 3vw, 2.5rem); }
.portal-page-hero-compact h1 { max-width: none; margin: 0 0 0.8rem; font-size: clamp(2.5rem, 4vw, 4rem); }
.publication-provenance { margin: 0; font-family: var(--font-ui); font-size: 0.75rem !important; }
.publication-filters { position: sticky; top: var(--portal-header-height); z-index: 20; display: grid; grid-template-columns: minmax(13rem, 2fr) repeat(4, minmax(8rem, 1fr)) auto; gap: 0; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 96%, transparent); backdrop-filter: blur(12px); }
.publication-filters label { display: grid; gap: 0.25rem; padding: 0.65rem; border-right: 1px solid var(--hairline); color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.publication-filters input, .publication-filters select { min-width: 0; height: 2.35rem; padding: 0.35rem 0.5rem; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 0.78rem; text-transform: none; }
.publication-filters output { align-self: stretch; display: grid; place-items: center; min-width: 9rem; padding: 0.7rem; color: var(--ink-strong); font-family: var(--font-mono); font-size: 0.75rem; }
.publication-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.publication-card { min-height: 18rem; display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 2.2rem); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.publication-card:nth-child(2n of :not([hidden])) { border-right: 0; }
.publication-card[hidden] { display: none; }
.publication-card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--link); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.publication-card h2 { margin: 1.4rem 0 0.8rem; color: var(--ink-strong); font-family: var(--font-serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.08; }
.publication-card h2 a { text-decoration: none; }
.publication-authors { margin: 0; color: var(--ink-muted); font-size: 0.82rem; }
.publication-card nav { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: auto; padding-top: 1.5rem; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }

@media (max-width: 82rem) {
  .docs-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .docs-toc { display: none; }
  .docs-main { grid-column: 2; }
  .developer-inline-toc { display: block; }
  .docs-inline-toc { display: block; }
}

@media (max-width: 72rem) {
  .portal-hero { grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr); }
  .portal-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-filters { grid-template-columns: repeat(3, 1fr); }
  .publication-filters output { border-top: 1px solid var(--hairline); }
}

@media (max-width: 52rem) {

  .docs-shell { display: block; padding-top: calc(var(--header-height) + 43px); }
  html:has(.docs-local-bar) { scroll-padding-top: calc(var(--header-height) + 59px); }
  .docs-local-bar { position: fixed; top: var(--header-height); inset-inline: 0; height: 43px; z-index: 46; display: flex; align-items: center; justify-content: space-between; padding-inline: 1rem; border-bottom: 1px solid var(--hairline); background: var(--canvas); color: var(--ink-muted); font: .75rem var(--font-ui); }
  .site-header:has(+ .docs-local-bar) .portal-nav { top: calc(100% + 43px); }
  .docs-local-bar button { min-height: 42px; padding: 0 .25rem; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
  html:not(.js) .docs-local-bar { display: none; }
  html:not(.js) .docs-shell { padding-top: 0; }
  html:not(.js) .site-header { position: static; }
  .docs-sidebar { position: static; width: 100%; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .js .docs-sidebar { position: fixed; z-index: 45; top: calc(var(--header-height) + 43px); bottom: 0; width: var(--sidebar-width); border-right: 1px solid var(--border); border-bottom: 0; transform: translateX(-105%); transition: transform 200ms ease; box-shadow: var(--shadow); }
  .js body.sidebar-open .docs-sidebar { transform: translateX(0); }
  .js .sidebar-backdrop { position: fixed; inset: calc(var(--header-height) + 43px) 0 0; z-index: 40; border: 0; padding: 0; background: rgb(33 21 38 / 48%); }
  .js body.sidebar-open .sidebar-backdrop { display: block; }
  .docs-main { width: min(100%, 48rem); padding: 1.8rem 1.15rem 3rem; }
  .page-nav { grid-template-columns: 1fr; }
  .page-nav-link.next { text-align: left; }
  .developer-main { width: min(100%, 48rem); }
  .developer-audience, .developer-section-heading { grid-template-columns: 1fr; }
  .developer-card-grid { grid-template-columns: 1fr; }
  .developer-record-meta { grid-template-columns: 1fr; }
  .developer-record-scopes { grid-column: auto; }
  .api-symbol-siblings { grid-template-columns: 1fr; }
  .reference-coverage-grid { grid-template-columns: 1fr; }
  .api-doc-definitions { grid-template-columns: 1fr; }
  .api-doc-definitions dt { border-bottom: 0; background: var(--surface-soft); }
  .portal-brand-logo { width: 2.3rem; height: 2.3rem; }
  .portal-main, .portal-footer { border-right: 0; border-left: 0; }
  .portal-hero { min-height: auto; grid-template-columns: 1fr; }
  .portal-hero-copy { padding-top: 4.5rem; padding-bottom: 4rem; }
  .portal-hero h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }
  .portal-topic-grid { grid-template-columns: 1fr; }
  .portal-example { align-items: start; flex-direction: column; gap: 0.7rem; }
  .portal-hero-art { display: none; }
  .portal-wordmark { width: 12rem; min-height: 8rem; }
  .portal-graph-field { inset: 6rem -2rem 3.5rem; }
  .portal-process-graph:nth-child(1) { --graph-x: 5%; --graph-y: 10%; --graph-width: 22%; }
  .portal-process-graph:nth-child(2) { --graph-x: 29%; --graph-y: 7%; --graph-width: 28%; }
  .portal-process-graph:nth-child(3) { --graph-x: 55%; --graph-y: 19%; --graph-width: 30%; }
  .portal-process-graph:nth-child(4) { --graph-x: 85%; --graph-y: 8%; --graph-width: 23%; }
  .portal-process-graph:nth-child(5) { --graph-x: 15%; --graph-y: 40%; --graph-width: 28%; }
  .portal-process-graph:nth-child(6) { --graph-x: 45%; --graph-y: 50%; --graph-width: 31%; }
  .portal-process-graph:nth-child(7) { --graph-x: 78%; --graph-y: 34%; --graph-width: 24%; }
  .portal-process-graph:nth-child(8) { --graph-x: 96%; --graph-y: 55%; --graph-width: 26%; }
  .portal-process-graph:nth-child(9) { --graph-x: 24%; --graph-y: 77%; --graph-width: 30%; }
  .portal-process-graph:nth-child(10) { --graph-x: 61%; --graph-y: 81%; --graph-width: 29%; }
  .portal-process-graph:nth-child(11) { --graph-x: 92%; --graph-y: 92%; --graph-width: 25%; }
  .portal-project-grid { grid-template-columns: 1fr; }
  .portal-funding { grid-template-columns: auto minmax(0, 1fr); }
  .portal-funding > .portal-text-link { grid-column: 2; justify-self: start; }
  .portal-footer { grid-template-columns: 1fr; min-height: auto; }
  .portal-footer > p { text-align: left; }
  .about-origin { grid-template-columns: 1fr; }
  .about-equation { min-height: 28rem; border-top: 1px solid var(--border); border-left: 0; }
  .about-pillars > div, .about-affiliations > div { grid-template-columns: 1fr; }
  .about-pillar, .about-affiliation { border-right: 0; border-bottom: 1px solid var(--border); }
  .about-pillar:last-child, .about-affiliation:last-child { border-bottom: 0; }
  .talk-year { grid-template-columns: 1fr; }
  .talk-year > h2 { border-right: 0; border-bottom: 1px solid var(--border); }
  .talk-year > div { grid-template-columns: 1fr; }
  .talk-card, .talk-card:nth-child(2n), .talk-card:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--border); }
  .talk-card:last-child { border-bottom: 0; }
  .people-page-grid, .publication-list { grid-template-columns: 1fr; }
  .people-card, .publication-card { grid-column: auto; border-right: 0; }
  .publication-filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-filters output { min-height: 3rem; }
}

@media (max-width: 34rem) {
  .product-select { max-width: 9rem; }
  .reference-jump-groups { grid-template-columns: 1fr; }
  .developer-diagram iframe { height: 24rem; min-height: 24rem; }
  .portal-brand-copy strong { font-size: 1.1rem; }
  .portal-hero-actions, .portal-button { width: 100%; }
  .portal-hero-art { min-height: 32rem; }
  .portal-graph-field { inset: 6rem -4rem 3.4rem -3rem; }
  .portal-process-graph:nth-child(1) { --graph-x: 8%; --graph-y: 8%; --graph-width: 38%; }
  .portal-process-graph:nth-child(2) { --graph-x: 66%; --graph-y: 6%; --graph-width: 45%; }
  .portal-process-graph:nth-child(3) { --graph-x: 35%; --graph-y: 27%; --graph-width: 52%; }
  .portal-process-graph:nth-child(4) { --graph-x: 94%; --graph-y: 24%; --graph-width: 38%; }
  .portal-process-graph:nth-child(5) { --graph-x: 7%; --graph-y: 47%; --graph-width: 43%; }
  .portal-process-graph:nth-child(6) { --graph-x: 61%; --graph-y: 49%; --graph-width: 55%; }
  .portal-process-graph:nth-child(7) { --graph-x: 96%; --graph-y: 62%; --graph-width: 38%; }
  .portal-process-graph:nth-child(8) { --graph-x: 28%; --graph-y: 74%; --graph-width: 46%; }
  .portal-process-graph:nth-child(9) { --graph-x: 70%; --graph-y: 82%; --graph-width: 49%; }
  .portal-process-graph:nth-child(10) { --graph-x: 4%; --graph-y: 96%; --graph-width: 46%; }
  .portal-process-graph:nth-child(11) { --graph-x: 91%; --graph-y: 101%; --graph-width: 43%; }
  .people-card { grid-template-columns: 1fr; }
  .people-card-portrait, .people-card-initials { min-height: 19rem; max-height: 24rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .people-card-portrait { object-position: left top; }
  #ben-ruijl > .people-card-portrait { object-position: center top; }
  .publication-filters { grid-template-columns: 1fr; }
  .publication-filters label { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .reference-tools { grid-template-columns: 1fr; }
  .reference-tools label { grid-column: auto; }
  .reference-facts { grid-template-columns: 1fr; }
}


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

@media print {
  .site-header, .docs-sidebar, .docs-toc, .developer-inline-toc, .docs-inline-toc, .page-nav, .page-feedback, .page-footer, .search-dialog, .sidebar-backdrop, .portal-header, .portal-footer, [data-copy-target] { display: none !important; }
  .docs-shell { display: block; padding: 0; }
  .docs-main { width: 100%; max-width: none; padding: 0; }
}

/* Shared document grid: the same rails carry the masthead, sections and footer. */
:root {
  --rail: var(--hairline);
  --joint: color-mix(in srgb, var(--link) 70%, var(--canvas));
  --portal-gutter: clamp(1.25rem, 4vw, 3.5rem);
}
:is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-heading); font-optical-sizing: auto; }
:is(.docs-main, .developer-main, .portal-main, .portal-footer) { min-width: 0; overflow-wrap: break-word; }
:is(.sidebar-link, .sidebar-meta, .breadcrumbs, .toc-title, .toc-link,
  .header-button, .product-select, .page-nav-label, .page-feedback, .page-footer,
  .product-eyebrow, .hero-action, .api-kind, .api-symbol-meta, .reference-context,
  .reference-tools, .reference-jump-group > h3, .reference-jump-list small,
  .reference-permalink, .reference-guide-links, .reference-jump-summary,
  .developer-inline-toc summary, .docs-inline-toc summary,
  .portal-kicker, .portal-nav a, .portal-brand-copy small, .portal-source-link,
  .portal-search-button, .portal-button, .portal-topic-links, .portal-card-links a,
  .portal-packages-label, .portal-text-link, .portal-footer nav a,
  .publication-filters, .publication-card-meta, .publication-card nav) { font-family: var(--font-ui); }
:is(.sidebar-meta, .page-nav-label, .page-feedback a,
  .api-symbol-meta, .api-kind, .reference-context, .reference-tools label,
  .reference-tools output, .reference-jump-group > h3, .reference-jump-list small,
  .reference-jump-summary, .reference-permalink, .portal-kicker,
  .portal-brand-copy small, .portal-nav a, .portal-source-link, .portal-search-button,
  .portal-packages-label, .portal-package, .portal-card-links a, .portal-text-link,
  .portal-footer nav a, .publication-filters label, .publication-filters output,
  .publication-card-meta, .publication-card nav, .publication-provenance) { font-size: 0.75rem; }
.publication-filters :is(input, select) { font-family: var(--font-ui); font-size: 0.875rem; }
:is(.sidebar-link, .toc-link, .api-kind, .docs-article :not(pre) > code,
  .portal-topic-card, .product-logo-spenso, .search-dialog) { border-radius: 0; }
:is(.product-hero, .page-nav-link, .api-component-card, .developer-card,
  .reference-setting, .portal-topic-card) { background: transparent; box-shadow: none; }
.header-button:hover, .header-button:focus-visible, .product-select:hover,
.product-select:focus-visible, .hero-action:hover, .page-nav-link:hover,
.page-nav-link:focus-visible, .portal-button:hover, .portal-button:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--accent-soft);
  color: var(--ink-strong);
}
.site-brand-logo { display: block; width: 9rem; max-width: 100%; height: auto; max-height: 3rem; object-fit: contain; }
.site-brand-logo-dark { display: none; }
:root[data-theme="dark"] .site-brand-logo-light { display: none; }
:root[data-theme="dark"] .site-brand-logo-dark { display: block; }
.portal-brand-logo, .portal-footer-mark {
  width: 9.5rem;
  height: 3.4rem;
  background-image: url("alphalooplogo-light.svg");
}
:root[data-theme="dark"] :is(.portal-brand-logo, .portal-footer-mark) { background-image: url("alphalooplogo-dark.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .site-brand-logo-light { display: none; }
  :root:not([data-theme]) .site-brand-logo-dark { display: block; }
  :root:not([data-theme]) :is(.portal-brand-logo, .portal-footer-mark) { background-image: url("alphalooplogo-dark.svg"); }
}
.portal-main, .portal-footer { width: min(82rem, calc(100% - 3rem)); border-color: var(--rail); }
.portal-main > :not(.publication-filters), .portal-footer { position: relative; }
.portal-main > :is(section, header, div)::before, .portal-footer::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  left: -5px;
  top: -5px;
  pointer-events: none;
  background: linear-gradient(var(--joint), var(--joint)) center / 9px 1px no-repeat,
    linear-gradient(var(--joint), var(--joint)) center / 1px 9px no-repeat;
}
.portal-main > :is(section, header, div)::after, .portal-footer::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  right: -5px;
  top: -5px;
  pointer-events: none;
  background: linear-gradient(var(--joint), var(--joint)) center / 9px 1px no-repeat,
    linear-gradient(var(--joint), var(--joint)) center / 1px 9px no-repeat;
}
/* The header seam has only the navigation group’s short bottom marks. */
.portal-main > :first-child::before, .portal-main > :first-child::after { content: none; }
.portal-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 31rem; overflow: visible; border-color: var(--rail); }
.portal-hero-copy { padding: clamp(2rem, 5vw, 4.5rem) var(--portal-gutter); background: transparent; }
.portal-hero h1 { font-family: var(--font-heading); font-weight: 500; font-size: clamp(2.2rem, 3.8vw, 3.4rem); line-height: 1.13; letter-spacing: -.025em; max-width: 21ch; }
.portal-hero-copy > p { max-width: 36rem; }
.portal-hero-art { min-width: 0; min-height: 29rem; padding: 1.5rem; border: 0; background: transparent; overflow: hidden; pointer-events: none;
  mask-image: linear-gradient(transparent, #000 7%, #000 90%, transparent); }
.portal-hero-art::before { content: none; }
.portal-graph-field {
  inset: 2.5rem 1.25rem;
  overflow: visible;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 92%, transparent),
    linear-gradient(transparent, #000 10%, #000 88%, transparent);
  mask-composite: intersect;
}
.portal-process-graph:nth-child(1) { --graph-x: 20%; --graph-y: 13%; --graph-width: 46%; }
.portal-process-graph:nth-child(2) { --graph-x: 64%; --graph-y: 12%; --graph-width: 58%; }
.portal-process-graph:nth-child(3) { --graph-x: 40%; --graph-y: 32%; --graph-width: 60%; }
.portal-process-graph:nth-child(4) { --graph-x: 82%; --graph-y: 34%; --graph-width: 43%; }
.portal-process-graph:nth-child(5) { --graph-x: 16%; --graph-y: 52%; --graph-width: 50%; }
.portal-process-graph:nth-child(6) { --graph-x: 62%; --graph-y: 55%; --graph-width: 65%; }
.portal-process-graph:nth-child(7) { --graph-x: 82%; --graph-y: 76%; --graph-width: 45%; }
.portal-process-graph:nth-child(8) { --graph-x: 31%; --graph-y: 77%; --graph-width: 54%; }
.portal-process-graph:nth-child(9) { --graph-x: 64%; --graph-y: 91%; --graph-width: 58%; }
.portal-process-graph:nth-child(10) { --graph-x: 12%; --graph-y: 92%; --graph-width: 48%; }
.portal-process-graph:nth-child(11) { --graph-x: 12%; --graph-y: 30%; --graph-width: 43%; }
.portal-topics, .portal-examples, .portal-library-note, .portal-page-hero,
.portal-funding { padding: clamp(1.75rem, 4vw, 3rem) var(--portal-gutter); border-color: var(--rail); background: transparent; }
.portal-page-hero h1 { max-width: 22ch; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.12; letter-spacing: -.025em; }
.portal-topic-grid { gap: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rail); }
.portal-topic-card { padding: 1.5rem; border: 0; border-bottom: 1px solid var(--rail); border-right: 1px solid var(--rail); }
.portal-topic-card:nth-child(3n) { border-right: 0; }
.portal-topic-card:nth-child(3n + 1) { padding-left: 0; }
.portal-topic-card h3 { font-weight: 500; font-size: 1.3rem; }
.portal-topic-heading h2, .portal-project-card h2 { font-family: var(--font-heading); font-weight: 500; }
.keep-alpha { text-transform: none; }
.portal-research { padding: clamp(1.75rem, 4vw, 3rem) var(--portal-gutter); border-bottom: 1px solid var(--rail); }
.portal-research > header h2 { margin: 0 0 1.5rem; color: var(--ink-strong); font: 500 clamp(1.5rem, 2.3vw, 2rem)/1.2 var(--font-heading); }
.portal-research .about-origin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; border: 0; }
.portal-research .about-origin-copy { padding: 0; }
.portal-research .about-origin-copy > p:first-child { margin-top: 0; }
.portal-research .about-equation { min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr) auto auto; gap: 1rem; padding: 0 0 0 2rem; border-color: var(--rail); background: transparent; }
.portal-research .about-equation-illustration { min-height: 0; }
.portal-research .about-equation-graph { max-height: 15rem; }
.portal-research .about-equation > small { font: .75rem/1.5 var(--font-ui); }
.portal-project-grid { gap: 0; background: transparent; }
.portal-project-card { padding: 2rem var(--portal-gutter); border-bottom: 1px solid var(--rail); }
.portal-project-card:nth-child(odd) { border-right: 1px solid var(--rail); }
.portal-card-links { gap: .75rem 1rem; }
.portal-card-links a { padding: .25rem 0; border: 0; border-bottom: 1px solid var(--rail); background: transparent; }
.portal-funding-mark { border-radius: 0; background: transparent; color: var(--ink-strong); }
.portal-funding h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.2; }
.portal-footer { min-height: auto; padding: 2rem var(--portal-gutter); border-bottom: 1px solid var(--rail); }
.portal-footer nav a { text-transform: none; }
.docs-article th { font: 500 .875rem/1.5 var(--font-ui); }
.docs-article pre code { overflow-wrap: normal; }
.docs-article :is(.api-signature, .api-member-signature) { font-family: var(--font-mono); }
.developer-diagram iframe { box-shadow: none; }
.search-dialog { border-color: var(--hairline); box-shadow: var(--shadow); }
@media (max-width: 72rem) {
  .portal-main, .portal-footer { width: calc(100% - 2rem); }
  .portal-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-topic-card:nth-child(n) { padding: 1.25rem; border-right: 0; }
  .portal-topic-card:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--rail); }
}
@media (max-width: 52rem) {
  .portal-main, .portal-footer { width: calc(100% - 1.5rem); border-inline: 1px solid var(--rail); }
  .portal-brand-logo, .portal-footer-mark { width: 8.25rem; height: 3rem; }
  .site-brand-logo { width: 6.5rem; max-height: 2.5rem; }
  .portal-hero { grid-template-columns: 1fr; min-height: auto; }
  .portal-hero-copy { padding-block: 2rem 1rem; }
  .portal-hero h1 { font-size: clamp(2rem, 6.5vw, 3rem); margin-block: .8rem 1rem; }
  .portal-hero-art { display: block; height: clamp(18rem, 48vw, 25rem); min-height: 18rem; padding: 0; margin: 0 var(--portal-gutter) 1rem; }
  .portal-graph-field { inset: 1rem 0; }
  .portal-process-graph:nth-child(n) { display: block; }
  .portal-project-card:nth-child(n) { border-right: 0; }
  .portal-research .about-origin { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .portal-research .about-equation { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid var(--rail); }
  .portal-main > :is(section, header, div)::before,
  .portal-main > :is(section, header, div)::after, .portal-footer::before,
  .portal-footer::after, .product-hero::before, .product-hero::after { content: none; }
  .api-component-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .portal-topic-grid { grid-template-columns: 1fr; }
  .portal-topic-card:nth-child(n) { padding: 1.25rem 0; border-right: 0; }
  .portal-button { width: auto; }
  .portal-hero-actions { gap: .75rem; }
  .portal-brand { padding-inline: .65rem; }
  
}

/* Live notebooks initialize near the viewport; the authored example remains readable. */
.live-notebook {
  --marimo-monospace-font: var(--font-mono);
  --marimo-text-font: var(--font-sans);
  --marimo-heading-font: var(--font-heading);
  --notebook-link: var(--link);
  margin-block: 1.5rem;
  min-width: 0;
}
.live-notebook:is([data-notebook-state="loading"], [data-notebook-state="active"]):has(.live-notebook-cells) > .live-notebook-fallback { display: none; }
.notebook-toolbar > [role="status"] {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--ink-muted);
  font-size: .78rem;
}
.notebook-toolbar > [role="status"]::before {
  content: "";
  flex: 0 0 .55rem;
  height: .55rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.notebook-toolbar > [role="status"][data-state="ready"]::before { background: currentColor; }
.notebook-toolbar > [role="status"][data-state="error"] { color: var(--syntax-keyword); }
.notebook-toolbar > [role="status"][data-state="busy"]::before {
  border-right-color: transparent;
  animation: notebook-spin .8s linear infinite;
}
@keyframes notebook-spin { to { transform: rotate(360deg); } }
.live-notebook-cells { min-width: 0; }
/* The guide owns the reading width, rather than Marimo's inline export cap. */
.live-notebook-cells > div:has(> .notebook-cell) { max-width: none !important; }
.live-notebook-code-preview { white-space: pre; }
/* Editor integrations may insert status nodes between these siblings. */
.live-notebook marimo-ui-element:has(> marimo-code-editor:defined) > .live-notebook-code-preview { display: none; }
body:has(.live-notebook) > .marimo-islands-loading-toast { display: none; }
/* Keep Typst artwork on light paper without recoloring its drawing semantics. */
:is(.live-notebook, :host) :is(svg[width$="pt"], img[src^="data:image/svg+xml;"]) { display: block; max-width: 100%; height: auto; margin: 1rem auto; padding: .75rem; border-radius: 0; background: white; }
.live-notebook marimo-island { display: flex; flex-direction: column; gap: .65rem; min-width: 0; margin-block: 1.5rem; }
/* Islands render outputs first by default. Keep the document's code-then-result
   reading order, without putting both inside an application panel. */
.live-notebook marimo-island > marimo-ui-element { display: block; order: -1; min-width: 0; }
.live-notebook marimo-island > :is(marimo-cell-output, .relative) { min-width: 0; }



/* site.js marks this stylesheet for adoption into Marimo's shadow roots.
   The scoped palette and editor selectors follow the pinned runtime. */
:is(.live-notebook, :host) :is(.marimo, .marimo > .contents) {
  --background: var(--canvas);
  --foreground: var(--ink);
  --muted: var(--surface-soft);
  --muted-foreground: var(--ink-muted);
  --popover: var(--surface);
  --popover-foreground: var(--ink);
  --card: var(--surface);
  --card-foreground: var(--ink);
  --border: var(--hairline);
  --input: var(--hairline);
  --primary: var(--notebook-link);
  --primary-foreground: var(--canvas);
  --secondary: var(--surface-soft);
  --secondary-foreground: var(--ink-strong);
  --accent: var(--accent-soft);
  --accent-foreground: var(--ink-strong);
  --link: var(--notebook-link);
  --link-visited: var(--notebook-link);
  --ring: var(--notebook-link);
  --radius: 0;
  --cm-background: var(--surface);
  --cm-comment: var(--syntax-comment);
  --cm-selection-background-light: var(--accent-soft);
  --cm-selection-background-dark: var(--accent-soft);
  color-scheme: inherit;
  font-family: var(--marimo-text-font);
}
:is(.live-notebook, :host) .marimo .cm { border-color: var(--hairline); border-radius: var(--radius); }
:is(.live-notebook, :host) .marimo .prose {
  --tw-prose-body: var(--ink);
  --tw-prose-lead: var(--ink-muted);
  --tw-prose-bold: var(--ink-strong);
  --tw-prose-headings: var(--ink-strong);
  --tw-prose-links: var(--notebook-link);
  --tw-prose-code: var(--ink);
  --tw-prose-quotes: var(--ink);
  --tw-prose-captions: var(--ink-muted);
  --tw-prose-counters: var(--ink-muted);
  --tw-prose-bullets: var(--ink-muted);
  --tw-prose-hr: var(--hairline);
  --tw-prose-quote-borders: var(--hairline);
  --tw-prose-th-borders: var(--hairline);
  --tw-prose-td-borders: var(--hairline);
}
:is(.live-notebook, :host) .cm-editor {
  min-width: 0;
  min-height: 0;
  border-color: var(--hairline);
  background: var(--surface);
  color: var(--ink);
}
:is(.live-notebook, :host) .cm-scroller { font: .9rem/1.55 var(--marimo-monospace-font); padding-block: .5rem; }
:is(.live-notebook, :host) .cm-gutters { border: 0; background: var(--surface); color: var(--ink-muted); }
:is(.live-notebook, :host) .cm-cursor { border-left-color: var(--ink); }
:is(.live-notebook, :host) .cm-activeLine { background: transparent; }
:is(.live-notebook, :host) .cm-focused .cm-activeLine { background: color-mix(in srgb, var(--notebook-link) 11%, transparent); }
:is(.live-notebook, :host) .cm-activeLineGutter { background: transparent; }
:is(.live-notebook, :host) .cm-focused .cm-activeLineGutter { color: var(--notebook-link); }
:is(.live-notebook, :host) .cm-focused .cm-selectionBackground,
:is(.live-notebook, :host) .cm-selectionBackground { background: var(--accent-soft); }
:is(.live-notebook, :host) .marimo button { border-color: var(--hairline); box-shadow: none; }
:is(.live-notebook, :host) .marimo button:focus-visible { outline: 2px solid var(--notebook-link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .notebook-toolbar > [role="status"][data-state="busy"]::before { animation: none; }
}

/* The streaming widget also runs outside the docs, where its inline defaults apply. */
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] {
  border-color: var(--hairline) !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] > div {
  flex-wrap: wrap;
  border-color: var(--hairline) !important;
  font-family: var(--marimo-text-font) !important;
}
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] button {
  background: var(--canvas) !important;
  color: var(--ink-strong) !important;
}
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] svg text { fill: var(--ink); font-family: var(--marimo-text-font); }
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] svg path { stroke: var(--ink-muted); }
:is(.live-notebook, :host) [data-linnet-render-ready="stream"] svg circle[stroke] { stroke: var(--surface); }

@media (max-width: 40rem) {
  :host(marimo-accordion) [style*="flex-flow: row"] { flex-direction: column !important; gap: .5rem !important; }
  .live-notebook .output [style*="flex-flow: row"] { flex-wrap: wrap !important; }
  .live-notebook .output marimo-ui-element:has(> marimo-dropdown) { min-width: 0; max-width: 100%; }
  .live-notebook marimo-dropdown { display: block; max-width: 100%; }
  :host(marimo-dropdown) .mo-label { max-width: 100%; flex-wrap: wrap; }
}

/* Functional controls retain the guide palette and typography. */
html:has(.notebook-toolbar) { scroll-padding-bottom: calc(var(--notebook-bar-height, 64px) + 16px); }
body:has(.notebook-toolbar) { padding-bottom: calc(var(--notebook-bar-height, 64px) + 16px); }
body:has(.notebook-toolbar):not(.sidebar-open) :is(.docs-sidebar, .docs-toc) { bottom: var(--notebook-bar-height, 64px); }
.notebook-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  margin: 0;
  padding: 5px max(16px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  font: 12px/1.4 var(--font-ui);
}
.notebook-toolbar > :is(button, a, details) { flex-shrink: 0; }
.notebook-toolbar > [role="status"] { display: block; white-space: normal; overflow-wrap: anywhere; }
.notebook-toolbar > [role="status"]::before { display: inline-block; width: .55rem; margin-right: .5rem; }
.notebook-toolbar .notebook-run-all { min-height: 44px; padding: .4rem .7rem; border: 1px solid var(--link); background: transparent; color: var(--link); cursor: pointer; font: .8rem var(--font-ui); }
.notebook-toolbar:has(.notebook-more[open]) { z-index: 31; }
.notebook-more { position: relative; }
.notebook-more > summary { display: flex; align-items: center; min-height: 44px; padding: 0 8px; cursor: pointer; list-style: none; }
.notebook-more > summary::-webkit-details-marker { display: none; }
.notebook-more > summary::after { content: "⌃"; margin-left: 6px; }
.notebook-more[open] > summary::after { content: "⌄"; }
.notebook-options {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--header-height) - var(--notebook-bar-height, 64px) - 24px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--hairline);
  background: var(--canvas);
  box-shadow: var(--shadow);
}
.notebook-options > :is(button, a) { display: flex; align-items: center; width: 100%; min-height: 44px; text-align: left; margin-bottom: 6px; }
.notebook-options .notebook-help { margin: 10px 0 0; white-space: normal; }
body.sidebar-open .notebook-toolbar { visibility: hidden; }
@media print { .notebook-toolbar { display: none; } body:has(.notebook-toolbar) { padding-bottom: 0; } }
.notebook-toolbar button:not(.notebook-run-all) { font: .8rem var(--font-ui); color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: .4rem .7rem; cursor: pointer; }
.notebook-toolbar button:disabled { opacity: .5; cursor: wait; }
.notebook-cell { position: relative; margin-block: 1.5rem; border: 1px solid var(--hairline); padding: 0; min-width: 0; }
.notebook-cell[hidden] { display: none; }
.notebook-cell-header { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.notebook-cell-header > .notebook-source-toggle { order: -1; margin-right: auto; }
.notebook-source-toggle { color: var(--ink-muted); background: transparent; border: 1px solid var(--hairline); border-radius: var(--radius); font: .75rem var(--font-ui); padding: .2rem .4rem; cursor: pointer; }
.live-notebook marimo-island > marimo-ui-element[hidden] { display: none; }
.notebook-cell-header > .notebook-cell-state { margin: 0; padding-block: .3rem; color: var(--ink-muted); font: .75rem/1.4 var(--font-ui); text-transform: capitalize; }
.notebook-cell-time { color: var(--ink-muted); font: .75rem/1.4 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-notebook .notebook-cell > marimo-island { margin-block: 0; }
.live-notebook button[data-notebook-action="Run cell"] { width: auto; padding: .25rem .5rem; height: auto; gap: .3rem; }
.live-notebook button[data-notebook-action="Run cell"]::after { content: "Run cell"; }

.notebook-help { font-size: .85rem; color: var(--ink-muted); }

/* One code/result unit with the same drawn corners as the guide rails. */
.notebook-cell:not([data-notebook-prose])::before,
.notebook-cell:not([data-notebook-prose])::after {
  content: ""; position: absolute; width: .6rem; height: .6rem;
  border-color: var(--ink-muted); pointer-events: none;
}
.notebook-cell::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.notebook-cell::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.notebook-run { font: .78rem var(--font-ui); color: var(--ink-strong); background: var(--surface); border: 1px solid var(--hairline); border-radius: 0; padding: .3rem .65rem; cursor: pointer; }
.notebook-run:disabled { opacity: .5; cursor: default; }
/* The header delegates to the original Marimo handler; other controls remain. */
.live-notebook marimo-island > .relative > .absolute button:has(svg.lucide-play) { display: none; }
/* Source owns copying; modifier keys must not reveal an output duplicate. */
.live-notebook marimo-island > .relative > .absolute button:has(svg.lucide-copy) { display: none; }
.notebook-cell[data-notebook-prose] { border: 0; padding: 0; font: inherit; }
[data-notebook-prose] > .notebook-cell-header,
[data-notebook-prose] > marimo-island > .relative > .absolute { display: none; }
.live-notebook [data-notebook-prose] :is(.marimo, .prose, .markdown) { font: inherit; color: inherit; max-width: none; }
.live-notebook [data-notebook-prose] :is(h1,h2,h3,h4,h5,h6) { font-family: var(--font-heading); font-weight: 500; color: var(--ink-strong); line-height: 1.2; letter-spacing: -.025em; }
.live-notebook [data-notebook-intro] h1:first-child { display: none; }
.live-notebook [data-notebook-prose] h1 { margin: 0 0 1.2rem; font-size: clamp(2rem, 4vw, 2.6rem); }
.live-notebook [data-notebook-prose] h2 { margin: 3rem 0 .85rem; font-size: 1.7rem; }
.live-notebook [data-notebook-prose] h3 { margin: 2.2rem 0 .7rem; font-size: 1.28rem; }
:is(.live-notebook, :host) .marimo button { font-family: var(--font-ui); }

.live-notebook [data-notebook-prose] p { margin: .8rem 0 1.1rem; font: inherit; color: inherit; }

/* Flatten the layout boundary while React retains ownership of island hosts. */
.notebook-cell:not([data-notebook-prose]):not([hidden]) { display: flex; flex-direction: column; }
.live-notebook .notebook-cell:not([data-notebook-prose]) > marimo-island { display: contents; }
.live-notebook .notebook-cell > marimo-island > marimo-ui-element { order: 0; }
.notebook-cell-header { order: 1; min-height: 40px; padding: 4px 8px; gap: 8px; border-top: 1px solid var(--hairline); }
.live-notebook .notebook-cell:not([data-notebook-prose]) > marimo-island > :is(.relative, marimo-cell-output) { order: 2; padding: 16px; border-top: 1px solid var(--hairline); }
.notebook-cell:has(> marimo-island[data-notebook-source-hidden="true"]) > .notebook-cell-header { border-top: 0; }
.notebook-cell-header > :is(.notebook-source-toggle, .notebook-run) { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; background: transparent; }
.notebook-cell-header > .notebook-run { color: var(--notebook-link); }
.notebook-cell-header > button svg { width: 15px; height: 15px; }
.notebook-cell-header > button:hover { border-color: var(--hairline); background: var(--accent-soft); }
.notebook-cell-header > button:focus-visible { outline: 2px solid var(--notebook-link); outline-offset: 2px; }
.notebook-cell-header > .notebook-cell-state, .notebook-cell-time { font-size: 11px; }
.notebook-run[aria-busy="true"] svg { opacity: .5; }
/* Outset numbers use the reading column's margin, shared by all guide content. */
@media (max-width: 40rem) {
  .docs-main:has(.live-notebook) { padding-left: 44px; }
}
/* Paint the frame above the overflowing native viewport. The gutter remains
   sticky and opaque while the frame keeps its own continuous foreground edge. */
.live-notebook marimo-ui-element:has(> marimo-code-editor[data-notebook-source]) { position: relative; }
.live-notebook marimo-ui-element:has(> marimo-code-editor[data-notebook-source])::after {
  content: ""; position: absolute; inset: 0 -1px; z-index: 2;
  border-inline: 1px solid var(--hairline); pointer-events: none;
}
.notebook-cell:not([data-notebook-prose])::before,
.notebook-cell:not([data-notebook-prose])::after { z-index: 3; }
:host(marimo-code-editor[data-notebook-source]) .cm-editor {
  --notebook-gutter-width: var(--code-gutter);
  width: calc(100% + var(--notebook-gutter-width));
  margin-left: calc(-1 * var(--notebook-gutter-width));
  border: 0;
  background: transparent;
}
:host(marimo-code-editor[data-notebook-source]) .cm-scroller { max-height: 360px; padding-block: 12px; font: 400 var(--code-size)/var(--code-leading) var(--font-mono); }
:host(marimo-code-editor[data-notebook-source]) .cm-content { padding-block: 0; }
:host(marimo-code-editor[data-notebook-source]) .cm-line { padding-inline: 16px; }
:host(marimo-code-editor[data-notebook-source]) .cm-gutters { padding-right: 9px; background: var(--canvas); font: inherit; }
:host(marimo-code-editor[data-notebook-source]) .cm-lineNumbers .cm-gutterElement { min-width: 3ch; padding-inline: 0; text-align: right; }
:host(marimo-code-editor[data-notebook-source]) .marimo .cm { overflow: visible; border: 0; border-radius: 0; }
:host(marimo-code-editor[data-notebook-source]) .cm-editor .cm-gutter:not(.cm-lineNumbers) { display: none !important; }
:host(marimo-code-editor[data-notebook-source]) .cm-editor.cm-focused { outline: none; }
:host(marimo-code-editor[data-notebook-source]) .marimo .cm:focus-within { outline: 1px solid color-mix(in srgb, var(--notebook-link) 40%, transparent); outline-offset: -1px; }

/* Source presentation is shared by static fences, direct cells and native
   showcase editors. Prose and inline identifiers keep their own typography. */
.docs-article pre:has(> code[data-lang]) {
  font: 400 var(--code-size)/var(--code-leading) var(--font-mono);
  border: 1px solid var(--hairline); border-radius: 0; padding: 12px 16px;
  background: var(--surface); color: var(--ink); overflow-x: auto;
}
.docs-article pre > code[data-lang] { font: inherit; white-space: pre; }
.docs-article pre.api-member-signature:has(> code[data-lang]) { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 3rem; }
.docs-article pre.api-member-signature > code[data-lang] { white-space: inherit; overflow-wrap: inherit; }
.documentation-cell { position: relative; min-width: 0; margin-block: 1.5rem; border: 1px solid var(--hairline); background: var(--surface); }
.documentation-cell::before, .documentation-cell::after {
  content: ''; position: absolute; width: .6rem; height: .6rem; z-index: 3; border-color: var(--ink-muted); pointer-events: none;
}
.documentation-cell::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.documentation-cell::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }
.documentation-cell > .code-frame { margin: 0; border: 0; }
.documentation-cell > .code-frame::before, .documentation-cell > .code-frame::after { display: none; }
.documentation-cell .notebook-cell-header { border-top: 1px solid var(--hairline); }
.documentation-cell .notebook-cell-header > button { font-family: var(--font-ui); cursor: pointer; }
.documentation-cell .notebook-cell-header > button:not(.notebook-run):not(.notebook-source-toggle):not([data-copy-target]) { padding: .25rem .5rem; background: transparent; border: 1px solid transparent; color: var(--ink-muted); font-size: 11px; }
.documentation-cell-output:empty, .documentation-type-status:empty { display: none; }
.documentation-cell-output { min-width: 0; padding: 16px; border-top: 1px solid var(--hairline); }
.documentation-cell-output pre { margin: 0; padding: 0; border: 0; background: transparent; font: 400 var(--code-size)/var(--code-leading) var(--font-mono); overflow: auto; white-space: pre-wrap; }
.documentation-cell-output img { display: block; max-width: 100%; height: auto; background: white; }
.documentation-cell-output iframe { display: block; width: 100%; height: 32rem; border: 0; }
.documentation-cell-reason, .documentation-type-status { color: var(--ink-muted); font: .75rem/1.5 var(--font-ui); }
.documentation-type-status { padding: 4px 8px; }
.documentation-editor .cm-editor { --notebook-gutter-width: var(--code-gutter); width: calc(100% + var(--notebook-gutter-width)); margin-left: calc(-1 * var(--notebook-gutter-width)); background: transparent; }
.documentation-editor .cm-scroller { max-height: 360px; padding-block: 12px; font: 400 var(--code-size)/var(--code-leading) var(--font-mono); }
.documentation-editor .cm-content { padding-block: 0; }
.documentation-editor .cm-line { padding-inline: 16px; }
.documentation-editor .cm-gutters { padding-right: 9px; border: 0; background: var(--canvas); color: var(--ink-muted); font: inherit; }
.documentation-editor .cm-lineNumbers .cm-gutterElement { min-width: 3ch; padding-inline: 0; text-align: right; }
.documentation-editor .cm-cursor { border-left-color: var(--ink); }
.documentation-editor .cm-activeLine { background: transparent; }
.documentation-editor .cm-focused .cm-activeLine { background: color-mix(in srgb, var(--notebook-link) 11%, transparent); }
.documentation-editor .cm-editor.cm-focused { outline: none; }
.documentation-editor:focus-within { outline: 1px solid color-mix(in srgb, var(--notebook-link) 40%, transparent); outline-offset: -1px; }
@media (max-width: 40rem) { .docs-main:has(.code-frame) { padding-left: 44px; } }

.documentation-cell .notebook-cell-header > button[data-copy-target] { font-size: 0; line-height: 0; position: static; box-shadow: none; background: transparent; border-color: transparent; flex-shrink: 0; }

.documentation-cell:has(> .code-frame[hidden]) > .notebook-cell-header { border-top: 0; }

/* Portal pages share the homepage's editorial rules and inset controls. */
.portal-subpage-main { --portal-page-inset: clamp(1.5rem, 5vw, 5rem); }
.portal-subpage-main .portal-page-hero { padding: 3rem var(--portal-page-inset) 2rem; background: var(--canvas); }
.portal-subpage-main .portal-page-hero h1 { max-width: none; margin: 0 0 1rem; font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.035em; }
.portal-subpage-main .portal-page-hero > p { max-width: 52rem; }
.portal-project-grid { display: block; background: var(--canvas); padding-inline: var(--portal-page-inset); }
.portal-project-card:nth-child(n) { border-right: 0; }
.portal-project-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem 2rem; padding: 2rem 0; border-bottom: 1px solid var(--hairline); }
.portal-project-card h2 { margin: 0; }
.portal-project-summary, .portal-packages { grid-column: 1; }
.portal-packages { margin-top: 0.5rem; }
.portal-packages-label { display: none; }
.portal-package { padding: 0; border: 0; background: transparent; color: var(--ink-muted); }
.portal-package + .portal-package::before { content: "·"; margin-right: 0.35rem; }
.portal-card-links { grid-column: 2; grid-row: 1 / span 3; align-content: start; justify-content: end; margin: 0; padding: 0; max-width: 18rem; gap: 0.6rem 1.1rem; }
.portal-card-links a, .people-card nav a, .talk-card-copy nav a { padding: 0; border: 0; background: transparent; font-family: var(--font-ui); font-size: 0.8rem; text-transform: none; }
.portal-card-links a:hover, .people-card nav a:hover, .talk-card-copy nav a:hover { background: transparent; text-decoration: underline; }
.people-page-grid { display: block; padding-inline: var(--portal-page-inset); }
.people-card { min-height: 0; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.75rem 0; border-right: 0; }
.people-card-portrait, .people-card-initials { width: 5rem; height: 6rem; min-height: 0; max-height: none; border: 0; }
.people-card-initials { font-size: 2rem; }
.people-card-copy { padding: 0; }
.people-card h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); line-height: 1.2; }
.people-card-copy > p { margin: 0; }
.people-card nav { margin-top: 0; padding-top: 0.9rem; gap: 0.7rem 1.2rem; }
.about-origin-copy, .about-next { padding: 2.5rem var(--portal-page-inset); }
.about-origin h2, .about-pillars > header h2, .about-affiliations > header h2, .about-next h2 { margin: 0 0 1.25rem; max-width: none; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.2; }
.about-pillars > header, .about-affiliations > header { padding: 2.5rem var(--portal-page-inset) 1.5rem; }
.about-pillar { min-height: 0; padding: 2rem var(--portal-page-inset); }
.about-pillar h2 { margin: 0.75rem 0; font-size: 1.6rem; line-height: 1.2; }
.about-affiliation { min-height: 0; padding: 2rem var(--portal-page-inset); }
.about-affiliation strong { margin-top: 1rem; font-size: 1.8rem; }
.talk-timeline, .publication-list { display: block; padding-inline: var(--portal-page-inset); }
.talk-year { grid-template-columns: 6rem minmax(0, 1fr); }
.talk-year > h2 { padding: 1.75rem 0; border-right: 0; font-size: 1.6rem; }
.talk-year > div { display: block; }
.talk-card { min-height: 0; grid-template-columns: 5rem minmax(0, 1fr); border-right: 0; border-bottom: 1px solid var(--hairline); }
.talk-card:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hairline); }
.talk-card:last-child { border-bottom: 0; }
.talk-card:hover { background: transparent; box-shadow: none; }
.talk-card-date { align-items: start; padding: 1.75rem 0; border-right: 0; font-family: var(--font-ui); text-transform: none; }
.talk-card-copy { padding: 1.75rem 0 1.75rem 1rem; }
.talk-card-copy h3 { margin: 0.6rem 0; font-size: clamp(1.3rem, 2.3vw, 1.8rem); line-height: 1.25; }
.talk-card-copy nav { padding-top: 1rem; margin-top: 0; gap: 0.7rem 1.2rem; }
.publication-card { min-height: 0; padding: 1.75rem 0; border-right: 0; border-bottom: 1px solid var(--hairline); }
.publication-card h2 { max-width: 60rem; margin: 0.6rem 0; font-size: clamp(1.3rem, 2.3vw, 1.8rem); line-height: 1.3; }
.publication-card-meta { font-family: var(--font-ui); text-transform: none; color: var(--ink-muted); }
.publication-authors { font-size: 0.95rem; }
.publication-card nav { padding-top: 0.9rem; margin-top: 0; font-family: var(--font-ui); text-transform: none; }
.record-filters { position: static; display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 0.9rem; padding: 1.5rem var(--portal-page-inset); border-bottom: 1px solid var(--hairline); background: var(--canvas); backdrop-filter: none; align-items: end; }
.record-filters .record-field { display: grid; min-width: 0; padding: 0; gap: 0.45rem; border: 0; color: var(--ink-muted); font: 0.8rem/1.5 var(--font-ui); text-transform: none; }
.record-field-quiet > .record-field-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.record-field-control { position: relative; min-width: 0; border: 1px solid var(--hairline); background: var(--surface); }
.record-field-control::before, .record-field-control::after { content: ""; position: absolute; z-index: 1; width: 9px; height: 9px; border: solid var(--ink-muted); pointer-events: none; }
.record-field-control::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.record-field-control::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.record-field-control:focus-within { border-color: var(--link); }
.record-field-control:focus-within::before, .record-field-control:focus-within::after { border-color: var(--link); }
.record-filters input, .record-filters select { display: block; width: 100%; min-width: 0; height: 46px; padding: 0.6rem 0.75rem; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 400 16px/1.5 var(--font-ui); text-transform: none; }
.record-filters input:focus, .record-filters select:focus { outline: 1px solid var(--link); outline-offset: -1px; }
.record-filters input::placeholder { color: var(--ink-muted); opacity: 1; }
.record-filters select option { background: var(--surface); color: var(--ink); }
.record-filters output { display: block; grid-column: 1 / -2; min-width: 0; min-height: 0; padding: 0; border: 0; color: var(--ink-muted); font: 0.8rem/1.5 var(--font-ui); align-self: center; }
.record-reset { justify-self: end; min-height: 36px; padding: 0.3rem 0; border: 0; background: transparent; color: var(--link); font: 0.8rem/1.5 var(--font-ui); }
.talk-filters { grid-template-columns: minmax(0, 1fr) 10rem; }
.talk-filters output { grid-column: 1; }
.talk-card[hidden], .talk-year[hidden] { display: none; }
@media (max-width: 72rem) {
  .record-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .record-filters .record-field:first-child { grid-column: span 2; }
  .record-filters output { grid-column: 1 / -2; }
  .talk-filters { grid-template-columns: minmax(0, 1fr) 10rem; }
  .talk-filters .record-field:first-child { grid-column: auto; }
}
@media (max-width: 52rem) {
  .portal-project-card { grid-template-columns: minmax(0, 1fr); }
  .portal-card-links { grid-column: 1; grid-row: auto; justify-content: start; max-width: none; padding-top: 0.75rem; }
  .record-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-filters .record-field:first-child { grid-column: 1 / -1; }
  .record-filters output { grid-column: 1; }
  .talk-year { grid-template-columns: minmax(0, 1fr); }
  .talk-year > h2 { border-bottom: 1px solid var(--hairline); padding: 1.25rem 0; }
}
@media (max-width: 34rem) {
  .portal-subpage-main .portal-page-hero { padding-top: 2rem; }
  .people-card { grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; }
  .people-card-portrait, .people-card-initials { width: 3rem; height: 3.6rem; min-height: 0; max-height: none; border: 0; }
  .talk-card { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .talk-card-copy { padding-left: 0.5rem; }
  .record-filters { gap: 0.8rem; }
  .record-filters .record-field { grid-column: 1 / -1; }
  .record-reset { white-space: nowrap; }
}

/* Long sources keep native scrolling and offer an explicit full-height view. */
:host(marimo-code-editor[data-notebook-expanded]) .cm-scroller { max-height: none !important; }
.notebook-source-expand { padding: .25rem .4rem; border: 1px solid var(--hairline); background: transparent; color: var(--ink-muted); font: 11px var(--font-ui); cursor: pointer; }
.notebook-cell:has(> marimo-island[data-notebook-source-hidden="true"]) .notebook-source-expand { display: none; }

:host(marimo-table:not([data-selection])) [part="table-footer"] .italic { display: none; }
:host(marimo-table[data-notebook-table-quiet]) [part="table-footer"] { display: none; }
:host(marimo-table) .notebook-table-scroll-hint { margin: .4rem 0 0; color: var(--ink-muted); font: .75rem var(--font-ui); }
:host(marimo-table) .notebook-table-scroll-hint[hidden] { display: none; }
:host(marimo-table) [role="region"]:focus-visible { outline: 2px solid var(--notebook-link); outline-offset: -2px; }

.notebook-factor-scroll { max-width: 100%; overflow-x: auto; padding-block: .25rem; }
.notebook-factor-scroll:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
@media (max-width: 40rem) {
  .notebook-factor-scroll::after { content: "Scroll formula horizontally →"; display: block; position: sticky; left: 0; margin-top: .5rem; color: var(--ink-muted); font: 12px/1.5 var(--font-ui); }
}
