/* Beamtime: generated from design/tokens.json by scripts/build-tokens. Do not edit by hand. */
:root, [data-theme="light"] {
  --paper: #fcfcfd; /* Page background, sidebar and bars: a cool near-white, a cool charcoal in dark. */
  --surface: #f3f4f6; /* Second paper: panels (sub-groups, stats, an open note), filled fields, code, logs, floating panels. */
  --line: #e5e7eb; /* Hairlines between sections and around the bars. Separators only (1.2:1 on `paper`): never the only edge of a control. */
  --border: #7d828c; /* Edges of controls: fields, checkboxes, selects. 3.5:1 or more on `paper` and `surface` in both themes. */
  --ink: #15171c; /* Text and the numbers that matter. 17.5:1 on `paper` (light), 15:1 (dark). */
  --muted: #5c616c; /* Secondary text: labels, captions, facts, axes, icons at rest. 5.6:1 or more on `paper` and `surface` in both themes. */
  --accent: #2f5aa8; /* The one accent, ink blue: links, focus, selection, running, the text of buttons, checked boxes. 6.5:1 / 7.5:1 on `paper`. */
  --good: #3f7d3a; /* Pass, confirmed, finished. Always with an icon and a word. 4.9:1 / 7.6:1 on `paper`. */
  --bad: #b8433a; /* Fail, refuted, failed runs, errors in place. 5.2:1 / 6.3:1 on `paper`. */
  --warn: #8f5d08; /* Inconclusive, killed, stale. Always with an icon and a word. 5.5:1 / 8:1 on `paper`. */
  --data-1: #2f5fc4; /* Run 1 of 6 (blue), drawn solid. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
  --data-2: #e0731f; /* Run 2 of 6 (orange), drawn dashed. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
  --data-3: #16613f; /* Run 3 of 6 (dark green), drawn dotted. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
  --data-4: #9a63d0; /* Run 4 of 6 (violet), drawn dash-dot. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
  --data-5: #b8326f; /* Run 5 of 6 (magenta), drawn short dashes. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
  --data-6: #0f8290; /* Run 6 of 6 (teal), drawn long dashes. 3.0–7.1:1 on light `paper`, 4.1–9.9:1 on dark; lightness differs from its neighbours so runs stay apart without hue. */
}
[data-theme="dark"] {
  --paper: #16171a;
  --surface: #1e2024;
  --line: #2d3036;
  --border: #717783;
  --ink: #e9ebef;
  --muted: #9da3ae;
  --accent: #86a8e8;
  --good: #7fb77a;
  --bad: #e77a6f;
  --warn: #d9a548;
  --data-1: #6f93e0;
  --data-2: #f2a35e;
  --data-3: #3c8c5f;
  --data-4: #d6bcf8;
  --data-5: #d9668f;
  --data-6: #5fc9d4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #16171a;
    --surface: #1e2024;
    --line: #2d3036;
    --border: #717783;
    --ink: #e9ebef;
    --muted: #9da3ae;
    --accent: #86a8e8;
    --good: #7fb77a;
    --bad: #e77a6f;
    --warn: #d9a548;
    --data-1: #6f93e0;
    --data-2: #f2a35e;
    --data-3: #3c8c5f;
    --data-4: #d6bcf8;
    --data-5: #d9668f;
    --data-6: #5fc9d4;
    color-scheme: dark;
  }
}
:root {
  --space-1: 4px; /* Icon to word, tag padding. */
  --space-2: 8px; /* Inside rows and controls. */
  --space-3: 16px; /* Between related items; cell padding. */
  --space-4: 32px; /* Between blocks. */
  --radius: 12px; /* Buttons, fields, panels, hover rows, floating panels. */
  --radius-pill: 999px; /* Tags, check pills, chips, slider tracks. */
  --margin: 120px; /* Unused by the app since Section labels moved above the content; kept because custom blocks may use it. */
  --gutter: 24px; /* Space above and below a Section's content. */
  --measure: 68ch; /* Longest line of prose. */
  --measure-short: 48ch; /* Longest line of a statement. */
  --dash-1: none; /* Run 1: solid. */
  --dash-2: 6 3; /* Run 2: dashed. */
  --dash-3: 1.5 3; /* Run 3: dotted. */
  --dash-4: 8 3 1.5 3; /* Run 4: dash-dot. */
  --dash-5: 3 3; /* Run 5: short dashes. */
  --dash-6: 12 4; /* Run 6: long dashes. */
  --stroke-data: 1.6px; /* Curve width in charts. */
  --stroke-rule: 1px; /* Hairlines and the edges of controls. */
  --stroke-icon: 1.5px; /* Icon stroke, with square caps and mitred joins. */
  --font-serif: XCharter, Charter, "Bitstream Charter", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --text-statement: italic 400 23px/1.4 var(--font-serif); /* A proposal statement, the largest serif on the page: italic means proposed. */
  --text-prose: 400 15.5px/1.6 var(--font-serif); /* What people and agents write: note titles and bodies, memory, rationale, findings, text blocks. */
  --text-caption: italic 400 14px/1.45 var(--font-serif); /* A caption written for a table or figure; its number ("Fig. 1.") is interface, in the sans. */
  --text-heading: 600 17px/1.4 var(--font-sans); /* Titles of blocks, dialogs and panels; group and run names as titles. */
  --text-body: 400 15px/1.5 var(--font-sans); /* Everything else: controls, tables, facts. */
  --text-small: 400 12.5px/1.5 var(--font-sans); /* Labels, table headers, status words, crumbs, meta. */
  --text-number: 700 24px/1.25 var(--font-sans); /* Stat values. Tabular figures. */
  --text-title: 600 35px/1.25 var(--font-sans);
  --text-code: 400 13px/1.5 var(--font-mono); /* Section labels, ids, code, logs, keys. */
}
.statement {
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
  font-style: italic;
}
.prose {
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
}
.caption {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0;
  font-style: italic;
}
.heading {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}
.small {
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}
.number {
  font-family: var(--font-sans);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.09em;
}
.title {
  font-family: var(--font-sans);
  font-size: 35px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}
