{"edition":"visual-guide-5","files":{"LICENSE":"MIT License\n\nCopyright (c) 2026 Evolutive X\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","NOTICE.md":"# Reuse and third-party notices\n\n13 November 2026\n\nThe owner has authorised MIT reuse of the Evolutive X framework's reusable code. [LICENSE](LICENSE) applies to authored component CSS and JavaScript, token files, code examples, authored interface SVG icons, setup/build/check tools and their associated API documentation included in a public code package. Keep its copyright and permission notice with copies or substantial portions.\n\nThe Evolutive X name, logo, wordmark and other studio identity artwork are reserved. The code licence does not grant permission to use these as another product's branding, claim affiliation or imply endorsement. A consuming product should use its own identity. Editorial essays, design rationale and brand artwork are not added to the code licence merely because they appear beside a code example.\n\nInter is third-party software under the SIL Open Font License. Retain its own copyright and licence. The new public resource uses unmodified subsets retrieved from the official Google Fonts distribution, with source URLs, retrieval date and SHA-256 hashes retained in its asset provenance. Those files differ from the older internal reference files; no previous source archive is rewritten. A public source package must either include verified fonts and their notices or explicitly omit fonts and explain how to obtain them.\n\nThe retained upstream Heroicons chevron under `core/icons/` remains subject to its own MIT notice in `core/icons/LICENSE.txt`. Active Evolutive X interface icons under `core/icons/ex/` are authored library assets. Neither set is the Evolutive X logo.\n\nOnly an explicitly prepared public package is intended for external distribution. Internal QA records, private project evidence, local workspace paths and credentials do not become public because the reusable code is MIT licensed. Derived public editions identify their source version and exclusions; original internal archives remain unchanged.\n\nThe standard licence text is the [MIT License published by the Open Source Initiative](https://opensource.org/license/mit). This notice records the chosen distribution scope; it is not a claim of trademark clearance or whole-product compliance.\n","README.md":"# Evolutive X visual guide visual-guide-5\n\nExtract this MIT supplement into visual-guide-5/ beside the generated project’s vendor/ folder. Keep the licences with the materials. The supplement module imports ../vendor/evolutive-x/core/. A different deployment layout requires adjusting that module prefix. Use your project’s own logo.\n\nLoad the runtime tokens, components and fonts before the product styles. For each recipe, load its kit_styles paths from vendor/evolutive-x/, then the styles and module named in framework.json. Use the chart or grid files and dependencies in its manifest entry. Keep exact data alongside charts. Connect grid saves to your own service. Workflow recipes use their own listed stylesheet and module. Older atlas examples use component-atlas.css and component-atlas.js. Place the recipe HTML at the chosen entry point. Adapt sample data, IDs and actions to your real flow. Use a real HTTP 404 and real recovery links.\n\nThe stable kit includes the studio synthwave colours. With the review kit load studio-theme.css after its stylesheets. Its appearance.js exports bindAppearanceButton. For a product colourway load product-accents.css, and set data-ex-accent=\"coast\" or \"orchard\" on the same element as data-ex-theme. Studio is the default. Use prose.css and ex-prose for reading rhythm. guide-icons.svg contains the guide navigation symbols. Use the pinned core/icons/ex icons for controls.\n","appearance.css":"/* Reserve the full button target before its preference is read. */\n.ex-button.ex-icon-button {\n  flex: none;\n  inline-size: var(--ex-control-height-compact, 2.75rem);\n  min-block-size: var(--ex-control-height-compact, 2.75rem);\n  padding: 0;\n  border-radius: var(--ex-radius-button, 999px);\n}\n.ex-appearance-system {\n  box-sizing: border-box;\n  inline-size: 1.125rem;\n  block-size: 1.125rem;\n  border: 2px solid currentColor;\n  border-inline-start-width: .5625rem;\n  border-radius: 50%;\n}\n","appearance.js":"// Pair with the core button styles. The button keeps focus while the theme changes.\nexport function bindAppearanceButton(button, {storageKey} = {}) {\n  const root = button.ownerDocument.documentElement;\n  const view = button.ownerDocument.defaultView;\n  const preference = view.matchMedia('(prefers-color-scheme: dark)');\n  const modes = ['system', 'light', 'dark'];\n  let current = root.dataset.exTheme;\n  try {\n    const saved = view.localStorage.getItem(storageKey);\n    if (modes.includes(saved)) current = saved;\n  } catch { /* Local storage is optional. */ }\n  if (!modes.includes(current)) current = 'system';\n\n  const icon = button.ownerDocument.createElement('span');\n  icon.setAttribute('aria-hidden', 'true');\n  button.replaceChildren(icon);\n\n  function nextMode() {\n    const device = preference.matches ? 'dark' : 'light';\n    const opposite = preference.matches ? 'light' : 'dark';\n    if (current === 'system') return opposite;\n    return current === opposite ? device : 'system';\n  }\n\n  function render() {\n    root.dataset.exTheme = current;\n    const name = `Appearance: ${current}. Use ${nextMode()} appearance.`;\n    button.setAttribute('aria-label', name);\n    button.title = name;\n    icon.className = {system: 'ex-appearance-system', light: 'ex-icon ex-icon--sun', dark: 'ex-icon ex-icon--moon'}[current];\n  }\n\n  function changeAppearance() {\n    current = nextMode();\n    render();\n    try { view.localStorage.setItem(storageKey, current); } catch { /* Use it for this page. */ }\n  }\n\n  function sync(event) {\n    if (event.key !== storageKey && event.key !== null) return;\n    current = modes.includes(event.newValue) ? event.newValue : 'system';\n    render();\n  }\n\n  render();\n  button.disabled = false;\n  button.addEventListener('click', changeAppearance);\n  preference.addEventListener('change', render);\n  view.addEventListener('storage', sync);\n  return () => {\n    button.removeEventListener('click', changeAppearance);\n    preference.removeEventListener('change', render);\n    view.removeEventListener('storage', sync);\n  };\n}\n","bulk-actions.css":"/* MIT. Load after the Evolutive X core tokens and components. */\n.ex-bulk {\n  min-inline-size: 0;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  background: var(--ex-surface);\n  color: var(--ex-text);\n  font: var(--ex-body-size)/var(--ex-body-leading) var(--ex-font-sans);\n}\n.ex-bulk legend {\n  padding: 0;\n  margin-block-end: var(--ex-space-4);\n  font-size: var(--ex-h3-size);\n  font-weight: var(--ex-h3-weight);\n}\n.ex-bulk .ex-bulk-list { list-style: none; margin: 0; padding: 0; }\n.ex-bulk-list > li, .ex-bulk-tools {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  column-gap: var(--ex-space-3);\n  padding: var(--ex-space-1) var(--ex-space-2);\n  border-block-end: 1px solid var(--ex-border);\n}\n.ex-bulk-list > li[data-bulk-selected] { background-color: var(--ex-selected-bg); }\n.ex-bulk-list > li span, .ex-bulk-status {\n  color: var(--ex-text-secondary);\n  font-size: var(--ex-compact-size);\n  overflow-wrap: anywhere;\n}\n.ex-bulk label {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--ex-space-3);\n  min-block-size: var(--ex-control-height-compact);\n  max-inline-size: 100%;\n  font-weight: var(--ex-weight-medium);\n  overflow-wrap: anywhere;\n}\n.ex-bulk label:has(input) { cursor: pointer; }\n.ex-bulk input[type=\"checkbox\"] {\n  appearance: auto;\n  flex: none;\n  margin: 0;\n  inline-size: 1.125rem;\n  block-size: 1.125rem;\n  accent-color: var(--ex-link);\n}\n.ex-bulk input:focus-visible { outline: var(--ex-focus-width) solid var(--ex-focus); outline-offset: var(--ex-focus-offset); }\n.ex-bulk-tools { background: var(--ex-surface-raised); border-radius: var(--ex-radius-small) var(--ex-radius-small) 0 0; }\n.ex-bulk-count { font-size: var(--ex-compact-size); font-variant-numeric: tabular-nums; }\n.ex-bulk-actions { display: flex; flex-wrap: wrap; gap: var(--ex-space-2); margin-block-start: var(--ex-space-4); }\n.ex-bulk p { margin: var(--ex-space-3) 0 0; }\n.ex-bulk .ex-bulk-status:empty { margin: 0; }\n.ex-bulk [hidden] { display: none; }\n","bulk-actions.mjs":"// MIT. One instance represents the rows shown together on one page.\nconst instances = new WeakMap();\n\n/**\n * Enhance a fieldset containing a list of rows with unique data-row-id values.\n * Provide onCommit({action, ids, signal}) to persist an entire 'archive' or\n * 'restore' batch. Resolve after it succeeds, or reject to leave the UI intact.\n * Without a callback, changes last until reload. Destroy before replacing rows.\n */\nexport function enhanceBulkActions(root, options = {}) {\n  if (!root) return null;\n  const existing = instances.get(root);\n  if (existing) {\n    if (Object.hasOwn(options, 'onCommit')) existing.configure(options.onCommit);\n    return existing.api;\n  }\n  const list = root.querySelector(':scope > .ex-bulk-list');\n  if (!list || !root.querySelector(':scope > legend')) return null;\n  const rows = Array.from(list.children, node => ({\n    node, id: node.dataset.rowId, label: node.querySelector('label[data-bulk-name]'),\n    initiallyHidden: node.hidden\n  }));\n  if (rows.some(row => !row.id?.trim() || !row.label?.textContent.trim()) ||\n      new Set(rows.map(row => row.id)).size !== rows.length) return null;\n\n  const doc = root.ownerDocument;\n  const make = (tag, className, text) => {\n    const node = doc.createElement(tag);\n    if (className) node.className = className;\n    if (text) node.textContent = text;\n    return node;\n  };\n  const checkbox = () => {\n    const input = make('input');\n    input.type = 'checkbox';\n    return input;\n  };\n  const tools = make('div', 'ex-bulk-tools');\n  const allLabel = make('label', '', 'Select all shown');\n  const all = checkbox();\n  allLabel.prepend(all);\n  const count = make('span', 'ex-bulk-count');\n  tools.append(allLabel, count);\n  list.before(tools);\n  const empty = make('p', '', 'No items to select.');\n  const actions = make('div', 'ex-bulk-actions');\n  const archive = make('button', 'ex-button ex-button--secondary', 'Archive selected');\n  const undo = make('button', 'ex-button ex-button--quiet', 'Undo last archive');\n  archive.type = undo.type = 'button';\n  const status = make('p', 'ex-bulk-status');\n  status.setAttribute('role', 'status');\n  actions.append(archive, undo);\n  list.after(empty, actions, status);\n  for (const row of rows) {\n    row.input = checkbox();\n    row.label.prepend(row.input);\n  }\n\n  const history = [];\n  const listeners = new AbortController();\n  let pending = null;\n  let commit = options.onCommit;\n  const visibleRows = () => rows.filter(row => !row.node.hidden);\n  const selectedRows = () => visibleRows().filter(row => row.input.checked);\n  function update() {\n    const shown = visibleRows();\n    const selected = shown.filter(row => row.input.checked).length;\n    all.checked = shown.length > 0 && selected === shown.length;\n    all.indeterminate = selected > 0 && selected < shown.length;\n    all.disabled = pending !== null || shown.length === 0;\n    for (const row of rows) {\n      row.input.disabled = pending !== null;\n      row.node.toggleAttribute('data-bulk-selected', row.input.checked && !row.node.hidden);\n    }\n    count.textContent = selected + ' of ' + shown.length + ' selected';\n    empty.hidden = shown.length > 0;\n    undo.hidden = history.length === 0;\n    archive.setAttribute('aria-disabled', String(pending !== null || selected === 0));\n    undo.setAttribute('aria-disabled', String(pending !== null));\n  }\n  function onSelection(event) {\n    if (pending) return;\n    if (event.target === all) {\n      for (const row of visibleRows()) row.input.checked = all.checked;\n    } else if (!rows.some(row => row.input === event.target)) return;\n    update();\n    status.textContent = count.textContent + '.';\n  }\n  async function change(action) {\n    if (pending) return;\n    const restoring = action === 'restore';\n    const batch = restoring ? history.at(-1) : selectedRows();\n    if (!batch?.length) return;\n    const trigger = restoring ? undo : archive;\n    const controller = new AbortController();\n    pending = controller;\n    update();\n    status.textContent = restoring ? 'Restoring…' : 'Archiving…';\n    try {\n      await commit?.({action, ids: batch.map(row => row.id), signal: controller.signal});\n      if (controller.signal.aborted) return;\n      if (restoring) history.pop();\n      else history.push(batch);\n      const returnFocus = doc.activeElement === trigger;\n      for (const row of batch) {\n        row.node.hidden = !restoring;\n        row.input.checked = false;\n      }\n      pending = null;\n      update();\n      const quantity = batch.length + (batch.length === 1 ? ' item' : ' items');\n      status.textContent = quantity + (restoring ? ' restored.' : ' archived.');\n      if (returnFocus) (restoring ? batch[0].input : undo).focus();\n    } catch {\n      if (controller.signal.aborted) return;\n      pending = null;\n      update();\n      status.textContent = restoring ? 'Couldn’t restore the items. Try again.' : 'Couldn’t archive the items. Try again.';\n    }\n  }\n  root.addEventListener('change', onSelection, {signal: listeners.signal});\n  archive.addEventListener('click', () => change('archive'), {signal: listeners.signal});\n  undo.addEventListener('click', () => change('restore'), {signal: listeners.signal});\n  const api = {\n    destroy() {\n      if (listeners.signal.aborted) return;\n      listeners.abort();\n      pending?.abort();\n      for (const row of rows) {\n        row.input.remove();\n        row.node.removeAttribute('data-bulk-selected');\n        row.node.hidden = row.initiallyHidden;\n      }\n      for (const node of [tools, empty, actions, status]) node.remove();\n      instances.delete(root);\n    }\n  };\n  instances.set(root, {api, configure(callback) { commit = callback; }});\n  update();\n  return api;\n}\n\nif (typeof document !== 'undefined') {\n  document.querySelectorAll('[data-ex-bulk]').forEach(root => enhanceBulkActions(root));\n}\n","charts.css":"/* MIT. Load after the Evolutive X core tokens and type styles. */\n.ex-chart {\n  margin: 0;\n  max-inline-size: 38rem;\n  min-inline-size: 0;\n  font-family: var(--ex-font-sans);\n  color: var(--ex-text);\n  overflow-wrap: anywhere;\n}\n.ex-chart figcaption {\n  display: block;\n  font-size: var(--ex-h3-size);\n  font-weight: var(--ex-h3-weight);\n  line-height: var(--ex-h3-leading);\n}\n.ex-chart-view { display: grid; gap: var(--ex-space-4); margin-block: var(--ex-space-4); }\n.ex-chart .ex-chart-summary { margin: 0; color: var(--ex-text-secondary); line-height: var(--ex-leading-body); }\n.ex-chart-measures {\n  display: flex;\n  flex-wrap: wrap;\n  gap: var(--ex-space-1) var(--ex-space-4);\n  border: 0;\n  margin: 0;\n  padding: 0;\n  min-inline-size: 0;\n}\n.ex-chart-measures legend {\n  font-weight: var(--ex-weight-semibold);\n  font-size: var(--ex-label-size);\n  margin: 0;\n  padding: 0;\n}\n.ex-chart-choice {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--ex-space-2);\n  min-block-size: var(--ex-control-height-compact);\n  font: inherit;\n  cursor: pointer;\n}\n.ex-chart-choice input { inline-size: 1.15rem; block-size: 1.15rem; margin: 0; accent-color: var(--ex-link); }\n.ex-chart :is(input, summary):focus-visible {\n  outline: var(--ex-focus-width) solid var(--ex-focus);\n  outline-offset: var(--ex-focus-offset);\n}\n.ex-chart-display { min-inline-size: 0; }\n.ex-chart-display:empty { display: none; }\n.ex-chart-bars { display: grid; gap: var(--ex-space-3); }\n.ex-chart-bar {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) auto;\n  align-items: baseline;\n  gap: var(--ex-space-1) var(--ex-space-2);\n}\n.ex-chart-category, .ex-chart-value, .ex-chart-y-axis, .ex-chart-x-axis { font-size: var(--ex-compact-size); }\n.ex-chart-value, .ex-chart-y-axis { font-variant-numeric: tabular-nums; }\n.ex-chart-value { justify-self: end; max-inline-size: 10ch; }\n.ex-chart-bar svg { grid-column: 1/-1; inline-size: 100%; block-size: 0.875rem; overflow: visible; }\n.ex-chart-ink { fill: var(--ex-link); }\n.ex-chart-bar-group { display: grid; gap: var(--ex-space-1); }\n.ex-chart-group-label { font-size: var(--ex-label-size); font-weight: var(--ex-weight-semibold); }\n.ex-chart[data-ex-chart=\"grouped-bar\"] .ex-chart-bar {\n  grid-template-columns: minmax(3ch, 0.85fr) minmax(0, 3fr) minmax(3ch, 0.75fr);\n  align-items: center;\n}\n.ex-chart[data-ex-chart=\"grouped-bar\"] .ex-chart-category { grid-column: 1; grid-row: 1; }\n.ex-chart[data-ex-chart=\"grouped-bar\"] .ex-chart-bar svg { grid-column: 2; grid-row: 1; }\n.ex-chart[data-ex-chart=\"grouped-bar\"] .ex-chart-value { grid-column: 3; grid-row: 1; }\n.ex-chart-swatch { display: block; inline-size: 1.75rem; block-size: .85rem; flex-shrink: 0; }\n.ex-chart [data-ex-series=\"0\"] { --ex-series-ink: var(--ex-chart-series-1, var(--ex-link)); }\n.ex-chart [data-ex-series=\"1\"] { --ex-series-ink: var(--ex-chart-series-2, var(--ex-success)); --ex-series-dash: 7 4; }\n.ex-chart [data-ex-series=\"2\"] { --ex-series-ink: var(--ex-chart-series-3, var(--ex-warning)); --ex-series-dash: 2 4; }\n.ex-chart [data-ex-series=\"3\"] { --ex-series-ink: var(--ex-chart-series-4, var(--ex-text-secondary)); --ex-series-dash: 8 3 2 3; }\n.ex-chart [data-ex-series] .ex-chart-ink { fill: var(--ex-series-ink); }\n.ex-chart [data-ex-series] .ex-chart-path { stroke: var(--ex-series-ink); stroke-dasharray: var(--ex-series-dash, none); }\n.ex-chart [data-ex-series] .ex-chart-point { stroke: var(--ex-series-ink); }\n.ex-chart-series-number { fill: var(--ex-series-ink); font: bold 5px var(--ex-font-sans); }\n.ex-chart-baseline, .ex-chart-grid { stroke: var(--ex-control-border); vector-effect: non-scaling-stroke; }\n.ex-chart-grid { stroke-dasharray: 2 4; }\n.ex-chart-path { fill: none; stroke: var(--ex-link); stroke-width: 2.5; vector-effect: non-scaling-stroke; }\n.ex-chart-point { fill: var(--ex-surface); stroke: var(--ex-link); stroke-width: 2; vector-effect: non-scaling-stroke; }\n.ex-chart-trend {\n  display: grid;\n  grid-template-columns: fit-content(6ch) minmax(0, 1fr);\n  align-items: stretch;\n  gap: var(--ex-space-1) var(--ex-space-2);\n  direction: ltr; /* Observations run from the first table row to the last. */\n}\n.ex-chart-trend svg { display: block; width: 100%; height: auto; }\n.ex-chart-y-axis, .ex-chart-x-axis { display: flex; justify-content: space-between; color: var(--ex-text-secondary); }\n.ex-chart-y-axis { flex-direction: column; align-items: flex-end; }\n.ex-chart-x-axis { grid-column: 2; gap: var(--ex-space-2); }\n.ex-chart-x-axis > :last-child { text-align: end; }\n.ex-chart-x-axis.ex-chart-single { justify-content: center; }\n.ex-chart details { margin-block-start: var(--ex-space-4); }\n.ex-chart details summary {\n  display: list-item;\n  min-block-size: var(--ex-control-height-compact);\n  box-sizing: border-box;\n  width: fit-content;\n  padding-block: var(--ex-space-2);\n  color: var(--ex-link);\n  font-weight: var(--ex-weight-semibold);\n  cursor: pointer;\n}\n.ex-chart table { border-collapse: collapse; inline-size: 100%; table-layout: fixed; font-variant-numeric: tabular-nums; }\n.ex-chart caption { text-align: start; font-weight: var(--ex-weight-semibold); margin-block: var(--ex-space-2); }\n.ex-chart :is(th, td) {\n  text-align: end;\n  vertical-align: top;\n  padding: var(--ex-space-2);\n  border-block-end: 1px solid var(--ex-border);\n}\n.ex-chart tr > :first-child { text-align: start; }\n@media (forced-colors: active) {\n  .ex-chart [data-ex-series] { --ex-series-ink: CanvasText; }\n  .ex-chart-ink { fill: CanvasText; }\n  .ex-chart-path, .ex-chart-point { stroke: CanvasText; }\n  .ex-chart-point { fill: Canvas; }\n  .ex-chart-baseline, .ex-chart-grid { stroke: GrayText; }\n}\n","charts.mjs":"// MIT. Enhance an ordinary table while retaining access to every original value.\nconst svgNS = 'http://www.w3.org/2000/svg';\nconst charts = new WeakMap();\nlet nextGroup = 0;\n\nexport function element(doc, tag, className, text) {\n  const node = doc.createElement(tag);\n  node.className = className;\n  if (text !== undefined) node.textContent = text;\n  return node;\n}\n\nexport function graphic(doc, tag, attributes) {\n  const node = doc.createElementNS(svgNS, tag);\n  for (const [name, value] of Object.entries(attributes)) node.setAttribute(name, String(value));\n  return node;\n}\n\nexport function chartNumber(value) {\n  const input = value.trim();\n  if (!/^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?$/i.test(input)) return null;\n  const parsed = Number(input);\n  return Number.isFinite(parsed) ? parsed : null;\n}\n\nexport function readTable(table) {\n  const headings = Array.from(table.tHead?.rows[0]?.cells ?? []);\n  if (headings.length < 2 || !table.tBodies.length) return null;\n  const measures = headings.slice(1).map(cell => ({\n    name: cell.textContent.trim(), summary: cell.getAttribute('data-ex-summary') || ''\n  }));\n  if (measures.some(measure => !measure.name)) return null;\n  const rows = [];\n  for (const body of table.tBodies) {\n    for (const row of body.rows) {\n      if (row.cells.length !== headings.length || !row.cells[0].textContent.trim()) return null;\n      const cells = [];\n      for (const cell of Array.from(row.cells).slice(1)) {\n        const text = cell.textContent.trim();\n        const missing = cell.hasAttribute('data-ex-missing');\n        const data = cell.querySelector('data[value]');\n        const value = missing ? null : chartNumber(data ? data.getAttribute('value') : text);\n        if (!missing && value === null) return null;\n        cells.push({ text, value });\n      }\n      rows.push({ label: row.cells[0].textContent.trim(), cells });\n    }\n  }\n  return { measures, rows };\n}\n\n// All measures share a scale including zero. Normalise first so opposite large\n// finite values cannot overflow when calculating the width of the range.\nexport function chartScale(values) {\n  let min = 0, max = 0;\n  for (const value of values) {\n    if (value === null) continue;\n    min = Math.min(min, value);\n    max = Math.max(max, value);\n  }\n  if (min === max) max = 1;\n  const magnitude = Math.max(-min, max);\n  const origin = min / magnitude;\n  const range = max / magnitude - origin;\n  return { min, max, position: value => (value / magnitude - origin) / range };\n}\n\nfunction barPlot(doc, model, columns, scale, grouped) {\n  const plot = element(doc, 'div', 'ex-chart-bars');\n  const zero = scale.position(0) * 100;\n  for (const row of model.rows) {\n    const group = element(doc, 'div', 'ex-chart-bar-group');\n    if (grouped) group.append(element(doc, 'span', 'ex-chart-group-label', row.label));\n    for (const column of columns) {\n      const item = element(doc, 'div', 'ex-chart-bar');\n      const { text, value } = row.cells[column];\n      const label = grouped ? model.measures[column].name : row.label;\n      item.append(element(doc, 'span', 'ex-chart-category', label),\n                element(doc, 'span', 'ex-chart-value', text));\n      const svg = graphic(doc, 'svg', {viewBox:'0 0 100 10', preserveAspectRatio:'none', focusable:'false'});\n      if (grouped) svg.setAttribute('data-ex-series', String(column % 4));\n      if (value !== null) {\n        const end = scale.position(value) * 100;\n        svg.append(graphic(doc, 'rect', {class:'ex-chart-ink', x:Math.min(zero, end),\n          y:1, width:Math.abs(end-zero), height:8}));\n      }\n      svg.append(graphic(doc, 'line', {class:'ex-chart-baseline', x1:zero, x2:zero, y1:0, y2:10}));\n      item.append(svg);\n      group.append(item);\n    }\n    plot.append(group);\n  }\n  return plot;\n}\n\n// One item per equally spaced observation. Keep an isolated sample visible\n// and break the path when the table marks an observation as missing.\nexport function lineMarks(values, scale) {\n  const points = [];\n  const segments = [];\n  let run = [];\n  values.forEach((value, i) => {\n    if (value === null) {\n      if (run.length) segments.push(run);\n      run = [];\n      return;\n    }\n    const x = values.length === 1 ? 120 : 4 + 232 * i / (values.length - 1);\n    const y = 5 + 94 * (1 - scale.position(value));\n    const point = { x, y };\n    points.push(point);\n    run.push(point);\n  });\n  if (run.length) segments.push(run);\n  return { points, segments };\n}\n\nfunction pointMark(doc, index, x, y) {\n  const className = 'ex-chart-point';\n  if (index >= 4) {\n    const mark = graphic(doc, 'g', {});\n    const numeral = graphic(doc, 'text', {class:'ex-chart-series-number',x,y:y+1.8,'text-anchor':'middle'});\n    numeral.textContent = String(index + 1);\n    mark.append(graphic(doc, 'circle', {class:className,cx:x,cy:y,r:4}),numeral);\n    return mark;\n  }\n  if (index % 4 === 1) return graphic(doc,'rect',{class:className,x:x-2.3,y:y-2.3,width:4.6,height:4.6});\n  if (index % 4 === 2) return graphic(doc,'polygon',{class:className,points:`${x},${y-3} ${x+3},${y+2} ${x-3},${y+2}`});\n  if (index % 4 === 3) return graphic(doc,'polygon',{class:className,points:`${x},${y-3} ${x+3},${y} ${x},${y+3} ${x-3},${y}`});\n  return graphic(doc,'circle',{class:className,cx:x,cy:y,r:2.4});\n}\n\nfunction seriesSwatch(doc, column) {\n  const svg = graphic(doc,'svg',{class:'ex-chart-swatch',viewBox:'0 0 30 12',\n    'aria-hidden':'true',focusable:'false','data-ex-series':column % 4});\n  svg.append(graphic(doc,'line',{class:'ex-chart-path',x1:0,x2:30,y1:6,y2:6}),pointMark(doc,column,15,6));\n  return svg;\n}\n\nfunction linePlot(doc, rows, columns, scale, multi) {\n  const plot = element(doc, 'div', 'ex-chart-trend');\n  const axis = element(doc, 'div', 'ex-chart-y-axis');\n  axis.append(element(doc,'span','',String(scale.max)), element(doc,'span','',String(scale.min)));\n  const svg = graphic(doc, 'svg', {viewBox:'0 0 240 104', focusable:'false'});\n  for (const y of [5, 99]) {\n    svg.append(graphic(doc, 'line', {class:'ex-chart-grid', x1:4, x2:236, y1:y, y2:y}));\n  }\n  if (scale.min < 0 && scale.max > 0) {\n    const y = 5 + 94 * (1 - scale.position(0));\n    svg.append(graphic(doc, 'line', {class:'ex-chart-baseline', x1:4, x2:236, y1:y, y2:y}));\n  }\n  for (const column of columns) {\n    const style = multi ? column : 0;\n    const series = graphic(doc, 'g', multi ? {'data-ex-series':style % 4} : {});\n    const { points, segments } = lineMarks(rows.map(row => row.cells[column].value), scale);\n    for (const run of segments) {\n      if (run.length > 1) series.append(graphic(doc, 'polyline', {class:'ex-chart-path',\n        points:run.map(point => point.x + ',' + point.y).join(' ')}));\n    }\n    for (const point of points) series.append(pointMark(doc,style,point.x,point.y));\n    svg.append(series);\n  }\n  const labels = element(doc, 'div', 'ex-chart-x-axis');\n  labels.append(element(doc,'span','',rows[0].label));\n  if (rows.length > 1) labels.append(element(doc,'span','',rows[rows.length - 1].label));\n  else labels.classList.add('ex-chart-single');\n  plot.append(axis, svg, labels);\n  return plot;\n}\n\n/** Refresh after changing the table. Preserve the table's expanded state,\n * keyboard focus and series choices. Invalid data stays readable as a table. */\nexport function enhanceChart(figure) {\n  const old = charts.get(figure);\n  const active = figure.ownerDocument.activeElement;\n  const focusedSeries = old?.controls.contains(active) ? active.value : undefined;\n  if (old) old.mount.remove();\n  charts.delete(figure);\n  const details = figure.querySelector('details');\n  const table = details?.querySelector('table');\n  if (!table) return;\n  const model = readTable(table);\n  const doc = figure.ownerDocument;\n  const kind = figure.getAttribute('data-ex-chart');\n  const multi = kind === 'multi-line' || kind === 'grouped-bar';\n  if (!model || (!multi && kind !== 'bar' && kind !== 'line')) { details.open = true; return; }\n  const names = model.measures.map(measure => measure.name);\n  if (multi && new Set(names).size !== names.length) { details.open = true; return; }\n\n  const mount = element(doc,'div','ex-chart-view');\n  const controls = element(doc,'fieldset','ex-chart-measures');\n  const summary = element(doc,'p','ex-chart-summary');\n  summary.setAttribute('role','status');\n  const display = element(doc,'div','ex-chart-display');\n  display.setAttribute('aria-hidden','true'); // The adjacent summary and exact table remain accessible.\n  const state = { mount, controls, selected: old?.selected, hidden: old?.hidden ?? new Set() };\n  let selected = Math.max(0, names.indexOf(state.selected));\n  state.selected = names[selected];\n  const scale = chartScale(model.rows.flatMap(row => row.cells.map(cell => cell.value)));\n  function show() {\n    const columns = multi ? names.map((_, i) => i).filter(i => !state.hidden.has(names[i])) : [selected];\n    if (!columns.length) {\n      summary.textContent = 'Choose a series to show the chart.';\n      display.replaceChildren();\n      return;\n    }\n    let anyData = false;\n    summary.textContent = columns.map(column => {\n      const measure = model.measures[column];\n      if (!model.rows.some(row => row.cells[column].value !== null)) return 'No observations for ' + measure.name + '.';\n      anyData = true;\n      return measure.summary || (measure.name + ' by ' + table.tHead.rows[0].cells[0].textContent.trim() + '.');\n    }).join(' ');\n    if (anyData) {\n      const plot = kind === 'line' || kind === 'multi-line'\n        ? linePlot(doc, model.rows, columns, scale, multi)\n        : barPlot(doc, model, columns, scale, multi);\n      display.replaceChildren(plot);\n    } else display.replaceChildren();\n  }\n  if (multi || model.measures.length > 1) {\n    const group = 'ex-chart-measure-' + (++nextGroup);\n    controls.append(element(doc,'legend','',multi ? 'Show series' : 'Measure'));\n    model.measures.forEach((measure, column) => {\n      const label = element(doc,'label','ex-chart-choice');\n      const input = doc.createElement('input');\n      input.type = multi ? 'checkbox' : 'radio';\n      input.name = group;\n      input.value = measure.name;\n      input.checked = multi ? !state.hidden.has(measure.name) : column === selected;\n      input.addEventListener('change', () => {\n        if (multi) {\n          if (input.checked) state.hidden.delete(measure.name);\n          else state.hidden.add(measure.name);\n        } else {\n          state.selected = measure.name;\n          selected = column;\n        }\n        show();\n      });\n      label.append(input);\n      if (kind === 'multi-line') label.append(seriesSwatch(doc,column));\n      label.append(doc.createTextNode(measure.name));\n      controls.append(label);\n    });\n    mount.append(controls);\n  }\n  mount.append(summary, display);\n  show();\n  details.before(mount);\n  if (!old) details.open = !model.rows.length;\n  charts.set(figure, state);\n  if (focusedSeries !== undefined) {\n    const inputs = Array.from(controls.querySelectorAll('input'));\n    (inputs.find(input => input.value === focusedSeries) ?? inputs[0])?.focus();\n  }\n}\n\nif (typeof document !== 'undefined') {\n  document.querySelectorAll('figure[data-ex-chart]').forEach(enhanceChart);\n}\n","component-atlas.css":"/* MIT. Reusable examples based on the Evolutive X semantic roles. */\n.atlas-preview {\n  margin-block-start: var(--ex-space-4);\n  padding: clamp(1rem, 3vw, 2rem);\n  border: var(--ex-border-width) solid var(--ex-border);\n  border-radius: var(--ex-radius-panel);\n  background: var(--ex-surface-raised);\n}\n.atlas-stack, .atlas-dialog-copy, .atlas-card-body {\n  display: grid;\n  justify-items: start;\n  gap: var(--ex-space-4);\n  min-inline-size: 0;\n}\n.atlas-stack { max-inline-size: 41rem; }\n.atlas-stack .ex-field { width: min(100%, 30rem); }\n.atlas-stack textarea { min-block-size: 5rem; resize: vertical; }\n.atlas-stack :is(h3, p), .atlas-missing h1, .atlas-dialog-copy > p { margin: 0; }\n.atlas-stack :is(p, li, legend), .atlas-dialog-copy :is(h3,p) { overflow-wrap: anywhere; }\n.atlas-actions, .atlas-radio-options {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: var(--ex-space-3);\n}\n.atlas-stack [hidden] { display: none !important; }\n.atlas-status { font-size: var(--ex-compact-size); color: var(--ex-text-secondary); }\n.atlas-status:empty { min-height: 0; margin-block-start: calc(-1 * var(--ex-space-4)); }\n.atlas-list-row {\n  width: 100%; display: flex; align-items: center; flex-wrap: wrap;\n  justify-content: space-between; gap: var(--ex-space-4);\n}\n.atlas-item-label { font-weight: var(--ex-label-weight); }\n.atlas-signal {\n  display: inline-grid; place-items: center;\n  inline-size: 2.75rem; block-size: 2.75rem; border-radius: var(--ex-radius-panel);\n}\n.atlas-warning { color: var(--ex-warning); background: var(--ex-warning-bg); }\n.atlas-error { color: var(--ex-error); background: var(--ex-error-bg); }\n.atlas-fieldset { min-inline-size: 0; border: 0; padding: 0; margin: 0; }\n.atlas-fieldset legend { padding: 0; margin-block-end: var(--ex-space-2); }\n.atlas-radio-options { gap: var(--ex-space-2) var(--ex-space-5); }\n.atlas-stack .atlas-rows { padding-inline-start: 1.5rem; margin: 0; }\n.atlas-rows li + li { margin-block-start: var(--ex-space-2); }\n.atlas-note { border-inline-start: 2px solid var(--ex-selected-text); padding-inline-start: var(--ex-space-4); }\n.atlas-bold { font-weight: 750; }\n.atlas-italic { font-style: italic; font-synthesis: style; }\n.atlas-underline { text-decoration: underline; }\n.atlas-large { font-size: 1.375rem; }\n.atlas-divider-demo {\n  display: grid; gap: var(--ex-space-4); inline-size: min(100%, 24rem);\n  border: var(--ex-border-width) solid var(--ex-border); border-radius: var(--ex-radius-panel);\n  padding-block: var(--ex-space-4); background: var(--ex-surface);\n}\n.atlas-divider-demo p { margin-inline: var(--ex-space-4); }\n.atlas-inset { margin-inline: var(--ex-space-4); }\n.atlas-card {\n  inline-size: min(100%, 22rem); min-inline-size: 0; overflow: hidden;\n  border: 1px solid var(--ex-control-border); border-radius: var(--ex-radius-panel);\n  background: var(--ex-surface); color: var(--ex-text);\n}\n.atlas-card-band {\n  block-size: 3rem; background-color: var(--ex-selected-bg);\n  background-image: repeating-linear-gradient(155deg, transparent 0 .85rem, var(--ex-border) .85rem .95rem);\n}\n.atlas-card-body { gap: var(--ex-space-2); padding: var(--ex-space-5); }\n.atlas-card-body summary, .atlas-source summary {\n  color: var(--ex-link); cursor: pointer; font-weight: var(--ex-label-weight);\n  min-block-size: var(--ex-control-height-compact); align-content: center;\n}\n.atlas-card-body ul { padding-inline-start: 1.25rem; margin-block: var(--ex-space-2); }\n.atlas-missing {\n  display: flex; align-items: center; flex-wrap: wrap; gap: var(--ex-space-6);\n  container-type: inline-size; min-inline-size: 0;\n}\n.atlas-missing > .atlas-stack { flex: 1 1 16rem; }\n.atlas-http-code {\n  display: inline-grid; place-items: center; border-radius: var(--ex-radius-panel);\n  color: var(--ex-selected-text); background: var(--ex-selected-bg);\n  font-size: clamp(2.25rem, 12cqi, 4rem); font-weight: 750; line-height: 1.2;\n  letter-spacing: -.05em; padding: var(--ex-space-3) var(--ex-space-4);\n}\n.atlas-source { margin-block-start: var(--ex-space-2); }\n.atlas-source summary { inline-size: fit-content; padding-inline: var(--ex-space-1); }\n.atlas-source pre {\n  max-block-size: 18rem; overflow: auto; background: var(--ex-surface-raised);\n  padding: var(--ex-space-4); border-radius: var(--ex-radius-field); font-size: .875rem;\n}\n.atlas-source a { display: inline-flex; align-items: center; min-height: 2.75rem; }\n","component-atlas.js":"/* MIT. The recipes operate on their own sample data in the current document. */\nfunction report(root, message) {\n  root.querySelector('[role=\"status\"]').textContent = message;\n}\n\nasync function confirmation(root, destructive) {\n  const {openDialog} = await import('../vendor/evolutive-x/core/dialog.js');\n  const trigger = root.querySelector('[data-open]');\n  const dialog = root.querySelector('dialog');\n  const cancel = dialog.querySelector('[data-cancel]');\n  const confirm = dialog.querySelector('[data-confirm]');\n  let close;\n  trigger.addEventListener('click', () => {\n    if (!dialog.open) close = openDialog(dialog, {initialFocus: cancel, returnFocus: trigger});\n  });\n  cancel.addEventListener('click', () => close());\n  if (destructive) {\n    const item = root.querySelector('[data-item]');\n    const restore = root.querySelector('[data-restore]');\n    const undo = restore.querySelector('[data-undo]');\n    confirm.addEventListener('click', () => {\n      close();\n      item.hidden = true;\n      restore.hidden = false;\n      report(root, 'Harbour sketches deleted.');\n      undo.focus();\n    });\n    undo.addEventListener('click', () => {\n      restore.hidden = true;\n      item.hidden = false;\n      report(root, 'Harbour sketches restored.');\n      trigger.focus();\n    });\n  } else {\n    confirm.addEventListener('click', () => {\n      root.querySelector('textarea').value = '';\n      close();\n      report(root, 'The draft was cleared.');\n    });\n  }\n}\n\nfunction textFields(form) {\n  const field = form.querySelector('input');\n  const error = form.querySelector('.ex-error');\n  const help = form.querySelector('.ex-hint');\n  function markInvalid(invalid) {\n    error.hidden = !invalid;\n    if (invalid) {\n      field.setAttribute('aria-invalid', 'true');\n      field.setAttribute('aria-describedby', help.id + ' ' + error.id);\n    } else {\n      field.removeAttribute('aria-invalid');\n      field.setAttribute('aria-describedby', help.id);\n    }\n  }\n  form.noValidate = true;\n  form.addEventListener('submit', event => {\n    event.preventDefault();\n    const name = field.value.trim();\n    markInvalid(!name);\n    if (!name) {\n      report(form, 'Enter a notebook name.');\n      field.focus();\n      return;\n    }\n    report(form, 'Saved “' + name + '”.');\n  });\n  field.addEventListener('input', () => {\n    if (!error.hidden && field.value.trim()) markInvalid(false);\n    report(form, '');\n  });\n}\n\nfunction radioButtons(root) {\n  const rows = root.querySelector('ol');\n  const [autumn, spring] = rows.children;\n  root.addEventListener('change', event => {\n    const newest = event.target.value === 'Newest first';\n    rows.append(...(newest ? [autumn, spring] : [spring, autumn]));\n    report(root, 'Sorted ' + event.target.value.toLowerCase() + '.');\n  });\n}\n\nasync function tooltip(root) {\n  const {createTooltip} = await import('../vendor/evolutive-x/core/optional/context/tooltip.mjs');\n  const trigger = root.querySelector('button');\n  createTooltip(trigger, root.querySelector('.ex-tooltip'));\n  trigger.addEventListener('click', () => {\n    const saving = trigger.getAttribute('aria-pressed') === 'false';\n    trigger.setAttribute('aria-pressed', String(saving));\n    report(root, saving ? 'Notebook saved.' : 'Notebook removed from the reading list.');\n  });\n}\n\nasync function toolbar(root) {\n  const {enhanceToolbar} = await import('../vendor/evolutive-x/core/optional/context/toolbar.mjs');\n  const controls = root.querySelector('.ex-context-toolbar');\n  const note = root.querySelector('[data-note]');\n  enhanceToolbar(controls);\n  controls.addEventListener('click', event => {\n    const button = event.target.closest('button[data-style]');\n    if (!button) return;\n    const selected = button.getAttribute('aria-pressed') === 'false';\n    button.setAttribute('aria-pressed', String(selected));\n    note.classList.toggle('atlas-' + button.dataset.style, selected);\n  });\n}\n\nasync function sheet(root) {\n  const {createSheet} = await import('../vendor/evolutive-x/core/optional/context/sheet.mjs');\n  const trigger = root.querySelector('button');\n  const dialog = root.querySelector('dialog');\n  const sample = root.querySelector('[data-note]');\n  const inputs = [...dialog.querySelectorAll('input')];\n  const sheet = createSheet(trigger, dialog, {initialFocus: dialog.querySelector('h3')});\n  let selected = inputs[0];\n  trigger.addEventListener('click', () => { selected.checked = true; });\n  dialog.querySelector('[data-apply]').addEventListener('click', () => {\n    selected = inputs.find(input => input.checked);\n    sample.classList.toggle('atlas-large', selected.value === 'Large');\n    sheet.close();\n    report(root, selected.value + ' text applied.');\n  });\n}\n\nfunction filterChips(root) {\n  const rows = [...root.querySelectorAll('[data-topic]')];\n  root.addEventListener('change', () => {\n    const active = [...root.querySelectorAll('input:checked')].map(input => input.value);\n    let count = 0;\n    for (const row of rows) {\n      row.hidden = !active.every(topic => row.dataset.topic.split(' ').includes(topic));\n      if (!row.hidden) count++;\n    }\n    report(root, count + (count === 1 ? ' notebook' : ' notebooks'));\n  });\n}\n\nfunction dividers(root) {\n  const line = root.querySelector('hr');\n  root.addEventListener('change', event => {\n    line.classList.toggle('atlas-inset', event.target.value === 'Inset');\n  });\n}\n\nconst recipes = {\n  'warning-dialogs': root => confirmation(root, false),\n  'destructive-dialogs': root => confirmation(root, true),\n  'text-fields': textFields,\n  'radio-buttons': radioButtons,\n  tooltips: tooltip,\n  toolbars: toolbar,\n  sheets: sheet,\n  'filter-chips': filterChips,\n  dividers,\n};\nfor (const root of document.querySelectorAll('[data-ex-recipe]')) {\n  const setup = recipes[root.dataset.exRecipe];\n  if (setup) await setup(root);\n}\n","data-grid.css":"/* MIT. Load after the Evolutive X core tokens and components. */\n.ex-data-grid { inline-size: 100%; min-inline-size: 0; color: var(--ex-text); font-family: var(--ex-font-sans); }\n.ex-grid-scroll { max-inline-size: 100%; overflow-x: auto; }\n.ex-data-grid table { inline-size: 100%; border-collapse: collapse; font-size: var(--ex-body-size); }\n.ex-data-grid caption { text-align: start; font-size: var(--ex-h3-size); font-weight: var(--ex-h3-weight); padding-block-end: var(--ex-space-3); }\n.ex-data-grid :is(th,td) { text-align: start; vertical-align: middle; padding: var(--ex-space-2); border: 0; border-block-end: 1px solid var(--ex-border); overflow-wrap: anywhere; }\n.ex-data-grid thead th { color: var(--ex-text-secondary); font-size: var(--ex-label-size); font-weight: var(--ex-label-weight); }\n.ex-data-grid tbody th { font-weight: var(--ex-weight-medium); }\n.ex-data-grid .ex-grid-value { display: inline-block; max-inline-size: 100%; min-block-size: var(--ex-control-height); min-inline-size: min(100%, var(--ex-control-height)); padding: var(--ex-space-1) var(--ex-space-2); border: 0; background: transparent; color: var(--ex-link); border-radius: var(--ex-radius-secondary); cursor: pointer; font: inherit; text-align: start; text-decoration: underline dotted; text-underline-offset: .22em; overflow-wrap: anywhere; }\n.ex-data-grid .ex-grid-value:hover { background: var(--ex-surface-raised); }\n.ex-data-grid [data-grid-number] { text-align: end; font-variant-numeric: tabular-nums; }\n.ex-data-grid [data-grid-number] .ex-grid-value { text-align: end; }\n.ex-data-grid .ex-grid-value:focus-visible, .ex-data-grid [tabindex]:focus-visible { outline: var(--ex-focus-width) solid var(--ex-focus); outline-offset: -2px; }\n.ex-data-grid input { min-inline-size: 4ch; max-inline-size: 100%; }\n.ex-data-grid .ex-grid-help, .ex-data-grid .ex-grid-message { color: var(--ex-text-secondary); font-size: var(--ex-compact-size); margin: var(--ex-space-3) 0 0; }\n.ex-data-grid .ex-grid-message:empty { margin: 0; }\n.ex-data-grid .ex-grid-error { color: var(--ex-error); }\n.ex-grid-actions { display: flex; flex-wrap: wrap; gap: var(--ex-space-2); margin-block-start: var(--ex-space-3); }\n.ex-grid-actions[hidden] { display: none; }\n.ex-grid-actions [aria-disabled=true] { cursor: progress; }\n@media (max-width: 28rem) {\n  .ex-data-grid :is(th,td) { padding-inline: var(--ex-space-1); }\n  .ex-data-grid .ex-grid-value, .ex-data-grid input { padding-inline: var(--ex-space-1); }\n}\n","data-grid.mjs":"// MIT. Mark editable columns on a native table. Unmarked columns stay read-only.\nconst grids = new WeakMap();\nlet nextGrid = 0;\n\nexport function gridValue(raw, column) {\n  const text = raw.trim();\n  if (text === '') {\n    return column.required ? {error: 'Enter a value for ' + column.label + '.'} : {value: null};\n  }\n  if (column.type === 'text') {\n    if (column.maxLength !== undefined && text.length > column.maxLength) {\n      return {error: 'Use ' + column.maxLength + ' characters or fewer.'};\n    }\n    return {value: text};\n  }\n  const value = Number(text);\n  if (!/^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i.test(text) || !Number.isFinite(value)) {\n    return {error: 'Enter a number.'};\n  }\n  if (column.min !== undefined && value < column.min) return {error: 'Enter ' + column.min + ' or more.'};\n  if (column.max !== undefined && value > column.max) return {error: 'Enter ' + column.max + ' or less.'};\n  if (column.step !== undefined) {\n    const units = (value - (column.min ?? 0)) / column.step;\n    if (Math.abs(units - Math.round(units)) > Number.EPSILON * Math.max(1, Math.abs(units)) * 4) {\n      return {error: column.step === 1 ? 'Enter a whole number.' : 'Use increments of ' + column.step + '.'};\n    }\n  }\n  return {value};\n}\n\nexport function gridDestination(key, row, col, rows, cols, control, rtl = false) {\n  switch (key) {\n    case 'ArrowRight': return [row, Math.max(0, Math.min(cols - 1, col + (rtl ? -1 : 1)))];\n    case 'ArrowLeft': return [row, Math.max(0, Math.min(cols - 1, col + (rtl ? 1 : -1)))];\n    case 'ArrowDown': return [Math.min(rows - 1, row + 1), col];\n    case 'ArrowUp': return [Math.max(0, row - 1), col];\n    case 'Home': return [control ? 0 : row, 0];\n    case 'End': return [control ? rows - 1 : row, cols - 1];\n    default: return null;\n  }\n}\n\nfunction columnFrom(header) {\n  const data = header.dataset;\n  const column = {field: data.field, label: header.textContent.trim(), type: data.type || 'text', required: header.hasAttribute('data-required')};\n  for (const [attr, key] of [['min','min'], ['max','max'], ['step','step'], ['maxlength','maxLength']]) {\n    if (data[attr] !== undefined) column[key] = Number(data[attr]);\n  }\n  return column;\n}\n\n/**\n * Enhance or reconfigure a [data-ex-grid] container. A header's data-field is\n * the key in onSave({rowId, field, value, previousValue, signal}). Resolve\n * only after persisting the edit. Reject on failure to retain the draft.\n * With no callback, edits last in this document. Call destroy() on unmount\n * or before replacing the source rows. Pending saves receive an AbortSignal.\n */\nexport function enhanceDataGrid(root, options = {}) {\n  const existing = grids.get(root);\n  if (existing) {\n    if (Object.hasOwn(options, 'onSave')) existing.configure(options.onSave);\n    return existing.api;\n  }\n  const table = root.querySelector('table');\n  const headers = Array.from(table?.tHead?.rows[0]?.cells ?? []);\n  const columns = headers.map(columnFrom);\n  const bodyRows = Array.from(table?.tBodies ?? []).flatMap(body => Array.from(body.rows));\n  const fields = columns.filter(column => column.field);\n  if (!table?.caption || !bodyRows.length || !fields.length ||\n      new Set(fields.map(column => column.field)).size !== fields.length ||\n      !fields.every(column => ['text', 'number'].includes(column.type)) ||\n      bodyRows.some(row => !row.dataset.rowId || row.cells.length !== columns.length) ||\n      new Set(bodyRows.map(row => row.dataset.rowId)).size !== bodyRows.length) return null;\n\n  const doc = root.ownerDocument;\n  const id = 'ex-grid-' + (++nextGrid);\n  const make = (tag, className, text) => {\n    const node = doc.createElement(tag);\n    if (className) node.className = className;\n    if (text !== undefined) node.textContent = text;\n    return node;\n  };\n  const button = (name, kind) => {\n    const node = make('button', 'ex-button ex-button--compact ex-button--' + kind, name);\n    node.type = 'button';\n    return node;\n  };\n  const help = make('p', 'ex-grid-help');\n  help.id = id + '-help';\n  const actions = make('div', 'ex-grid-actions');\n  const save = button('Save', 'primary'), cancel = button('Cancel', 'quiet');\n  actions.hidden = true;\n  actions.append(save, cancel);\n  const message = make('p', 'ex-grid-message');\n  message.id = id + '-message';\n  message.setAttribute('role', 'status');\n  root.append(help, actions, message);\n  const previousAttributes = [];\n  function assign(node, key, value) {\n    previousAttributes.push([node, key, node.getAttribute(key)]);\n    node.setAttribute(key, value);\n  }\n  assign(table, 'role', 'grid');\n  assign(table, 'aria-describedby', [table.getAttribute('aria-describedby'), help.id].filter(Boolean).join(' '));\n  if (!table.caption.id) assign(table.caption, 'id', id + '-caption');\n  if (!table.hasAttribute('aria-label') && !table.hasAttribute('aria-labelledby')) {\n    assign(table, 'aria-labelledby', table.caption.id);\n  }\n  const lookup = new Map();\n  const rows = bodyRows.map((row, rowIndex) => {\n    const rowName = row.querySelector('th[scope=\"row\"]')?.textContent.trim() || row.dataset.rowId;\n    return Array.from(row.cells, (cell, columnIndex) => {\n      const column = columns[columnIndex];\n      const item = {cell, column, rowIndex, columnIndex, rowName, rowId: row.dataset.rowId};\n      if (column.field) {\n        const text = cell.textContent.trim();\n        item.value = gridValue(text, column).value ?? (text || null);\n        item.control = make('button', 'ex-grid-value');\n        item.control.type = 'button';\n        paint(item);\n        cell.replaceChildren(item.control);\n        if (column.type === 'number') assign(cell, 'data-grid-number', '');\n        item.control.tabIndex = -1;\n      } else {\n        item.control = cell;\n        assign(cell, 'tabindex', '-1');\n        assign(cell, 'aria-readonly', 'true');\n      }\n      lookup.set(cell, item);\n      return item;\n    });\n  });\n  columns.forEach((column, index) => {\n    if (column.type === 'number') assign(headers[index], 'data-grid-number', '');\n  });\n  let active = rows[0].find(item => item.column.field);\n  active.control.tabIndex = 0;\n  let editing = null, request = null, onSave;\n\n  function configure(callback) {\n    onSave = callback;\n    help.textContent = 'Choose a value to edit. Use arrow keys to move.' + (onSave ? '' : ' Changes last until you reload.');\n  }\n  configure(options.onSave);\n\n  function paint(item) {\n    const value = item.value === null ? 'Empty' : String(item.value);\n    item.control.textContent = value;\n    item.control.setAttribute('aria-label', [value, item.column.label, item.rowName, 'Edit'].join(', '));\n  }\n  function announce(text, error = false) {\n    message.textContent = text;\n    message.classList.toggle('ex-grid-error', error);\n  }\n  function select(item, focus = false) {\n    active.control.tabIndex = -1;\n    active = item;\n    item.control.tabIndex = 0;\n    if (focus) item.control.focus();\n  }\n  function edit(item) {\n    if (!item.column.field) return;\n    if (editing) {\n      if (!request) {\n        announce('Save or cancel the current edit first.');\n        editing.input.focus();\n      }\n      return;\n    }\n    select(item);\n    const {column} = item;\n    const input = make('input', 'ex-input');\n    input.type = column.type;\n    input.value = item.value === null ? '' : String(item.value);\n    input.required = column.required;\n    if (column.type === 'number') {\n      input.step = String(column.step ?? 'any');\n      if (column.min !== undefined) input.min = String(column.min);\n      if (column.max !== undefined) input.max = String(column.max);\n    } else if (column.maxLength !== undefined) input.maxLength = column.maxLength;\n    input.setAttribute('aria-label', column.label + ', ' + item.rowName);\n    input.setAttribute('aria-describedby', message.id);\n    editing = {item, input};\n    item.cell.replaceChildren(input);\n    actions.hidden = false;\n    announce('');\n    input.focus();\n    input.select();\n  }\n  function finish(text, focus) {\n    const {item} = editing;\n    editing = null;\n    actions.hidden = true;\n    paint(item);\n    item.cell.replaceChildren(item.control);\n    announce(text);\n    if (focus) item.control.focus();\n  }\n  async function commit() {\n    if (!editing || request) return;\n    const {item, input} = editing;\n    const {value, error} = input.validity.badInput ? {error: 'Enter a number.'} : gridValue(input.value, item.column);\n    if (error) {\n      input.setAttribute('aria-invalid', 'true');\n      announce(error, true);\n      input.focus();\n      return;\n    }\n    if (Object.is(value, item.value)) {\n      finish('No changes to save.', true);\n      return;\n    }\n    const controller = new AbortController();\n    request = controller;\n    input.readOnly = true;\n    save.setAttribute('aria-disabled','true');\n    cancel.setAttribute('aria-disabled','true');\n    announce('Saving…');\n    try {\n      await onSave?.({rowId: item.rowId, field: item.column.field, previousValue: item.value, value, signal: controller.signal});\n      if (controller.signal.aborted) return;\n      item.value = value;\n      finish(item.rowName + ' updated.', root.contains(doc.activeElement));\n    } catch {\n      if (controller.signal.aborted) return;\n      announce('Could not save. Your edit is here. Try Save again or cancel.', true);\n      if (root.contains(doc.activeElement)) input.focus();\n    } finally {\n      request = null;\n      input.readOnly = false;\n      save.removeAttribute('aria-disabled');\n      cancel.removeAttribute('aria-disabled');\n    }\n  }\n  function cancelEdit() {\n    if (editing && !request) finish('Edit cancelled.', true);\n  }\n  function itemAt(target) {\n    return lookup.get(target.closest('td, th'));\n  }\n  function click(event) {\n    if (event.target === save) { void commit(); return; }\n    if (event.target === cancel) { cancelEdit(); return; }\n    const item = itemAt(event.target);\n    if (item && event.target === item.control) edit(item);\n  }\n  function keydown(event) {\n    if (event.isComposing || event.altKey) return;\n    if (editing) {\n      if (event.key === 'Escape') {\n        event.preventDefault();\n        cancelEdit();\n      } else if (event.target === editing.input && event.key === 'Enter') {\n        event.preventDefault();\n        void commit();\n      }\n      return;\n    }\n    const item = itemAt(event.target);\n    if (!item) return;\n    if (event.key === 'F2' && item.column.field) {\n      event.preventDefault();\n      edit(item);\n      return;\n    }\n    const rtl = doc.defaultView.getComputedStyle(table).direction === 'rtl';\n    const to = gridDestination(event.key, item.rowIndex, item.columnIndex, rows.length, columns.length, event.ctrlKey || event.metaKey, rtl);\n    if (to) {\n      event.preventDefault();\n      select(rows[to[0]][to[1]], true);\n    }\n  }\n  function focusin(event) {\n    const item = itemAt(event.target);\n    if (!editing && item && event.target === item.control) select(item);\n  }\n  function inputChanged(event) {\n    if (editing?.input === event.target) {\n      editing.input.removeAttribute('aria-invalid');\n      announce('');\n    }\n  }\n  const events = {click, keydown, focusin, input: inputChanged};\n  for (const [name, listener] of Object.entries(events)) root.addEventListener(name, listener);\n  const api = {destroy() {\n    if (grids.get(root)?.api !== api) return;\n    request?.abort();\n    for (const [name, listener] of Object.entries(events)) root.removeEventListener(name, listener);\n    for (const row of rows) for (const item of row) {\n      if (item.column.field) item.cell.textContent = item.value === null ? '' : String(item.value);\n    }\n    for (const [node, key, old] of previousAttributes) {\n      if (old === null) node.removeAttribute(key);\n      else node.setAttribute(key, old);\n    }\n    help.remove();\n    actions.remove();\n    message.remove();\n    grids.delete(root);\n  }};\n  grids.set(root, {api, configure});\n  return api;\n}\n\nif (typeof document !== 'undefined') document.querySelectorAll('[data-ex-grid]').forEach(root => enhanceDataGrid(root));\n","date-range.css":"/* MIT. Load after the Evolutive X core styles. */\n.ex-date-range { width: 100%; min-inline-size: 0; margin: 0; padding: 0; border: 0; color: var(--ex-text); }\n.ex-date-range legend { padding: 0; color: inherit; font-size: var(--ex-h3-size); font-weight: var(--ex-h3-weight); }\n.ex-date-range > :not(legend, [hidden]) { margin: var(--ex-space-4) 0 0; }\n.ex-date-range .ex-range-actions { display: flex; flex-wrap: wrap; gap: var(--ex-space-2); }\n.ex-date-range .ex-range-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13em), 1fr)); gap: var(--ex-space-4); }\n.ex-date-range .ex-field { align-content: start; }\n.ex-date-range .ex-input { min-inline-size: 0; max-inline-size: 100%; }\n.ex-date-range .ex-range-actions[hidden], .ex-date-range [data-range-status]:empty { display: none; }\n","date-range.mjs":"/* MIT. Inputs and event payloads represent whole calendar days, inclusive. */\nconst instances = new WeakMap();\nlet nextErrorId = 0;\n\n// Read \"today\" from the user's calendar once. Do day arithmetic on UTC fields\n// so a daylight-saving transition cannot shorten or lengthen this date range.\nexport function presetDates(preset, today = new Date()) {\n  const start = new Date(0);\n  start.setUTCFullYear(today.getFullYear(), today.getMonth(), today.getDate());\n  const end = new Date(start);\n  if (preset === 'last-seven') {\n    start.setUTCDate(start.getUTCDate() - 6);\n  } else if (preset === 'month') {\n    start.setUTCDate(1);\n    end.setUTCMonth(end.getUTCMonth() + 1, 0);\n  } else {\n    throw new RangeError('Unknown date range preset.');\n  }\n  return {start: start.toISOString().slice(0, 10), end: end.toISOString().slice(0, 10)};\n}\n\n// Inputs already checked by their native date constraints.\nexport function rangeIssue(start, end) {\n  if (end && !start) return {field: 'start', message: 'Enter a start date.'};\n  if (start && !end) return {field: 'end', message: 'Enter an end date.'};\n  if (start > end) return {field: 'end', message: 'Choose an end date on or after the start date.'};\n  return null;\n}\n\nfunction showDateRange(value, locale) {\n  if (!value.start) return 'All dates.';\n  const format = new Intl.DateTimeFormat(locale, {dateStyle: 'medium', timeZone: 'UTC'});\n  const formatDay = day => format.format(new Date(day + 'T00:00:00Z'));\n  return value.start === value.end ? formatDay(value.start) : formatDay(value.start) + ' – ' + formatDay(value.end);\n}\n\n/** Read committed dates with value(). Listen for ex-date-range-change on the\n * fieldset or an ancestor. Use destroy() before removing an enhanced instance. */\nexport function enhanceDateRange(root) {\n  if (instances.has(root)) return instances.get(root);\n  const find = selector => root.querySelector(selector);\n  const start = find('[data-range-start]');\n  const end = find('[data-range-end]');\n  const error = find('[data-range-error]');\n  const status = find('[data-range-status]');\n  if (!start || !end || !error || !status) return null;\n  const document = root.ownerDocument;\n  const locale = root.closest('[lang]')?.lang || undefined;\n  const tools = [...root.querySelectorAll('[data-range-tools]')];\n  const subscriptions = new AbortController();\n  const options = {signal: subscriptions.signal};\n  const originalId = error.id;\n  if (!originalId) {\n    let id;\n    do { id = 'ex-range-error-' + ++nextErrorId; } while (document.getElementById(id));\n    error.id = id;\n  }\n  let invalidField;\n  let previousDescription;\n  const emptyRange = () => ({start: null, end: null});\n  const read = () => ({start: start.value || null, end: end.value || null});\n  let committed = start.validity.valid && end.validity.valid && !rangeIssue(start.value, end.value) ? read() : emptyRange();\n\n  function clearError() {\n    if (invalidField) {\n      invalidField.removeAttribute('aria-invalid');\n      if (previousDescription === null) invalidField.removeAttribute('aria-describedby');\n      else invalidField.setAttribute('aria-describedby', previousDescription);\n      invalidField = null;\n    }\n    error.hidden = true;\n    error.textContent = '';\n  }\n  function commit(value) {\n    clearError();\n    committed = value;\n    status.textContent = 'Applied: ' + showDateRange(value, locale);\n    root.dispatchEvent(new CustomEvent('ex-date-range-change', {bubbles: true, detail: {...value}}));\n  }\n  function apply() {\n    clearError();\n    const badInput = [start, end].find(input => !input.validity.valid);\n    const issue = rangeIssue(start.value, end.value);\n    if (badInput || issue) {\n      invalidField = badInput || (issue.field === 'start' ? start : end);\n      error.textContent = badInput ? badInput.validationMessage : issue.message;\n      error.hidden = false;\n      previousDescription = invalidField.getAttribute('aria-describedby');\n      invalidField.setAttribute('aria-describedby', [previousDescription, error.id].filter(Boolean).join(' '));\n      invalidField.setAttribute('aria-invalid', 'true');\n      invalidField.focus();\n      return false;\n    }\n    commit(read());\n    return true;\n  }\n  function clear() {\n    start.value = end.value = '';\n    commit(emptyRange());\n  }\n  function draftStatus() {\n    clearError();\n    const message = 'Apply to use these dates.';\n    if (status.textContent !== message) status.textContent = message;\n  }\n  function onClick(event) {\n    const button = event.target.closest('button');\n    if (!button || !root.contains(button) || button.matches(':disabled')) return;\n    if (button.hasAttribute('data-range-apply')) apply();\n    if (button.hasAttribute('data-range-clear')) clear();\n    if (button.hasAttribute('data-range-preset')) {\n      const range = presetDates(button.dataset.rangePreset);\n      start.value = range.start;\n      end.value = range.end;\n      draftStatus();\n    }\n  }\n  root.addEventListener('click', onClick, options);\n  for (const input of [start, end]) input.addEventListener('input', draftStatus, options);\n  for (const group of tools) group.hidden = false;\n  status.textContent = 'Applied: ' + showDateRange(committed, locale);\n  const api = {apply, clear, value: () => ({...committed}), destroy() {\n    subscriptions.abort();\n    clearError();\n    if (!originalId) error.removeAttribute('id');\n    for (const group of tools) group.hidden = true;\n    status.textContent = '';\n    instances.delete(root);\n  }};\n  instances.set(root, api);\n  return api;\n}\n\nif (typeof document !== 'undefined') {\n  for (const root of document.querySelectorAll('[data-ex-date-range]')) enhanceDateRange(root);\n}\n","guide-icons.svg":"<svg xmlns=\"http://www.w3.org/2000/svg\">\n  <!-- Evolutive X guide symbols. MIT. All symbols share the interface icon grid. -->\n  <symbol id=\"home\" viewBox=\"0 0 24 24\"><path d=\"m3 10 9-7 9 7v10h-6v-6H9v6H3z\"/></symbol>\n  <symbol id=\"styles\" viewBox=\"0 0 24 24\"><path d=\"m12 3 9 5-9 5-9-5zM3.5 12l8.5 5 8.5-5M3.5 16.5l8.5 5 8.5-5\"/></symbol>\n  <symbol id=\"components\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1.5\"/><circle cx=\"17.5\" cy=\"6.5\" r=\"3.5\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"3.5\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1.5\"/></symbol>\n  <symbol id=\"patterns\" viewBox=\"0 0 24 24\"><circle cx=\"6\" cy=\"5\" r=\"2.5\"/><circle cx=\"18\" cy=\"19\" r=\"2.5\"/><path d=\"M6 7.5v5a4 4 0 0 0 4 4h3M8.5 5H14a4 4 0 0 1 4 4v4\"/></symbol>\n  <symbol id=\"checks\" viewBox=\"0 0 24 24\"><path d=\"M12 2.5 20 6v6c0 5-4.5 8.5-8 10-3.5-1.5-8-5-8-10V6zM8 12l2.5 2.5 5.5-6\"/></symbol>\n  <symbol id=\"project\" viewBox=\"0 0 24 24\"><path d=\"M3 7.5V5h6l2 3h10v12H3zM12 11v6m-3-3h6\"/></symbol>\n  <symbol id=\"agent\" viewBox=\"0 0 24 24\"><path d=\"M4 4.5h16v12H10l-5 4v-4H4zM9.5 8l-2 2 2 2m5-4 2 2-2 2\"/></symbol>\n  <symbol id=\"auto\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"M12 17v4m-4 0h8\"/></symbol>\n  <symbol id=\"type\" viewBox=\"0 0 24 24\"><path d=\"m3 19 6-14 6 14M5 14h8m1-4h7m-3.5 0v9\"/></symbol>\n  <symbol id=\"colour\" viewBox=\"0 0 24 24\"><circle cx=\"9\" cy=\"10\" r=\"6.5\"/><path d=\"M12.5 7.5a6.5 6.5 0 1 1-5 9\"/></symbol>\n  <symbol id=\"shape\" viewBox=\"0 0 24 24\"><path d=\"M4 20V8a4 4 0 0 1 4-4h12M9 20v-5a6 6 0 0 1 6-6h5\"/></symbol>\n  <symbol id=\"spacing\" viewBox=\"0 0 24 24\"><path d=\"M3 4v16m18-16v16M6 12h12m-9-3-3 3 3 3m6-6 3 3-3 3\"/></symbol>\n  <symbol id=\"icons\" viewBox=\"0 0 24 24\"><path d=\"m12 3 8.5 9-8.5 9L3.5 12z\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/></symbol>\n  <symbol id=\"motion\" viewBox=\"0 0 24 24\"><path d=\"M2.5 7h7m-5 5h4m-2 5h3\"/><circle cx=\"16\" cy=\"12\" r=\"5.5\"/></symbol>\n  <symbol id=\"chart\" viewBox=\"0 0 24 24\"><path d=\"M3 4v16h18M7 16v-4m5 4V7m5 9v-6\"/></symbol>\n</svg>\n","more-charts.css":"/* MIT. Keep this file beside charts.css and load it after the core tokens. */\n@import \"./charts.css\";\n\n.ex-data-chart { container-type: inline-size; }\n.ex-data-chart > p { margin-block: var(--ex-space-2) var(--ex-space-4); }\n.ex-detail-view { display: grid; gap: var(--ex-space-4); align-items: center; }\n.ex-detail-plot { min-inline-size: 0; text-align: center; }\n.ex-detail-plot svg { display: block; inline-size: 100%; block-size: auto; margin-inline: auto; max-inline-size: 18rem; overflow: visible; direction: ltr; }\n.ex-detail-plot text { fill: var(--ex-text); font-family: var(--ex-font-sans); font-size: 12px; }\n.ex-plot-marker { fill: var(--ex-link); stroke: var(--ex-surface); stroke-width: 1.5; }\n.ex-plot-tick { fill: var(--ex-surface); stroke: var(--ex-control-border); }\n.ex-detail-plot .ex-plot-number { text-anchor: middle; dominant-baseline: central; font-size: 10px; font-weight: var(--ex-weight-bold); }\n.ex-plot-slice { stroke: var(--ex-surface); stroke-width: 1.8; stroke-linejoin: round; }\n.ex-plot-slice-0 { fill: var(--ex-spectrum-1); }\n.ex-plot-slice-1 { fill: var(--ex-spectrum-2); }\n.ex-plot-slice-2 { fill: var(--ex-spectrum-3); }\n.ex-plot-slice-3 { fill: var(--ex-spectrum-4); }\n.ex-plot-current { stroke: var(--ex-text); stroke-width: 2.5; }\n.ex-plot-grid { fill: none; stroke: var(--ex-control-border); stroke-dasharray: 2 3; }\n.ex-plot-axis { stroke: var(--ex-control-border); }\n.ex-plot-shape { fill: none; stroke: var(--ex-link); stroke-width: 2.5; }\n.ex-plot-axis-title { display: block; color: var(--ex-text-secondary); font-size: var(--ex-compact-size); }\n.ex-plot-axis-title:first-child { text-align: start; }\n.ex-detail-plot [data-ex-point] { cursor: pointer; }\n.ex-detail-choices { display: grid; gap: var(--ex-space-1); min-inline-size: 0; padding: 0; margin: 0; border: 0; }\n.ex-detail-choices legend { margin-block-end: var(--ex-space-1); font-weight: var(--ex-weight-semibold); }\n.ex-detail-choices label { display: flex; align-items: center; gap: var(--ex-space-2); min-block-size: var(--ex-control-height-compact); cursor: pointer; }\n.ex-detail-choices input { flex: none; margin: 0; inline-size: 1rem; block-size: 1rem; accent-color: var(--ex-link); }\n.ex-detail-status { grid-column: 1 / -1; margin: 0; color: var(--ex-text-secondary); font-variant-numeric: tabular-nums; }\n@container (min-width: 26rem) {\n  .ex-detail-view { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: var(--ex-space-6); }\n}\n@media (forced-colors: active) {\n  .ex-plot-slice { fill: Canvas; stroke: CanvasText; }\n  .ex-plot-current { stroke: Highlight; stroke-width: 4; }\n  .ex-plot-marker { fill: CanvasText; stroke: Canvas; }\n  .ex-plot-shape, .ex-plot-axis, .ex-plot-grid { stroke: CanvasText; }\n  .ex-plot-tick { fill: Canvas; stroke: CanvasText; }\n  .ex-detail-plot text { fill: CanvasText; }\n}\n","more-charts.mjs":"// MIT. Each chart is enhanced from its adjacent, readable table.\nimport { chartNumber, element, graphic, readTable } from './charts.mjs';\n\nconst instances = new WeakMap();\nlet groupNumber = 0;\nconst turn = 2 * Math.PI;\nconst words = { pie: 'slice', radar: 'axis', scatter: 'point' };\n\nfunction polar(fraction, radius) {\n  const angle = fraction * turn - Math.PI / 2;\n  return [120 + radius * Math.cos(angle), 104 + radius * Math.sin(angle)];\n}\n\n// Normalising before summing keeps proportions meaningful for very large counts.\nexport function pieShares(values) {\n  let largest = 0;\n  for (const value of values) {\n    if (value === null || !Number.isFinite(value) || value < 0) return null;\n    largest = Math.max(largest, value);\n  }\n  if (largest === 0) return null;\n  const normal = values.map(value => value / largest);\n  const sum = normal.reduce((result, value) => result + value, 0);\n  return normal.map(value => value / sum);\n}\n\n// A constant domain places its single tick and observations at the centre.\nexport function scatterAxis(values) {\n  let min = Infinity, max = -Infinity;\n  for (const value of values) {\n    min = Math.min(min, value);\n    max = Math.max(max, value);\n  }\n  if (!values.length) return null;\n  if (min === max) return { min, max, position: () => 0.5 };\n  const span = max - min;\n  const position = Number.isFinite(span)\n    ? value => (value - min) / span\n    : value => (value / 2 - min / 2) / (max / 2 - min / 2);\n  return { min, max, position };\n}\n\nexport function radarPoints(values, max) {\n  if (!Number.isFinite(max) || max <= 0 || values.length < 3 ||\n      values.some(value => value !== null && (!Number.isFinite(value) || value < 0 || value > max))) return null;\n  return values.map((value, index) => value === null ? null : polar(index / values.length, 76 * (value / max)));\n}\n\nfunction scaleLabel(value) {\n  return Number(value.toPrecision(5)).toString();\n}\n\nfunction textAt(doc, parent, x, y, text, attrs = {}) {\n  const node = graphic(doc, 'text', { x, y, ...attrs });\n  node.textContent = text;\n  parent.append(node);\n}\n\nfunction badge(doc, parent, point, index) {\n  const group = graphic(doc, 'g', {'data-ex-point': index});\n  group.append(graphic(doc, 'circle', { cx: point[0], cy: point[1], r: 9, class: 'ex-plot-tick' }));\n  textAt(doc, group, ...point, String(index + 1), { class: 'ex-plot-number' });\n  parent.append(group);\n}\n\nfunction addLine(doc, parent, a, b, style) {\n  parent.append(graphic(doc, 'line', { x1: a[0], y1: a[1], x2: b[0], y2: b[1], class: style }));\n}\n\nfunction plotPie(doc, svg, shares, selected) {\n  let start = 0;\n  for (const [index, share] of shares.entries()) {\n    if (!share) continue;\n    const stop = start + share;\n    const style = 'ex-plot-slice ex-plot-slice-' + index % 4 + (index === selected ? ' ex-plot-current' : '');\n    const attrs = { class:style, 'data-ex-point':index };\n    if (share === 1) {\n      svg.append(graphic(doc, 'circle', { ...attrs, cx:120, cy:104, r:87 }));\n    } else {\n      const a = polar(start, 87), b = polar(stop, 87);\n      const d = 'M120 104 L' + a.join(' ') + ' A87 87 0 ' + (share > .5 ? 1 : 0) + ' 1 ' + b.join(' ') + ' Z';\n      svg.append(graphic(doc, 'path', { ...attrs, d }));\n    }\n    start = stop;\n  }\n  start = 0;\n  for (const [index, share] of shares.entries()) {\n    if (share >= .065 || (share > 0 && index === selected)) {\n      badge(doc, svg, polar(start + share / 2, share === 1 ? 0 : 62), index);\n    }\n    start += share;\n  }\n}\n\nfunction plotRadar(doc, svg, points, selected) {\n  const edges = points.map((_, index) => polar(index / points.length, 76));\n  for (const fraction of [.5, 1]) {\n    const ring = points.map((_, index) => polar(index / points.length, 76 * fraction).join(','));\n    svg.append(graphic(doc, 'polygon', { points:ring.join(' '), class:'ex-plot-grid' }));\n  }\n  edges.forEach(edge => addLine(doc, svg, [120,104], edge, 'ex-plot-axis'));\n  points.forEach((point, index) => {\n    const next = points[(index + 1) % points.length];\n    if (point && next) addLine(doc, svg, point, next, 'ex-plot-shape');\n  });\n  points.forEach((point, index) => {\n    if (point) svg.append(graphic(doc, 'circle', { cx:point[0], cy:point[1], r:index === selected ? 6 : 4,\n      class:'ex-plot-marker' + (index === selected ? ' ex-plot-current' : ''), 'data-ex-point':index }));\n    badge(doc, svg, polar(index / points.length, 93), index);\n  });\n}\n\nfunction plotScatter(doc, svg, pairs, axes, selected) {\n  const [xAxis, yAxis] = axes;\n  addLine(doc, svg, [43,14], [43,178], 'ex-plot-axis');\n  addLine(doc, svg, [43,178], [225,178], 'ex-plot-axis');\n  const x = value => 51 + 166 * xAxis.position(value);\n  const y = value => 170 - 148 * yAxis.position(value);\n  for (const value of new Set([xAxis.min, xAxis.max])) textAt(doc,svg,x(value),197,scaleLabel(value),{'text-anchor':'middle'});\n  for (const value of new Set([yAxis.min, yAxis.max])) textAt(doc,svg,38,y(value)+4,scaleLabel(value),{'text-anchor':'end'});\n  // Paint the selected point last so coincident observations can still be inspected.\n  const indices = pairs.map((_, index) => index).filter(index => index !== selected);\n  indices.push(selected);\n  for (const index of indices) {\n    const [a,b] = pairs[index];\n    if (a === null || b === null) continue;\n    svg.append(graphic(doc, 'circle', { cx:x(a), cy:y(b), r:index === selected ? 6 : 4,\n      class:'ex-plot-marker' + (index === selected ? ' ex-plot-current' : ''), 'data-ex-point':index }));\n    if (index === selected) badge(doc, svg, [x(a),y(b)-13], index);\n  }\n}\n\nfunction modelFor(kind, model, limit) {\n  if (!model || model.measures.length !== (kind === 'scatter' ? 2 : 1)) return { error:'Check the table headings and numeric values.' };\n  if (!model.rows.length) return { error:'No observations yet.' };\n  const values = model.rows.map(row => row.cells[0].value);\n  if (kind === 'pie') {\n    const shares = pieShares(values);\n    return shares ? { shares } : { error:'A pie needs a complete set of non-negative values with a positive total.' };\n  }\n  if (kind === 'radar') {\n    const max = chartNumber(limit || '');\n    const points = radarPoints(values, max);\n    return points?.some(Boolean) ? { points, max } : { error:'Use at least three axes on one positive scale, with scores from zero to the stated maximum and at least one observed value.' };\n  }\n  const pairs = model.rows.map(row => row.cells.map(cell => cell.value));\n  const complete = pairs.filter(pair => pair.every(value => value !== null));\n  return complete.length ? { pairs, axes: [0,1].map(column => scatterAxis(complete.map(pair => pair[column]))) }\n    : { error:'No observations have both coordinates.' };\n}\n\nexport function enhanceDataChart(figure) {\n  const previous = instances.get(figure);\n  const hadFocus = previous?.view.contains(figure.ownerDocument.activeElement);\n  const priorLabel = previous?.label;\n  previous?.view.remove();\n  instances.delete(figure);\n  const kind = figure.getAttribute('data-ex-data-chart');\n  const details = figure.querySelector('details');\n  const table = details?.querySelector('table');\n  if (!table || !Object.hasOwn(words, kind)) return;\n  const doc = figure.ownerDocument, model = readTable(table);\n  const data = modelFor(kind, model, figure.getAttribute('data-ex-max'));\n  const view = element(doc,'div','ex-detail-view');\n  const status = element(doc,'p','ex-detail-status');\n  status.setAttribute('role','status');\n  details.before(view);\n  view.append(status);\n  const state = {view, label:priorLabel};\n  instances.set(figure,state);\n  if (data.error) {\n    status.textContent = data.error;\n    details.open = true;\n    if (hadFocus) details.querySelector('summary')?.focus();\n    return;\n  }\n  const plot = element(doc,'div','ex-detail-plot');\n  plot.setAttribute('aria-hidden','true');\n  const svg = graphic(doc,'svg',{viewBox:'0 0 240 208', focusable:'false'});\n  if (kind === 'scatter') plot.append(element(doc,'span','ex-plot-axis-title',model.measures[1].name));\n  plot.append(svg);\n  if (kind === 'scatter') plot.append(element(doc,'span','ex-plot-axis-title',model.measures[0].name));\n  const choices = element(doc,'fieldset','ex-detail-choices');\n  choices.append(element(doc,'legend','','Inspect a ' + (kind === 'radar' ? 'score' : words[kind])));\n  const radios = [], group = 'ex-chart-detail-' + (++groupNumber);\n  function choose(index) {\n    const row = model.rows[index];\n    state.label = row.label;\n    svg.replaceChildren();\n    if (kind === 'pie') {\n      plotPie(doc,svg,data.shares,index);\n      const share = new Intl.NumberFormat(undefined,{style:'percent',maximumSignificantDigits:3}).format(data.shares[index]);\n      status.textContent = row.label + ' · ' + model.measures[0].name + ' ' + row.cells[0].text + ' (' + share + ' of total).';\n    } else if (kind === 'radar') {\n      plotRadar(doc,svg,data.points,index);\n      status.textContent = row.label + ' · ' + (row.cells[0].value === null ? 'No score.' : row.cells[0].text + ' of ' + data.max + '.');\n    } else {\n      plotScatter(doc,svg,data.pairs,data.axes,index);\n      status.textContent = row.label + ' · ' + model.measures.map((m,i) => m.name + ' ' + row.cells[i].text).join(' · ') + '.';\n    }\n  }\n  const selected = Math.max(0, model.rows.findIndex(row => row.label === priorLabel));\n  model.rows.forEach((row,index) => {\n    const label = element(doc,'label','');\n    const radio = doc.createElement('input');\n    radio.type = 'radio';\n    radio.name = group;\n    radio.checked = index === selected;\n    radio.addEventListener('change', () => { if (radio.checked) choose(index); });\n    label.append(radio, doc.createTextNode((index + 1) + '. ' + row.label));\n    choices.append(label);\n    radios.push(radio);\n  });\n  svg.addEventListener('click', event => {\n    const mark = event.target.closest('[data-ex-point]');\n    if (mark) radios[Number(mark.getAttribute('data-ex-point'))].click();\n  });\n  view.prepend(plot,choices);\n  choose(selected);\n  if (!previous) details.open = false;\n  if (hadFocus) radios[selected].focus();\n}\n\nif (typeof document !== 'undefined') {\n  document.querySelectorAll('figure[data-ex-data-chart]').forEach(enhanceDataChart);\n}\n","product-accents.css":"/* MIT. Load after core/tokens.css. Apply the accent and appearance to one element. */\n[data-ex-accent=\"coast\"] {\n  --accent-light-edge-1: #216C80;\n  --accent-light-edge-2: #2764A2;\n  --accent-light-edge-3: #5659A0;\n  --accent-light-edge-4: #796499;\n  --accent-light-link: #215F88;\n  --accent-light-focus: #286682;\n  --accent-light-selected: #DDEFF5;\n  --accent-light-on-selected: #154963;\n  --accent-dark-edge-1: #57CFCA;\n  --accent-dark-edge-2: #72BFF3;\n  --accent-dark-edge-3: #ADA7F4;\n  --accent-dark-edge-4: #D6AEE3;\n  --accent-dark-link: #8DE1E1;\n  --accent-dark-focus: #81DBDA;\n  --accent-dark-selected: #173740;\n  --accent-dark-on-selected: #B8F6F2;\n}\n[data-ex-accent=\"orchard\"] {\n  --accent-light-edge-1: #856019;\n  --accent-light-edge-2: #747529;\n  --accent-light-edge-3: #368052;\n  --accent-light-edge-4: #327768;\n  --accent-light-link: #386234;\n  --accent-light-focus: #456B24;\n  --accent-light-selected: #E5F1DD;\n  --accent-light-on-selected: #315522;\n  --accent-dark-edge-1: #F2C871;\n  --accent-dark-edge-2: #CCCE87;\n  --accent-dark-edge-3: #88CB98;\n  --accent-dark-edge-4: #6DCEB4;\n  --accent-dark-link: #B5DEA3;\n  --accent-dark-focus: #C0E89F;\n  --accent-dark-selected: #253A27;\n  --accent-dark-on-selected: #D7EBCD;\n}\n:is([data-ex-accent=\"coast\"], [data-ex-accent=\"orchard\"]):is([data-ex-theme=\"light\"], [data-ex-theme=\"system\"]) {\n  --ex-spectrum-1: var(--accent-light-edge-1);\n  --ex-spectrum-2: var(--accent-light-edge-2);\n  --ex-spectrum-3: var(--accent-light-edge-3);\n  --ex-spectrum-4: var(--accent-light-edge-4);\n  --ex-link: var(--accent-light-link);\n  --ex-focus: var(--accent-light-focus);\n  --ex-selected-bg: var(--accent-light-selected);\n  --ex-selected-text: var(--accent-light-on-selected);\n}\n:is([data-ex-accent=\"coast\"], [data-ex-accent=\"orchard\"])[data-ex-theme=\"dark\"] {\n  --ex-spectrum-1: var(--accent-dark-edge-1);\n  --ex-spectrum-2: var(--accent-dark-edge-2);\n  --ex-spectrum-3: var(--accent-dark-edge-3);\n  --ex-spectrum-4: var(--accent-dark-edge-4);\n  --ex-link: var(--accent-dark-link);\n  --ex-focus: var(--accent-dark-focus);\n  --ex-selected-bg: var(--accent-dark-selected);\n  --ex-selected-text: var(--accent-dark-on-selected);\n}\n@media (prefers-color-scheme: dark) {\n  :is([data-ex-accent=\"coast\"], [data-ex-accent=\"orchard\"])[data-ex-theme=\"system\"] {\n    --ex-spectrum-1: var(--accent-dark-edge-1);\n    --ex-spectrum-2: var(--accent-dark-edge-2);\n    --ex-spectrum-3: var(--accent-dark-edge-3);\n    --ex-spectrum-4: var(--accent-dark-edge-4);\n    --ex-link: var(--accent-dark-link);\n    --ex-focus: var(--accent-dark-focus);\n    --ex-selected-bg: var(--accent-dark-selected);\n    --ex-selected-text: var(--accent-dark-on-selected);\n  }\n}\n","prose.css":"/* MIT. Apply ex-prose to the element containing the headings, paragraphs and lists. */\n.ex-prose > h2 {\n  margin-block-end: var(--ex-space-4);\n}\n\n.ex-prose > :is(p, ul, ol) + :is(p, ul, ol) {\n  margin-block-start: var(--ex-space-4);\n}\n\n.ex-prose > h3 {\n  margin-block: var(--ex-space-8) var(--ex-space-3);\n}\n\n.ex-prose > :first-child {\n  margin-block-start: 0;\n}\n\n.ex-prose > :is(p, ul, ol) {\n  max-inline-size: var(--ex-measure);\n  color: var(--ex-text-secondary);\n  line-height: 1.65;\n}\n\n.ex-prose :is(ul, ol):not([class]) {\n  padding-inline-start: 1.5em;\n  margin-block-end: 0;\n}\n\n.ex-prose :is(ul, ol):not([class]) > li {\n  padding-inline-start: var(--ex-space-1);\n}\n\n.ex-prose :is(ul, ol):not([class]) > li + li {\n  margin-block-start: var(--ex-space-2);\n}\n\n.ex-prose :is(ul, ol):not([class]) :is(ol, ul) {\n  margin-block-start: var(--ex-space-2);\n}\n.ex-prose > .ex-notice + :is(h1,h2,h3) {\n  margin-block-start: var(--ex-space-4);\n}\n","recipes/bar-chart.html":"<figure class=\"ex-chart\" data-ex-chart=\"bar\">\n  <figcaption>Notebook activity by subject</figcaption>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Notebook activity by subject</caption>\n      <thead><tr><th scope=\"col\">Subject</th><th scope=\"col\" data-ex-summary=\"Coast had the most saves (32), followed by City (24).\">Saved</th><th scope=\"col\" data-ex-summary=\"City had the most shares (15), three more than Coast.\">Shared</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Coast</th><td>32</td><td>12</td></tr><tr><th scope=\"row\">City</th><td>24</td><td>15</td></tr><tr><th scope=\"row\">Forest</th><td>18</td><td>9</td></tr><tr><th scope=\"row\">Highlands</th><td>12</td><td>5</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/bulk-selection-actions.html":"<fieldset class=\"ex-bulk\" data-ex-bulk>\n  <legend>Draft notebooks</legend>\n  <ul class=\"ex-bulk-list\" role=\"list\">\n    <li data-row-id=\"coast\"><label data-bulk-name>Coast walks</label><span>Field notes</span></li>\n    <li data-row-id=\"city\"><label data-bulk-name>City sketches</label><span>Sketchbook</span></li>\n    <li data-row-id=\"woodland\"><label data-bulk-name>Woodland walks</label><span>Field notes</span></li>\n    <li data-row-id=\"harbour\"><label data-bulk-name>Harbour lights</label><span>Photo journal</span></li>\n  </ul>\n</fieldset>","recipes/cards.html":"<div class=\"atlas-stack\" data-ex-recipe=\"cards\">\n  <article class=\"atlas-card\" aria-labelledby=\"atlas-card-title\"><div class=\"atlas-card-band\" aria-hidden=\"true\"></div>\n    <div class=\"atlas-card-body\"><h3 id=\"atlas-card-title\">Harbour walks</h3>\n      <p>Three quiet routes along the coast.</p>\n      <details><summary>View routes</summary><ul><li>East pier</li><li>Ferry steps</li><li>Lighthouse path</li></ul></details>\n    </div></article>\n</div>","recipes/date-range-picker.html":"<fieldset class=\"ex-date-range\" data-ex-date-range>\n  <legend>Reporting period</legend>\n  <div class=\"ex-range-actions\" data-range-tools hidden>\n    <button type=\"button\" class=\"ex-button ex-button--secondary\" data-range-preset=\"last-seven\">Last 7 days</button>\n    <button type=\"button\" class=\"ex-button ex-button--secondary\" data-range-preset=\"month\">This month</button>\n  </div>\n  <div class=\"ex-range-fields\">\n    <label class=\"ex-field\"><span class=\"ex-label\">Start date</span>\n      <input class=\"ex-input\" type=\"date\" name=\"start\" max=\"9999-12-31\" data-range-start>\n    </label>\n    <label class=\"ex-field\"><span class=\"ex-label\">End date</span>\n      <input class=\"ex-input\" type=\"date\" name=\"end\" max=\"9999-12-31\" data-range-end>\n    </label>\n  </div>\n  <p class=\"ex-error\" data-range-error hidden></p>\n  <div class=\"ex-range-actions\" data-range-tools hidden>\n    <button type=\"button\" class=\"ex-button ex-button--primary\" data-range-apply>Apply range</button>\n    <button type=\"button\" class=\"ex-button ex-button--quiet\" data-range-clear>Clear</button>\n  </div>\n  <p class=\"ex-hint\" data-range-status role=\"status\"></p>\n</fieldset>","recipes/destructive-dialogs.html":"<div class=\"atlas-stack\" data-ex-recipe=\"destructive-dialogs\">\n  <div class=\"atlas-list-row\" data-item><span class=\"atlas-item-label\">Harbour sketches</span>\n    <button class=\"ex-button ex-button--danger\" type=\"button\" data-open>Delete notebook</button></div>\n  <p class=\"atlas-status\" role=\"status\"></p>\n  <div class=\"atlas-actions\" data-restore hidden><button class=\"ex-button ex-button--secondary\" type=\"button\" data-undo>Restore sample notebook</button></div>\n  <dialog class=\"ex-dialog\" id=\"atlas-delete-dialog\" role=\"alertdialog\"\n  aria-labelledby=\"atlas-delete-title\" aria-describedby=\"atlas-delete-reason\">\n  <div class=\"ex-dialog-body atlas-dialog-copy\"><span class=\"atlas-signal atlas-error\"><span class=\"ex-icon ex-icon--warning\" aria-hidden=\"true\"></span></span>\n    <h3 id=\"atlas-delete-title\">Delete Harbour sketches?</h3><p id=\"atlas-delete-reason\">This removes the sample notebook from this list.</p></div>\n  <div class=\"ex-dialog-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" data-cancel>Keep notebook</button>\n    <button class=\"ex-button ex-button--danger\" type=\"button\" data-confirm>Delete notebook</button></div>\n</dialog>\n</div>","recipes/dividers.html":"<div class=\"atlas-stack\" data-ex-recipe=\"dividers\">\n  <fieldset class=\"atlas-fieldset\"><legend class=\"ex-label\">Divider style</legend><div class=\"atlas-radio-options\"><label class=\"ex-selection\" for=\"atlas-divider-width-0\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-divider-width-0\" name=\"atlas-divider-width\" value=\"Full width\" checked> Full width</label><label class=\"ex-selection\" for=\"atlas-divider-width-1\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-divider-width-1\" name=\"atlas-divider-width\" value=\"Inset\"> Inset</label></div></fieldset>\n  <div class=\"atlas-divider-demo\"><p>Recent notebooks</p><hr class=\"ex-divider\"><p>Archived notebooks</p></div>\n</div>","recipes/editable-data-grid.html":"<div class=\"ex-data-grid\" data-ex-grid>\n  <div class=\"ex-grid-scroll\">\n    <table>\n      <caption>Notebook print run</caption>\n      <thead><tr>\n        <th scope=\"col\">Notebook</th>\n        <th scope=\"col\" data-field=\"editor\" data-type=\"text\" data-required data-maxlength=\"40\">Editor</th>\n        <th scope=\"col\" data-field=\"copies\" data-type=\"number\" data-required data-min=\"0\" data-max=\"5000\" data-step=\"1\">Copies</th>\n      </tr></thead>\n      <tbody>\n        <tr data-row-id=\"coast\"><th scope=\"row\">Coast walks</th><td>Ada</td><td>120</td></tr>\n        <tr data-row-id=\"city\"><th scope=\"row\">City notes</th><td>Sam</td><td>80</td></tr>\n        <tr data-row-id=\"forest\"><th scope=\"row\">Forest paths</th><td>Lin</td><td>60</td></tr>\n      </tbody>\n    </table>\n  </div>\n</div>","recipes/filter-chips.html":"<div class=\"atlas-stack\" data-ex-recipe=\"filter-chips\">\n  <fieldset class=\"atlas-fieldset\"><legend class=\"ex-label\">Show notebooks about</legend>\n    <div class=\"ex-filter-chips\"><label class=\"ex-filter-chip\" for=\"atlas-chip-coast\"><input type=\"checkbox\" id=\"atlas-chip-coast\" value=\"coast\"><span><span class=\"ex-icon ex-icon--check ex-chip-check\" aria-hidden=\"true\"></span>Coast</span></label>\n    <label class=\"ex-filter-chip\" for=\"atlas-chip-city\"><input type=\"checkbox\" id=\"atlas-chip-city\" value=\"city\"><span><span class=\"ex-icon ex-icon--check ex-chip-check\" aria-hidden=\"true\"></span>City</span></label></div></fieldset>\n  <ul class=\"atlas-rows\"><li data-topic=\"coast\">Tidal pools</li><li data-topic=\"city\">Market square</li><li data-topic=\"coast city\">Harbour streets</li></ul>\n  <p class=\"atlas-status\" role=\"status\">3 notebooks</p>\n</div>","recipes/grouped-bar-chart.html":"<figure class=\"ex-chart\" data-ex-chart=\"grouped-bar\">\n  <figcaption>Change in saved notebooks</figcaption>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Change in saved notebooks</caption>\n      <thead><tr><th scope=\"col\">Subject</th><th scope=\"col\" data-ex-summary=\"In May, Coast gained 12 saves and City lost 4.\">May</th><th scope=\"col\" data-ex-summary=\"In June, Coast gained 8 saves and City gained 6.\">June</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Coast</th><td>12</td><td>8</td></tr><tr><th scope=\"row\">City</th><td>-4</td><td>6</td></tr><tr><th scope=\"row\">Forest</th><td>3</td><td>-2</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/line-chart.html":"<figure class=\"ex-chart\" data-ex-chart=\"line\">\n  <figcaption>Notebook activity by week</figcaption>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Notebook activity by week</caption>\n      <thead><tr><th scope=\"col\">Week</th><th scope=\"col\" data-ex-summary=\"Weekly saves rose from 12 to 30, with a dip in week 3.\">Saved</th><th scope=\"col\" data-ex-summary=\"Weekly shares rose from 5 to 16. Week 3 has no reading.\">Shared</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Week 1</th><td>12</td><td>5</td></tr><tr><th scope=\"row\">Week 2</th><td>18</td><td>7</td></tr><tr><th scope=\"row\">Week 3</th><td>15</td><td data-ex-missing>No data</td></tr><tr><th scope=\"row\">Week 4</th><td>23</td><td>9</td></tr><tr><th scope=\"row\">Week 5</th><td>26</td><td>13</td></tr><tr><th scope=\"row\">Week 6</th><td>30</td><td>16</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/multi-line-chart.html":"<figure class=\"ex-chart\" data-ex-chart=\"multi-line\">\n  <figcaption>Guide visits by week</figcaption>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Guide visits by week</caption>\n      <thead><tr><th scope=\"col\">Week</th><th scope=\"col\" data-ex-summary=\"Trail visits rose from 18 to 42.\">Trail guides</th><th scope=\"col\" data-ex-summary=\"City visits fell from 35 to 27. Week 3 has no reading.\">City guides</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Week 1</th><td>18</td><td>35</td></tr><tr><th scope=\"row\">Week 2</th><td>24</td><td>31</td></tr><tr><th scope=\"row\">Week 3</th><td>28</td><td data-ex-missing>No data</td></tr><tr><th scope=\"row\">Week 4</th><td>31</td><td>33</td></tr><tr><th scope=\"row\">Week 5</th><td>38</td><td>30</td></tr><tr><th scope=\"row\">Week 6</th><td>42</td><td>27</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/multi-step-form.html":"<form class=\"ex-step-form\" data-ex-step-form method=\"dialog\" aria-label=\"Project setup\" data-confirm=\"Create project\" data-success=\"Project created.\">\n  <fieldset data-ex-step=\"Details\">\n    <legend tabindex=\"-1\">Project details</legend>\n    <div class=\"ex-field\" data-ex-field=\"Project name\" data-required-message=\"Enter a project name.\">\n      <label class=\"ex-step-label\">Project name\n        <input class=\"ex-input\" name=\"projectName\" type=\"text\" required maxlength=\"80\" pattern=\".*\\S.*\" title=\"Include at least one non-space character.\">\n      </label>\n    </div>\n  </fieldset>\n  <fieldset data-ex-step=\"Template\">\n    <legend tabindex=\"-1\">Choose a template</legend>\n    <div data-ex-field=\"Starting template\" data-required-message=\"Choose a template.\">\n      <label class=\"ex-step-choice\"><input type=\"radio\" name=\"template\" value=\"blank\" required> Blank project</label>\n      <label class=\"ex-step-choice\"><input type=\"radio\" name=\"template\" value=\"field-notes\" required> Field notes</label>\n    </div>\n  </fieldset>\n  <fieldset data-ex-step=\"Review\" hidden>\n    <legend tabindex=\"-1\">Review your project</legend>\n    <dl data-ex-review></dl>\n  </fieldset>\n  <noscript>These fields work without JavaScript. Enable it to try the review and confirmation.</noscript>\n</form>","recipes/not-found.html":"<div class=\"atlas-missing\" data-ex-recipe=\"not-found\">\n  <span class=\"atlas-http-code\" aria-hidden=\"true\">404</span>\n  <div class=\"atlas-stack\"><h1>Page not found</h1>\n    <p>This page may have moved, or its address may be incomplete.</p>\n    <div class=\"atlas-actions\"><a class=\"ex-button ex-button--primary\" href=\"/design-system/components/\">Browse components</a>\n      <a class=\"ex-button ex-button--quiet\" href=\"/design-system/search/\"><span class=\"ex-icon ex-icon--search\" aria-hidden=\"true\"></span> Search the guide</a></div>\n  </div>\n</div>","recipes/pie-chart.html":"<figure class=\"ex-chart ex-data-chart\" data-ex-data-chart=\"pie\">\n  <figcaption>Subjects in the notebook</figcaption>\n  <p>Coast accounts for two fifths of the 60 entries.</p>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Subjects in the notebook</caption>\n      <thead><tr><th scope=\"col\">Subject</th><th scope=\"col\">Entries</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Coast</th><td>24</td></tr><tr><th scope=\"row\">City</th><td>18</td></tr><tr><th scope=\"row\">Forest</th><td>12</td></tr><tr><th scope=\"row\">Highlands</th><td>6</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/radar-chart.html":"<figure class=\"ex-chart ex-data-chart\" data-ex-data-chart=\"radar\" data-ex-max=\"5\">\n  <figcaption>Woodland route scores</figcaption>\n  <p>Shade ranks highest and access lowest on the same five-point scale.</p>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Woodland route scores</caption>\n      <thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Score</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Views</th><td>4</td></tr><tr><th scope=\"row\">Shade</th><td>5</td></tr><tr><th scope=\"row\">Access</th><td>2</td></tr><tr><th scope=\"row\">Wayfinding</th><td>4</td></tr><tr><th scope=\"row\">Quiet</th><td>3</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/radio-buttons.html":"<div class=\"atlas-stack\" data-ex-recipe=\"radio-buttons\">\n  <fieldset class=\"atlas-fieldset\"><legend class=\"ex-label\">Reading order</legend><div class=\"atlas-radio-options\"><label class=\"ex-selection\" for=\"atlas-reading-0\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-reading-0\" name=\"atlas-reading\" value=\"Newest first\" checked> Newest first</label><label class=\"ex-selection\" for=\"atlas-reading-1\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-reading-1\" name=\"atlas-reading\" value=\"Oldest first\"> Oldest first</label></div></fieldset>\n  <ol class=\"atlas-rows\" aria-label=\"Notebooks in reading order\"><li>Autumn notes</li><li>Spring notes</li></ol>\n  <p class=\"atlas-status\" role=\"status\"></p>\n</div>","recipes/scatter-plot.html":"<figure class=\"ex-chart ex-data-chart\" data-ex-data-chart=\"scatter\">\n  <figcaption>Distance and bird species on five walks</figcaption>\n  <p>The longest walk recorded fewer species than the woodland walk.</p>\n  <details open>\n    <summary>View data table</summary>\n    <table><caption>Distance and bird species on five walks</caption>\n      <thead><tr><th scope=\"col\">Walk</th><th scope=\"col\">Distance (km)</th><th scope=\"col\">Bird species</th></tr></thead>\n      <tbody><tr><th scope=\"row\">Canal</th><td>2</td><td>5</td></tr><tr><th scope=\"row\">Beach</th><td>3</td><td>8</td></tr><tr><th scope=\"row\">Woodland</th><td>4</td><td>14</td></tr><tr><th scope=\"row\">Moor</th><td>6</td><td>9</td></tr><tr><th scope=\"row\">Ridge</th><td>8</td><td>11</td></tr></tbody>\n    </table>\n  </details>\n</figure>","recipes/sheets.html":"<div class=\"atlas-stack\" data-ex-recipe=\"sheets\">\n  <div class=\"atlas-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" id=\"atlas-open-settings\">Reading settings</button></div>\n  <p class=\"atlas-note\" data-note>A slow walk by the harbour.</p>\n  <p class=\"atlas-status\" role=\"status\"></p>\n  <dialog class=\"ex-dialog ex-sheet ex-sheet--responsive\" id=\"atlas-settings\" aria-labelledby=\"atlas-sheet-title\">\n    <div class=\"ex-dialog-header\"><h3 id=\"atlas-sheet-title\" tabindex=\"-1\">Reading settings</h3></div>\n    <div class=\"ex-dialog-body\"><fieldset class=\"atlas-fieldset\"><legend class=\"ex-label\">Text size</legend><div class=\"atlas-radio-options\"><label class=\"ex-selection\" for=\"atlas-sheet-size-0\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-sheet-size-0\" name=\"atlas-sheet-size\" value=\"Standard\" checked> Standard</label><label class=\"ex-selection\" for=\"atlas-sheet-size-1\"><input class=\"ex-radio\" type=\"radio\" id=\"atlas-sheet-size-1\" name=\"atlas-sheet-size\" value=\"Large\"> Large</label></div></fieldset></div>\n    <div class=\"ex-dialog-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" data-sheet-close>Cancel</button>\n      <button class=\"ex-button ex-button--primary\" type=\"button\" data-apply>Apply size</button></div>\n  </dialog>\n</div>","recipes/text-fields.html":"<form class=\"atlas-stack\" data-ex-recipe=\"text-fields\">\n  <div class=\"ex-field\"><label class=\"ex-label\" for=\"atlas-notebook\">Notebook name</label>\n    <input class=\"ex-input\" id=\"atlas-notebook\" required maxlength=\"60\" aria-describedby=\"atlas-name-help\">\n    <span id=\"atlas-name-help\" class=\"ex-hint\">Up to 60 characters.</span>\n    <span id=\"atlas-name-error\" class=\"ex-error\" hidden>Enter a notebook name.</span></div>\n  <div class=\"atlas-actions\"><button class=\"ex-button ex-button--primary\" type=\"submit\">Save name</button></div>\n  <p class=\"atlas-status\" role=\"status\"></p>\n</form>","recipes/toolbars.html":"<div class=\"atlas-stack\" data-ex-recipe=\"toolbars\">\n  <div class=\"ex-context-toolbar\" aria-label=\"Note formatting\">\n    <button type=\"button\" class=\"ex-button ex-button--secondary\" data-style=\"bold\" aria-pressed=\"false\">Bold</button>\n    <button type=\"button\" class=\"ex-button ex-button--secondary\" data-style=\"italic\" aria-pressed=\"false\">Italic</button>\n    <button type=\"button\" class=\"ex-button ex-button--secondary\" data-style=\"underline\" aria-pressed=\"false\">Underline</button></div>\n  <p class=\"atlas-note\" data-note>The morning ferry leaves at eight.</p>\n</div>","recipes/tooltips.html":"<div class=\"atlas-stack\" data-ex-recipe=\"tooltips\">\n  <div class=\"atlas-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" id=\"atlas-save\" aria-pressed=\"false\"><span class=\"ex-icon ex-icon--add\" aria-hidden=\"true\"></span> Save notebook</button>\n    <span class=\"ex-tooltip\" id=\"atlas-save-tip\" hidden>Keep this notebook in your reading list.</span></div>\n  <p class=\"atlas-status\" role=\"status\"></p>\n</div>","recipes/warning-dialogs.html":"<div class=\"atlas-stack\" data-ex-recipe=\"warning-dialogs\">\n  <div class=\"ex-field\"><label class=\"ex-label\" for=\"atlas-draft\">Draft note</label>\n    <textarea class=\"ex-input\" id=\"atlas-draft\" rows=\"2\" maxlength=\"280\">The harbour at dusk.</textarea></div>\n  <div class=\"atlas-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" data-open>Leave draft</button></div>\n  <dialog class=\"ex-dialog\" id=\"atlas-draft-dialog\" role=\"alertdialog\"\n  aria-labelledby=\"atlas-draft-title\" aria-describedby=\"atlas-draft-reason\">\n  <div class=\"ex-dialog-body atlas-dialog-copy\"><span class=\"atlas-signal atlas-warning\"><span class=\"ex-icon ex-icon--warning\" aria-hidden=\"true\"></span></span>\n    <h3 id=\"atlas-draft-title\">Leave this draft?</h3><p id=\"atlas-draft-reason\">Leaving clears the unsaved text in this sample.</p></div>\n  <div class=\"ex-dialog-actions\"><button class=\"ex-button ex-button--secondary\" type=\"button\" data-cancel>Keep editing</button>\n    <button class=\"ex-button ex-button--primary\" type=\"button\" data-confirm>Leave without saving</button></div>\n</dialog>\n  <p class=\"atlas-status\" role=\"status\"></p>\n</div>","step-form.css":"/* MIT. Load after Evolutive X core tokens and components. */\n.ex-step-form {\n  display: grid;\n  gap: var(--ex-space-5);\n  min-inline-size: 0;\n  max-inline-size: 38rem;\n  color: var(--ex-text);\n  font-family: var(--ex-font-sans);\n}\n.ex-step-form [hidden] { display: none; }\n.ex-step-form fieldset { min-inline-size: 0; padding: 0; border: 0; margin: 0; }\n.ex-step-form legend, .ex-step-form .ex-step-complete {\n  margin: 0;\n  padding: 0;\n  font-size: var(--ex-h3-size);\n  font-weight: var(--ex-h3-weight);\n  line-height: var(--ex-h3-leading);\n  overflow-wrap: anywhere;\n}\n.ex-step-form legend { margin-block-end: var(--ex-space-4); }\n.ex-step-label { display: grid; gap: var(--ex-space-2); color: var(--ex-text); font-weight: var(--ex-label-weight); }\n.ex-step-form .ex-input { box-sizing: border-box; inline-size: 100%; }\n.ex-step-choice {\n  display: flex;\n  align-items: center;\n  gap: var(--ex-space-2);\n  min-block-size: var(--ex-control-height);\n  width: fit-content;\n  max-width: 100%;\n  cursor: pointer;\n}\n.ex-step-choice input { inline-size: 1.15em; block-size: 1.15em; flex: none; margin: 0; accent-color: var(--ex-link); }\n.ex-step-choice input:focus-visible, .ex-step-form legend:focus-visible, .ex-step-complete:focus-visible {\n  outline: var(--ex-focus-width) solid var(--ex-focus);\n  outline-offset: var(--ex-focus-offset);\n}\n.ex-step-form .ex-steps {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.25rem), 1fr));\n  list-style: none;\n  margin: 0;\n  padding: 0;\n  gap: var(--ex-space-2);\n}\n.ex-step-form .ex-steps li {\n  min-inline-size: 0;\n  margin: 0;\n  padding-block-start: var(--ex-space-2);\n  border-block-start: 2px solid var(--ex-border);\n  color: var(--ex-text-secondary);\n  font-size: var(--ex-compact-size);\n  overflow-wrap: anywhere;\n}\n.ex-step-form .ex-steps [aria-current=\"step\"] { border-color: var(--ex-link); color: var(--ex-text); font-weight: var(--ex-weight-semibold); }\n.ex-step-form [data-ex-review] { display: grid; gap: var(--ex-space-3); margin: 0; }\n.ex-step-form [data-ex-review] div { display: grid; gap: var(--ex-space-1); border-block-end: 1px solid var(--ex-border); padding-block-end: var(--ex-space-3); }\n.ex-step-form [data-ex-review] dt { color: var(--ex-text-secondary); font-size: var(--ex-compact-size); }\n.ex-step-form [data-ex-review] dd { margin: 0; overflow-wrap: anywhere; }\n.ex-step-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ex-space-2); }\n.ex-step-form .ex-step-error { margin: var(--ex-space-2) 0 0; color: var(--ex-error); }\n.ex-step-form .ex-step-status { margin: 0; font-size: var(--ex-compact-size); }\n.ex-step-form .ex-step-status:empty { block-size: 0; margin-block-start: calc(-1 * var(--ex-space-5)); }\n.ex-step-form [aria-disabled=\"true\"] { cursor: progress; }\n@media (forced-colors: active) {\n  .ex-step-form .ex-steps [aria-current=\"step\"] { border-block-start: 4px double Highlight; }\n}\n","step-form.mjs":"// MIT. Mark input stages with data-ex-step and name each group with data-ex-field.\nconst instances = new WeakMap();\nlet errorSequence = 0;\n\nfunction controlsIn(group) {\n  return Array.from(group.querySelectorAll('input, select, textarea')).filter(control =>\n    control.name && !control.matches(':disabled') && control.type !== 'hidden');\n}\n\nfunction displayedValues(group) {\n  return controlsIn(group).flatMap(control => {\n    if (control.type === 'radio' || control.type === 'checkbox') {\n      return control.checked ? [control.labels[0]?.textContent.trim() || control.value] : [];\n    }\n    if (control.tagName === 'SELECT') return Array.from(control.selectedOptions, option => option.label);\n    if (control.type === 'file') return Array.from(control.files, file => file.name);\n    if (control.type === 'password') return control.value ? ['Entered'] : [];\n    return control.value.trim() ? [control.value.trim()] : [];\n  });\n}\n\n/**\n * Mount or configure a form. The last step contains [data-ex-review].\n * onSubmit({formData, signal}) receives a snapshot of every named field.\n * Resolve after durable submission and reject on failure to keep the answers.\n * The example confirms locally when no callback is supplied. destroy() aborts\n * a pending request and releases DOM listeners when the form unmounts.\n */\nexport function enhanceStepForm(form, options = {}) {\n  if (!form || form.tagName !== 'FORM') return null;\n  const existing = instances.get(form);\n  if (existing) {\n    if (Object.hasOwn(options, 'onSubmit')) existing.configure(options.onSubmit);\n    return existing.api;\n  }\n  const steps = Array.from(form.querySelectorAll('fieldset[data-ex-step]'));\n  const review = steps.at(-1)?.querySelector('[data-ex-review]');\n  const headings = steps.map(step => step.querySelector(':scope > legend'));\n  if (steps.length < 2 || !review || headings.includes(null)) return null;\n\n  const doc = form.ownerDocument;\n  const make = (tag, className, text) => {\n    const node = doc.createElement(tag);\n    if (className) node.className = className;\n    if (text) node.textContent = text;\n    return node;\n  };\n  const button = (label, style, type = 'button') => {\n    const node = make('button', 'ex-button ex-button--' + style, label);\n    node.type = type;\n    return node;\n  };\n  const progress = make('ol', 'ex-steps');\n  progress.setAttribute('aria-label', 'Form progress');\n  progress.setAttribute('role', 'list');\n  for (const [index, step] of steps.entries()) {\n    progress.append(make('li', '', (index + 1) + '. ' + step.dataset.exStep));\n  }\n  const actions = make('div', 'ex-step-actions');\n  const back = button('Back', 'secondary');\n  const forward = button('Continue', 'primary', 'submit');\n  actions.append(back, forward);\n  const confirmation = make('h3', 'ex-step-complete');\n  confirmation.tabIndex = -1;\n  const restart = button('Start again', 'secondary');\n  restart.hidden = confirmation.hidden = true;\n  const status = make('p', 'ex-step-status');\n  status.setAttribute('role', 'status');\n  form.prepend(progress);\n  form.append(actions, status, confirmation, restart);\n\n  const previousNoValidate = form.noValidate;\n  const previousHidden = steps.map(step => step.hidden);\n  const headingTab = headings.map(heading => heading.getAttribute('tabindex'));\n  for (const heading of headings) heading.tabIndex = -1;\n  form.noValidate = true;\n  const errors = new Map();\n  let current = 0, pending = null, completed = false, onSubmit = options.onSubmit;\n\n  function clearError(group) {\n    const error = errors.get(group);\n    if (!error) return;\n    for (const [control, invalid] of error.original) {\n      const remaining = (control.getAttribute('aria-describedby') || '').split(/\\s+/).filter(id => id && id !== error.node.id);\n      if (remaining.length) control.setAttribute('aria-describedby', remaining.join(' '));\n      else control.removeAttribute('aria-describedby');\n      if (invalid == null) control.removeAttribute('aria-invalid');\n      else control.setAttribute('aria-invalid', invalid);\n    }\n    error.node.remove();\n    errors.delete(group);\n  }\n\n  function showError(control) {\n    const group = control.closest('[data-ex-field]') || control.closest('fieldset');\n    clearError(group);\n    const message = control.validity.valueMissing && group.dataset.requiredMessage ||\n      control.validity.patternMismatch && control.title || control.validationMessage;\n    const node = make('p', 'ex-step-error', message);\n    node.id = 'ex-step-error-' + ++errorSequence;\n    const affected = control.type === 'radio'\n      ? controlsIn(group).filter(item => item.type === 'radio' && item.name === control.name)\n      : [control];\n    const original = affected.map(item => [item, item.getAttribute('aria-invalid')]);\n    for (const item of affected) {\n      item.setAttribute('aria-invalid', 'true');\n      item.setAttribute('aria-describedby', [item.getAttribute('aria-describedby'), node.id].filter(Boolean).join(' '));\n    }\n    group.append(node);\n    errors.set(group, {node, original});\n    control.focus();\n  }\n\n  function renderReview() {\n    review.replaceChildren();\n    for (const group of form.querySelectorAll('[data-ex-field]')) {\n      const row = make('div');\n      row.append(make('dt', '', group.dataset.exField), make('dd', '', displayedValues(group).join(', ') || 'None'));\n      review.append(row);\n    }\n  }\n  function showStep(index, focus = true) {\n    current = index;\n    steps.forEach((step, i) => {\n      step.hidden = i !== current;\n      if (i === current) progress.children[i].setAttribute('aria-current', 'step');\n      else progress.children[i].removeAttribute('aria-current');\n    });\n    back.hidden = current === 0;\n    const isReview = current === steps.length - 1;\n    forward.textContent = isReview ? form.dataset.confirm || 'Submit' : 'Continue';\n    if (isReview) renderReview();\n    status.textContent = '';\n    actions.hidden = progress.hidden = false;\n    confirmation.hidden = restart.hidden = true;\n    if (focus) headings[current].focus();\n  }\n  function busy(value) {\n    for (const node of [back, forward]) {\n      if (value) node.setAttribute('aria-disabled', 'true');\n      else node.removeAttribute('aria-disabled');\n    }\n  }\n  async function submit(event) {\n    event.preventDefault();\n    if (pending || completed) return;\n    const isReview = current === steps.length - 1;\n    for (const step of isReview ? steps.slice(0, -1) : [steps[current]]) {\n      const invalid = controlsIn(step).find(control => control.willValidate && !control.validity.valid);\n      if (invalid) {\n        if (step !== steps[current]) showStep(steps.indexOf(step), false);\n        showError(invalid);\n        return;\n      }\n    }\n    if (!isReview) {\n      showStep(current + 1);\n      return;\n    }\n    const request = new AbortController();\n    pending = request;\n    busy(true);\n    const callback = onSubmit;\n    status.textContent = callback ? 'Submitting…' : '';\n    try {\n      await callback?.({formData: new FormData(form), signal: request.signal});\n      if (request.signal.aborted) return;\n      const focusHere = form.contains(doc.activeElement);\n      completed = true;\n      steps[current].hidden = actions.hidden = progress.hidden = true;\n      confirmation.textContent = callback ? form.dataset.success || 'Submitted.' : 'Demo complete.';\n      confirmation.hidden = restart.hidden = false;\n      status.textContent = focusHere ? '' : confirmation.textContent;\n      if (focusHere) confirmation.focus();\n    } catch {\n      if (!request.signal.aborted) status.textContent = 'Could not submit. Your answers are ready to retry.';\n    } finally {\n      if (!request.signal.aborted) { pending = null; busy(false); }\n    }\n  }\n  function goBack() { if (!pending && !completed && current > 0) showStep(current - 1); }\n  function startAgain() {\n    if (!completed) return;\n    form.reset();\n    for (const group of errors.keys()) clearError(group);\n    completed = false;\n    showStep(0);\n  }\n  function updateField(event) {\n    const group = event.target.closest('[data-ex-field], fieldset');\n    if (group && errors.has(group) && controlsIn(group).every(input => input.validity.valid)) clearError(group);\n  }\n  form.addEventListener('submit', submit);\n  form.addEventListener('input', updateField);\n  back.addEventListener('click', goBack);\n  restart.addEventListener('click', startAgain);\n  showStep(0, false);\n  const api = {destroy() {\n    if (!instances.has(form) || instances.get(form).api !== api) return;\n    pending?.abort();\n    form.removeEventListener('submit', submit);\n    form.removeEventListener('input', updateField);\n    back.removeEventListener('click', goBack);\n    restart.removeEventListener('click', startAgain);\n    for (const group of errors.keys()) clearError(group);\n    for (const node of [actions, progress, confirmation, restart, status]) node.remove();\n    review.replaceChildren();\n    steps.forEach((step, i) => {\n      step.hidden = previousHidden[i];\n      if (headingTab[i] == null) headings[i].removeAttribute('tabindex');\n      else headings[i].setAttribute('tabindex', headingTab[i]);\n    });\n    form.noValidate = previousNoValidate;\n    instances.delete(form);\n  }};\n  instances.set(form, {api, configure(callback) { onSubmit = callback; }});\n  return api;\n}\n\nif (typeof document !== 'undefined') {\n  document.querySelectorAll('form[data-ex-step-form]').forEach(form => enhanceStepForm(form));\n}\n","studio-theme.css":"@import \"./appearance.css\";\n/* Evolutive X design system 0.3.6.\n * Generated from tokens.json by generate_tokens.py. Edit the JSON source.\n * .ex-theme inherits colour from its nearest theme. Set\n * data-ex-theme=\"light|dark|system\" only to establish a theme boundary.\n */\n\n:root,\n.ex-theme,\n[data-ex-theme] {\n  --ex-font-sans: \"Inter\", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n  --ex-text-xs: 0.75rem;\n  --ex-text-sm: 0.875rem;\n  --ex-text-base: 1rem;\n  --ex-text-lg: 1.125rem;\n  --ex-text-xl: 1.25rem;\n  --ex-text-2xl: 1.5rem;\n  --ex-text-3xl: 2rem;\n  --ex-text-4xl: 2.5rem;\n  --ex-leading-tight: 1.15;\n  --ex-leading-heading: 1.25;\n  --ex-leading-body: 1.55;\n  --ex-tracking-heading: -0.035em;\n  --ex-tracking-body: 0;\n  --ex-weight-regular: 400;\n  --ex-weight-medium: 500;\n  --ex-weight-semibold: 600;\n  --ex-weight-bold: 700;\n  --ex-weight-display: 750;\n  --ex-space-0: 0;\n  --ex-space-1: 0.25rem;\n  --ex-space-2: 0.5rem;\n  --ex-space-3: 0.75rem;\n  --ex-space-4: 1rem;\n  --ex-space-5: 1.25rem;\n  --ex-space-6: 1.5rem;\n  --ex-space-8: 2rem;\n  --ex-space-10: 2.5rem;\n  --ex-space-12: 3rem;\n  --ex-space-16: 4rem;\n  --ex-space-20: 5rem;\n  --ex-space-24: 6rem;\n  --ex-radius-field: 0.625rem;\n  --ex-radius-panel: 0.875rem;\n  --ex-radius-button: 999px;\n  --ex-radius-small: 0.375rem;\n  --ex-control-height: 3rem;\n  --ex-control-height-compact: 2.75rem;\n  --ex-border-width: 1px;\n  --ex-border-width-strong: 2px;\n  --ex-focus-width: 2px;\n  --ex-focus-offset: 3px;\n  --ex-duration-fast: 120ms;\n  --ex-duration-normal: 180ms;\n  --ex-duration-slow: 240ms;\n  --ex-ease-standard: cubic-bezier(0.2, 0, 0, 1);\n  --ex-measure: 65ch;\n  --ex-layout-max: 80rem;\n  --ex-reading-max: 48rem;\n  --ex-radius-secondary: 0.625rem;\n  --ex-h1-size: 2.5rem;\n  --ex-h1-size-compact: 2rem;\n  --ex-h1-weight: 700;\n  --ex-h1-leading: 1.12;\n  --ex-h2-size: 1.75rem;\n  --ex-h2-size-compact: 1.5rem;\n  --ex-h2-weight: 650;\n  --ex-h2-leading: 1.2;\n  --ex-h3-size: 1.25rem;\n  --ex-h3-weight: 650;\n  --ex-h3-leading: 1.3;\n  --ex-body-size: 1rem;\n  --ex-body-weight: 400;\n  --ex-body-leading: 1.55;\n  --ex-compact-size: 0.875rem;\n  --ex-compact-leading: 1.5;\n  --ex-label-size: 0.875rem;\n  --ex-label-weight: 600;\n  --ex-label-leading: 1.4;\n  --ex-button-size: 1rem;\n  --ex-button-weight: 600;\n  --ex-button-leading: 1.4;\n  --ex-select-icon-size: 1.25rem;\n  --ex-select-icon-inset: 1rem;\n  --ex-select-text-gap: 0.75rem;\n  --ex-dialog-gutter: 1rem;\n  --ex-dialog-max-width: 32rem;\n}\n\n/* Light is the root fallback. Unthemed .ex-theme wrappers inherit colours;\n   only an explicit data attribute establishes a nested theme boundary. */\n:root,\n[data-ex-theme=\"light\"],\n[data-ex-theme=\"system\"] {\n  color-scheme: light;\n  --ex-bg: #F7F8FC;\n  --ex-surface: #FFFFFF;\n  --ex-surface-raised: #EEF1F8;\n  --ex-text: #141D32;\n  --ex-text-secondary: #3F4C66;\n  --ex-text-muted: #52617A;\n  --ex-border: #D5DCE8;\n  --ex-control-border: #6F7D95;\n  --ex-focus: #0051E6;\n  --ex-link: #004DFF;\n  --ex-error: #C20035;\n  --ex-error-bg: #FFF0F3;\n  --ex-success: #00704A;\n  --ex-success-bg: #E5FCF0;\n  --ex-warning: #A34100;\n  --ex-warning-bg: #FFF4CC;\n  --ex-disabled-bg: #E6EAF1;\n  --ex-disabled-text: #59657A;\n  --ex-primary-top: #FFFFFF;\n  --ex-primary-bottom: #EEF0FA;\n  --ex-primary-hover-top: #F1F4FC;\n  --ex-primary-hover-bottom: #E5E8F7;\n  --ex-primary-pressed: #DDE4F4;\n  --ex-spectrum-1: #007C91;\n  --ex-spectrum-2: #1555ED;\n  --ex-spectrum-3: #7726ED;\n  --ex-spectrum-4: #C20085;\n  --ex-secondary-hover: #EEF1F8;\n  --ex-secondary-pressed: #DDE4F4;\n  --ex-selected-bg: #E5ECFF;\n  --ex-selected-text: #003ECD;\n  --ex-shadow-raised: 0 8px 28px rgb(20 29 50 / 0.08);\n  --ex-shadow-primary-hover: 0 4px 18px rgb(68 78 174 / 0.14);\n  --ex-filled-text: #FFFFFF;\n  --ex-filled-default-1: #006A83;\n  --ex-filled-default-2: #1749D9;\n  --ex-filled-default-3: #6924CD;\n  --ex-filled-default-4: #AB006A;\n  --ex-filled-hover-1: #00768A;\n  --ex-filled-hover-2: #1956EF;\n  --ex-filled-hover-3: #7A2AE1;\n  --ex-filled-hover-4: #BD0077;\n  --ex-filled-pressed-1: #004F63;\n  --ex-filled-pressed-2: #1037AD;\n  --ex-filled-pressed-3: #50189E;\n  --ex-filled-pressed-4: #870052;\n}\n\n[data-ex-theme=\"dark\"] {\n  color-scheme: dark;\n  --ex-bg: #070B16;\n  --ex-surface: #0D1726;\n  --ex-surface-raised: #142136;\n  --ex-text: #F7F8FC;\n  --ex-text-secondary: #CCD4E2;\n  --ex-text-muted: #A6B4CA;\n  --ex-border: #334159;\n  --ex-control-border: #7488A6;\n  --ex-focus: #2DE2E6;\n  --ex-link: #39BCFF;\n  --ex-error: #FF6578;\n  --ex-error-bg: #381426;\n  --ex-success: #12E9A0;\n  --ex-success-bg: #092E24;\n  --ex-warning: #FFBF32;\n  --ex-warning-bg: #332409;\n  --ex-disabled-bg: #1C293D;\n  --ex-disabled-text: #99A9C2;\n  --ex-primary-top: #0B1628;\n  --ex-primary-bottom: #1C1230;\n  --ex-primary-hover-top: #152943;\n  --ex-primary-hover-bottom: #2D1F48;\n  --ex-primary-pressed: #243151;\n  --ex-spectrum-1: #2DE2E6;\n  --ex-spectrum-2: #538FFF;\n  --ex-spectrum-3: #A076FF;\n  --ex-spectrum-4: #FF41B9;\n  --ex-secondary-hover: #1B2B43;\n  --ex-secondary-pressed: #243151;\n  --ex-selected-bg: #152C52;\n  --ex-selected-text: #79C6FF;\n  --ex-shadow-raised: 0 12px 32px rgb(0 0 0 / 0.28);\n  --ex-shadow-primary-hover: 0 4px 18px rgb(102 112 230 / 0.2);\n  --ex-filled-text: #070B16;\n  --ex-filled-default-1: #2DE2E6;\n  --ex-filled-default-2: #5399FF;\n  --ex-filled-default-3: #AA85FF;\n  --ex-filled-default-4: #FF57BA;\n  --ex-filled-hover-1: #64F2EF;\n  --ex-filled-hover-2: #75AEFF;\n  --ex-filled-hover-3: #BF9BFF;\n  --ex-filled-hover-4: #FF80D2;\n  --ex-filled-pressed-1: #12BFCB;\n  --ex-filled-pressed-2: #4286F5;\n  --ex-filled-pressed-3: #996EEF;\n  --ex-filled-pressed-4: #EF44A9;\n}\n\n@media (prefers-color-scheme: dark) {\n  :root:not([data-ex-theme]),\n  [data-ex-theme=\"system\"] {\n    color-scheme: dark;\n    --ex-bg: #070B16;\n    --ex-surface: #0D1726;\n    --ex-surface-raised: #142136;\n    --ex-text: #F7F8FC;\n    --ex-text-secondary: #CCD4E2;\n    --ex-text-muted: #A6B4CA;\n    --ex-border: #334159;\n    --ex-control-border: #7488A6;\n    --ex-focus: #2DE2E6;\n    --ex-link: #39BCFF;\n    --ex-error: #FF6578;\n    --ex-error-bg: #381426;\n    --ex-success: #12E9A0;\n    --ex-success-bg: #092E24;\n    --ex-warning: #FFBF32;\n    --ex-warning-bg: #332409;\n    --ex-disabled-bg: #1C293D;\n    --ex-disabled-text: #99A9C2;\n    --ex-primary-top: #0B1628;\n    --ex-primary-bottom: #1C1230;\n    --ex-primary-hover-top: #152943;\n    --ex-primary-hover-bottom: #2D1F48;\n    --ex-primary-pressed: #243151;\n    --ex-spectrum-1: #2DE2E6;\n    --ex-spectrum-2: #538FFF;\n    --ex-spectrum-3: #A076FF;\n    --ex-spectrum-4: #FF41B9;\n    --ex-secondary-hover: #1B2B43;\n    --ex-secondary-pressed: #243151;\n    --ex-selected-bg: #152C52;\n    --ex-selected-text: #79C6FF;\n    --ex-shadow-raised: 0 12px 32px rgb(0 0 0 / 0.28);\n    --ex-shadow-primary-hover: 0 4px 18px rgb(102 112 230 / 0.2);\n    --ex-filled-text: #070B16;\n    --ex-filled-default-1: #2DE2E6;\n    --ex-filled-default-2: #5399FF;\n    --ex-filled-default-3: #AA85FF;\n    --ex-filled-default-4: #FF57BA;\n    --ex-filled-hover-1: #64F2EF;\n    --ex-filled-hover-2: #75AEFF;\n    --ex-filled-hover-3: #BF9BFF;\n    --ex-filled-hover-4: #FF80D2;\n    --ex-filled-pressed-1: #12BFCB;\n    --ex-filled-pressed-2: #4286F5;\n    --ex-filled-pressed-3: #996EEF;\n    --ex-filled-pressed-4: #EF44A9;\n  }\n}\n\n/* Durations are semantic too: consuming components need no special-case\n   motion animation to retain a coherent reduced-motion presentation. */\n@media (prefers-reduced-motion: reduce) {\n  :root,\n  .ex-theme,\n  [data-ex-theme] {\n    --ex-duration-fast: 0ms;\n    --ex-duration-normal: 0ms;\n    --ex-duration-slow: 0ms;\n  }\n}\n\n/* Keep text and background in the same theme on earlier review controls. */\n@media (prefers-reduced-motion: no-preference) {\n  .ex-button { transition-property: transform; transition-duration: var(--ex-duration-fast); }\n  .ex-input { transition: none; }\n}\n"}}