@font-face {
  font-family: "XCharter";
  src: url("fonts/XCharter-Roman.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "XCharter";
  src: url("fonts/XCharter-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "XCharter";
  src: url("fonts/XCharter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* The documentation site in Beamtime's look: the app's top bar, sidebar and palette, the theme's tokens,
   serif headings and quiet chrome. The theme's variables come first (docs.mjs writes them). */

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-padding-block-start: 72px; }
body {
  margin: 0; font: var(--text-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
kbd {
  padding: 0 5px; border: 1px solid var(--line); border-block-end-width: 2px; border-radius: 5px;
  font: var(--text-small); color: var(--muted); background: var(--paper);
}
.icon { flex: none; }

/* layout: the app's grid, a top bar over the sidebar and the page */
.docs {
  display: grid; min-block-size: 100vh;
  grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr);
  grid-template-areas: "top top" "side main";
}
.topbar {
  grid-area: top; position: sticky; inset-block-start: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px; padding-inline: 14px;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
}
.project {
  font: var(--text-heading); color: var(--ink);
  &:hover { text-decoration: none; }
}
.search {
  flex: 0 1 460px; margin-inline: auto; display: flex; align-items: center; gap: 8px; block-size: 32px; padding-inline: 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper);
  color: var(--muted); font: var(--text-small); transition: border-color 120ms;
  & kbd { margin-inline-start: auto; }
  &:hover { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
}
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; inline-size: 30px; block-size: 30px;
  border-radius: var(--radius); color: var(--muted); transition: background 120ms, color 120ms;
  &:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
}
.mode .icon { display: none; }
.mode[data-mode="system"] .icon:nth-child(1), .mode[data-mode="light"] .icon:nth-child(2), .mode[data-mode="dark"] .icon:nth-child(3) { display: block; }
.github {
  display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: var(--radius);
  color: var(--muted); font: var(--text-small);
  &:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); text-decoration: none; }
}
.menu { display: none; }

/* sidebar: the app's tree rows */
.sidebar {
  grid-area: side; position: sticky; inset-block-start: 48px; block-size: calc(100vh - 48px); overflow-y: auto;
  padding: 14px 10px 28px; background: var(--surface); color: var(--ink);
  border-inline-end: 1px solid var(--line); font: var(--text-small);
  & h2 {
    margin: 18px 10px 6px; color: var(--muted); font: var(--text-small); font-weight: 600;
    letter-spacing: 0.07em; text-transform: uppercase;
  }
  & h2:first-child { margin-block-start: 4px; }
  & ul { list-style: none; margin: 0; padding: 0; }
  & a {
    display: flex; align-items: center; gap: 9px; block-size: 31px; padding-inline: 10px; border-radius: var(--radius);
    color: var(--muted); white-space: nowrap; transition: background 120ms, color 120ms;
    & span { overflow: hidden; text-overflow: ellipsis; }
  }
  & a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); text-decoration: none; }
  & a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--accent) 13%, transparent); font-weight: 600; }
  & a[aria-current="page"] .icon { color: var(--accent); }
}

/* the page and its contents column */
.docs-main { grid-area: main; display: flex; gap: 48px; padding: 44px 56px 80px; min-inline-size: 0; }
.docs-page { flex: 1 1 auto; min-inline-size: 0; max-inline-size: 780px; }
.docs-page h1 {
  margin: 0 0 18px; font: var(--text-title);
  line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance;
}
.docs-page h1 + p { font: var(--text-prose); color: var(--muted); }
.docs-page h2 {
  margin: 2.1em 0 0.5em; font: var(--text-statement); font-style: normal; font-weight: 700;
  line-height: 1.25; text-wrap: balance;
}
.docs-page h3 { margin: 1.8em 0 0.4em; font: var(--text-body); font-weight: 600; }
.docs-page :is(h2, h3) a.anchor { margin-inline-start: 6px; color: var(--muted); opacity: 0; transition: opacity 120ms; }
.docs-page :is(h2, h3):hover a.anchor { opacity: 1; text-decoration: none; }
.docs-page p, .docs-page ul, .docs-page ol { margin: 0.6em 0; text-wrap: pretty; }
.docs-page li { margin: 0.25em 0; }
.docs-page li::marker { color: var(--muted); }
.docs-page em { font-family: var(--font-serif); }
.docs-page a.external::after { content: "↗"; margin-inline-start: 2px; font-size: 0.8em; color: var(--muted); }
.docs-page code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--surface);
  padding: 1px 5px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.docs-page pre {
  margin: 1em 0; padding: 13px 16px; overflow-x: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.5;
}
.docs-page pre code { background: none; padding: 0; border: none; font: var(--text-code); }
.docs-page table { display: block; max-inline-size: 100%; overflow-x: auto; border-collapse: collapse; margin: 1em 0; font: var(--text-small); }
.docs-page th, .docs-page td { padding: 7px 16px 7px 0; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.docs-page th { color: var(--muted); font-weight: 600; }
.docs-page blockquote {
  margin: 1.2em 0; padding: 10px 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  & p { margin: 0.3em 0; }
}
.figure {
  display: block; margin: 1.6em 0; border: 1px solid var(--line); border-radius: calc(var(--radius) + 3px); overflow: hidden;
  & a { display: block; }
  & img { display: block; inline-size: 100%; block-size: auto; }
}
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.toc {
  flex: 0 0 200px; position: sticky; inset-block-start: 92px; align-self: flex-start;
  max-block-size: calc(100vh - 120px); overflow-y: auto; font: var(--text-small);
  & h2 { margin: 0 0 8px; color: var(--muted); font: var(--text-small); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
  & ul { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--line); }
  & a { display: block; padding: 3px 0 3px 12px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--muted); line-height: 1.4; }
  & a:hover { color: var(--ink); text-decoration: none; }
  & a.current { color: var(--ink); border-inline-start-color: var(--accent); }
}

.docs-pager {
  display: flex; justify-content: space-between; gap: 16px; margin-block-start: 64px;
  & a {
    flex: 0 1 48%; display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink); font-family: var(--font-serif); font-weight: 700; transition: border-color 120ms, background 120ms;
  }
  & a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 4%, transparent); }
  & span { display: block; color: var(--muted); font: var(--text-small); }
  & .next { margin-inline-start: auto; text-align: end; }
}

/* the search palette, as the app's ⌘K */
dialog.sheet {
  inline-size: min(680px, 94vw); max-block-size: 72vh; margin-block-start: 12vh; padding: 0;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px);
  background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 18%, transparent);
  &[open] { display: flex; flex-direction: column; }
  &::backdrop { background: color-mix(in srgb, var(--paper) 55%, transparent); }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: rise 140ms ease-out; }
  @keyframes rise { from { translate: 0 6px; opacity: 0.6; } }
}
.palette-input {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; border-block-end: 1px solid var(--line); color: var(--muted);
  & input {
    flex: 1; block-size: 52px; border: none; background: none; outline: none; color: var(--ink);
    font: var(--text-heading); font-weight: 400; -webkit-appearance: none; appearance: none;
  }
  & input::-webkit-search-cancel-button { display: none; }
}
.palette-list {
  list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1 1 auto;
  & .section { padding: 10px 10px 4px; font: var(--text-small); color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
  & li.item { display: block; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
  & li.item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 13%, transparent); }
  & .label { display: block; font-weight: 600; }
  & .label .where { color: var(--muted); font-weight: 400; }
  & .snippet { display: block; margin-block-start: 2px; color: var(--muted); font: var(--text-small); line-height: 1.45;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  & mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
  & .empty { padding: 24px 10px; color: var(--muted); text-align: center; font-family: var(--font-serif); font-style: italic; }
}
.palette-foot {
  display: flex; gap: 16px; padding: 8px 16px; border-block-start: 1px solid var(--line);
  color: var(--muted); font: var(--text-small);
  & span { display: inline-flex; align-items: center; gap: 4px; }
}

@media (width < 1240px) { .toc { display: none; } }
@media (width < 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .menu { display: inline-flex; }
  .sidebar {
    position: fixed; inset-block: 48px 0; inset-inline-start: 0; inline-size: min(300px, 85vw); block-size: auto; z-index: 20;
    translate: -100% 0; visibility: hidden; transition: translate 160ms ease-out, visibility 0s 160ms;
  }
  .docs.nav-open .sidebar {
    translate: 0 0; visibility: visible; transition: translate 160ms ease-out;
    box-shadow: 0 12px 40px color-mix(in srgb, var(--ink) 15%, transparent);
  }
  .search .search-label, .search kbd { display: none; }
  .search { flex: 0 1 auto; margin-inline: auto 0; inline-size: 32px; padding: 0; justify-content: center; }
  .docs-main { padding: 28px 16px 56px; }
  .docs-page h1 { font: var(--text-statement); font-style: normal; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
