/* ==========================================================================
   HBF Network interface system (release 7.7.0)
   Light pages, one accent, the platform UI font, a 4 px spacing grid.
   Website components, form controls and the application shell that every
   module uses. Tokens: docs/V770-PLAN.md section 2.
   ========================================================================== */

:root {
  color-scheme: light;
  --hbf-release:7.9.0;

  /* Colour tokens. Muted text (#6b7480) is used on the page colour only; on the
     grey surfaces secondary text uses --text-2, which keeps 4.5:1 there. */
  --page: #ffffff;
  --surface: #f5f7f9;
  --surface-2: #eceff3;
  --border: #d8dde3;
  --border-strong: #848e9a;   /* form control outlines: 3.3:1 on the page colour */
  --text: #18212b;
  --text-2: #4b5563;
  --muted: #6b7480;
  --accent: #0b5ea8;
  --accent-hover: #094c88;
  --accent-tint: #e8f0f8;
  --focus: #1d6fd6;
  --error: #b42318;
  --success: #1e7b3c;
  --graphics: #1f2329;
  --graphics-2: #2a2f36;
  --graphics-text: #e6e9ed;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Geometry */
  --radius: 6px;
  --radius-card: 8px;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 64px;
  --shadow-menu: 0 6px 20px rgba(24, 33, 43, .12);
  --shadow-header: 0 1px 3px rgba(24, 33, 43, .08);

  /* Compatibility names used by module styles that have not been converted yet. */
  --bg: var(--page);
  --bg-2: var(--surface);
  --panel: var(--page);
  --panel-2: var(--surface);
  --panel-3: var(--surface-2);
  --sunken: var(--surface);
  --ink: var(--text);
  --ink-2: var(--text-2);
  --faint: var(--text-2);
  --line: var(--border);
  --line-2: var(--border);
  --line-3: var(--border-strong);
  --cyan: var(--accent);
  --cyan-2: var(--accent);
  --violet: var(--accent);
  --primary: var(--accent);
  --primary-2: var(--accent-hover);
  --primary-fill: var(--accent);
  --primary-fill-2: var(--accent);
  --primary-fill-hover: var(--accent-hover);
  --primary-fill-hover-2: var(--accent-hover);
  --accent-dim: var(--accent-tint);
  --blue: var(--accent);
  --amber: var(--text-2);
  --red: var(--error);
  --green: var(--success);
  --pink: var(--accent);
  --shadow: none;
  --shadow-lg: none;
  --r-sm: var(--radius);
  --r-md: var(--radius-card);
  --r-lg: var(--radius-card);
  --r-xl: var(--radius-card);
  --shell: var(--container);
  --display: var(--font);
  --sans: var(--font);
  --track-display: 0;
  --track-caps: 0;
  --track-wide: 0;

  font-family: var(--font);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); text-wrap: balance; }
h1 { font-size: 40px; line-height: 48px; }
h2 { font-size: 28px; line-height: 36px; }
h3 { font-size: 20px; line-height: 28px; }
h4 { font-size: 16px; line-height: 24px; }
p { margin: 0 0 16px; text-wrap: pretty; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
li + li { margin-top: 4px; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

img, svg, canvas, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-tint); color: var(--text); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:is(input, select, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

code, kbd, samp, pre { font-family: var(--mono); font-size: .9em; }
pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

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

/* === v753 B09 platform === */
/* Skip navigation (WCAG 2.4.1) and focus not hidden under the sticky site bar (WCAG 2.4.11). The link is hidden by position only and shown
   on focus; html reserves the height of the sticky bar, which ui.mjs and site-motion.js keep equal to the measured height (this value is
   the fallback without script). The programmatic target shows no ring around the whole region. */
:root { --hbf-sticky-offset: 4.75rem; }
html { scroll-padding-top: var(--hbf-sticky-offset); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#main-content:focus { outline: none; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  max-width: calc(100vw - 24px);
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; color: #fff; outline: 2px solid var(--text); outline-offset: 2px; }
@media print { .skip-link { display: none; } }
/* === end v753 B09 === */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--surface); border-color: var(--text-2); color: var(--text); }
button:active, .button:active { background: var(--surface-2); }
button.primary, .button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: #fff; }
button.quiet, .button.quiet { border-color: transparent; background: transparent; color: var(--accent); }
button.quiet:hover, .button.quiet:hover { background: var(--accent-tint); color: var(--accent-hover); }
button:disabled, button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
button:disabled:hover { background: var(--page); border-color: var(--border-strong); }
button.primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.button.large { min-height: 44px; padding: 8px 20px; font-size: 16px; }

.buttonrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.buttonrow > button, .buttonrow > .button { max-width: 100%; white-space: normal; text-align: left; } /* a long label wraps in a narrow column */
.buttonrow:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

input, select, textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  line-height: 22px;
}
input:hover, select:hover, textarea:hover { border-color: var(--text-2); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
input[type="number"], input.num { font-variant-numeric: tabular-nums; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface); color: var(--text-2); cursor: not-allowed; }
textarea { min-height: 96px; font-family: var(--mono); font-size: 13px; line-height: 20px; resize: vertical; }
select { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--accent); flex: 0 0 auto; }
input[type="range"] { min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); }
/* R71-F05: a file control is its button and the chosen file name, within its column; the button looks like the app's buttons. */
input[type="file"] { width: auto; max-width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-2); font-size: 13px; line-height: 20px; }
input[type="file"]::file-selector-button { min-height: 32px; margin: 0 8px 0 0; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--page); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; line-height: 20px; cursor: pointer; }
input[type="file"]:hover::file-selector-button { border-color: var(--text-2); background: var(--surface); }
input[type="file"]:disabled { background: transparent; }
input[type="file"]:disabled::file-selector-button { opacity: .5; cursor: not-allowed; }
fieldset { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
legend { padding: 0 4px; color: var(--text); font-size: 14px; font-weight: 600; }

.field { margin: 12px 0; min-width: 0; }
.field label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; color: var(--text); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.field label > span { flex-shrink: 0; color: var(--text-2); font-weight: 400; }
.field label > .label-text { flex-shrink: 1; color: inherit; font-weight: inherit; }
.field small, .help, .source-note { display: block; margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 20px; }
.field small.field-error, .field-error, .message.error { color: var(--error); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--text); font-size: 14px; }
.check input { width: 16px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; }
.inline-check input { width: 16px; }

/* Plain messages next to a control or a result: never a box. */
.message { margin: 8px 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.message.error { color: var(--error); }
.message.ok { color: var(--success); }
.status { min-height: 20px; margin: 8px 0 0; color: var(--text-2); font-size: 13px; line-height: 20px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
td.num, th.num, td[data-numeric], .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { white-space: normal; } /* a long column heading wraps; the numbers below it stay on one line */
tbody tr:last-child > * { border-bottom: 0; }
caption { padding: 8px 12px; color: var(--text-2); text-align: left; font-size: 13px; caption-side: top; }
.tablewrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.tablewrap td small { display: block; color: var(--text-2); overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; }

/* --------------------------------------------------------------------------
   Disclosure, tabs, menus and dialogs
   -------------------------------------------------------------------------- */

details { margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
summary { padding: 8px 12px; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
summary:hover { background: var(--surface); }
details[open] > summary { border-bottom: 1px solid var(--border); }
details > :not(summary) { margin-inline: 12px; }
details > :last-child:not(summary) { margin-bottom: 12px; }

[role="tablist"] { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
[role="tab"] { min-height: 32px; margin-bottom: -1px; padding: 4px 12px; border: 1px solid transparent; border-radius: var(--radius) var(--radius) 0 0; background: transparent; color: var(--text-2); font-size: 13px; }
[role="tab"]:hover { background: var(--surface); color: var(--text); }
[role="tab"][aria-selected="true"] { border-color: var(--border); border-bottom-color: var(--page); background: var(--page); color: var(--text); font-weight: 600; }

.menu, [role="menu"] {
  min-width: 220px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--page);
  box-shadow: var(--shadow-menu);
}
[role="menu"] [role="menuitem"] {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}
[role="menu"] [role="menuitem"]:hover, [role="menu"] [role="menuitem"]:focus-visible { background: var(--accent-tint); color: var(--text); outline-offset: -2px; }
[role="menu"] [role="menuitem"]:disabled { background: transparent; opacity: .45; }
[role="menu"] [role="separator"] { height: 1px; margin: 4px 0; background: var(--border); }

dialog { max-width: min(560px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); color: var(--text); box-shadow: var(--shadow-menu); }
dialog::backdrop { background: rgba(24, 33, 43, .32); }
dialog h2 { margin-bottom: 12px; font-size: 20px; line-height: 28px; }

/* --------------------------------------------------------------------------
   Website: header
   -------------------------------------------------------------------------- */

.container { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.sitebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
  padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--border);
  background: var(--page);
}
.sitebar[data-scrolled="true"] { box-shadow: var(--shadow-header); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; flex: 0 0 28px; }

.site-nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.site-nav > a, .nav-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-nav > a:hover, .nav-menu > summary:hover { background: var(--surface); color: var(--text); }
.site-nav > a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-menu { position: relative; margin: 0; border: 0; background: transparent; }
.nav-menu > summary { list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -4px 0 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.nav-menu[open] > summary { background: var(--surface); border-bottom: 0; }
.nav-menu[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.nav-menu[data-current="true"] > summary { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; } /* R71-F04: one current-page mark */
.nav-menu > :not(summary) { margin: 0; }
.nav-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: min(640px, calc(100vw - 2 * var(--gutter)));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--page);
  box-shadow: var(--shadow-menu);
}
.nav-menu-panel ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.nav-menu-panel li { margin: 0; }
.nav-menu-panel li a { display: block; padding: 8px 12px; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.nav-menu-panel li a:hover { background: var(--surface); }
.nav-menu-panel li a[aria-current="page"] { background: var(--accent-tint); }
.nav-item-name { display: block; font-size: 16px; font-weight: 600; line-height: 24px; }
.nav-item-text { display: block; margin-top: 2px; color: var(--text-2); font-size: 14px; line-height: 20px; }
.nav-menu-all { display: block; margin: 4px 0 0; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-menu-all:hover { text-decoration: underline; }
.site-cta { flex: 0 0 auto; margin-left: auto; }

/* --------------------------------------------------------------------------
   Website: page sections
   -------------------------------------------------------------------------- */

.site-main { display: block; }
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section.alt { background: var(--surface); border-top: 0; }
.section.alt + .section { border-top: 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { margin: 0; color: var(--text-2); font-size: 18px; line-height: 28px; }
.section.alt .section-head p { color: var(--text-2); }

.hero { padding: 72px 0 80px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.hero-text { max-width: 760px; }
.hero h1 { margin-bottom: 20px; font-size: 48px; line-height: 56px; }
.hero-text p { max-width: 40rem; margin-bottom: 32px; color: var(--text-2); font-size: 18px; line-height: 28px; }
.nowrap { white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.product-shot { margin: 0; }
.product-shot img { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.product-shot figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 20px; }

.page-head { padding: 56px 0 48px; border-bottom: 1px solid var(--border); }
.page-head h1 { max-width: 22ch; margin-bottom: 16px; }
.page-head p { max-width: 42rem; margin: 0; color: var(--text-2); font-size: 18px; line-height: 28px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.product-grid > li { margin: 0; }
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--page);
}
.product-card:hover { border-color: var(--border-strong); }
.product-card h3 { margin-bottom: 8px; font-size: 20px; line-height: 28px; }
.product-card p { flex: 1 1 auto; margin: 0 0 16px; color: var(--text-2); font-size: 16px; line-height: 24px; }
.product-card .card-link { font-size: 16px; font-weight: 500; text-decoration: none; }
.product-card .card-link:hover { text-decoration: underline; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; }
.facts > div { padding-top: 16px; border-top: 2px solid var(--text); }
.facts dt { margin-bottom: 8px; font-size: 18px; font-weight: 600; line-height: 28px; }
.facts dd { margin: 0; color: var(--text-2); font-size: 16px; line-height: 24px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.steps > li { margin: 0; padding: 24px; counter-increment: step; }
.steps > li + li { border-left: 1px solid var(--border); }
.steps h3 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 20px; line-height: 28px; }
.steps h3::before { content: counter(step); color: var(--accent); font-variant-numeric: tabular-nums; }
.steps p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 24px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.split h2 { margin-bottom: 12px; }
.split p { color: var(--text-2); font-size: 18px; line-height: 28px; }
.text-link { font-weight: 500; }

.contact-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.contact-band h2 { margin-bottom: 8px; }
.contact-band p { margin: 0; color: var(--text-2); font-size: 18px; line-height: 28px; }
.contact-band .hero-actions { justify-content: flex-end; }

.prose { max-width: 720px; }
.prose h2 { margin: 48px 0 12px; font-size: 28px; line-height: 36px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 8px; font-size: 20px; line-height: 28px; }
.prose p, .prose li { color: var(--text-2); font-size: 16px; line-height: 26px; }

.product-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; padding: 56px 0; border-top: 1px solid var(--border); }
.product-section:first-child { border-top: 0; padding-top: 0; }
.product-section h2 { margin-bottom: 12px; font-size: 28px; line-height: 36px; }
.product-section .product-summary { color: var(--text-2); font-size: 18px; line-height: 28px; }
/* R71-F01 (decision D19 c): each module shows a capture of itself, taken from this build, above its features. */
.product-detail { min-width: 0; }
.product-section .product-shot { margin: 0 0 24px; }
.feature-list { margin: 0 0 24px; padding: 0; list-style: none; }
.feature-list li { position: relative; margin: 0; padding: 12px 0 12px 24px; border-bottom: 1px solid var(--border); font-size: 16px; line-height: 24px; }
.feature-list li:first-child { border-top: 1px solid var(--border); }
.feature-list li::before { content: ""; position: absolute; left: 5px; top: 21px; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); } /* a small square, never a dash (decision D9) */

.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; }
.contact-list > div { padding-top: 16px; border-top: 2px solid var(--text); }
.contact-list dt { margin-bottom: 8px; font-size: 18px; font-weight: 600; line-height: 28px; }
.contact-list dd { margin: 0; color: var(--text-2); font-size: 16px; line-height: 24px; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 8px; }
.email-address { font-size: 20px; font-weight: 600; line-height: 28px; overflow-wrap: anywhere; }
.contact-note { max-width: 40rem; margin: 0; color: var(--text-2); font-size: 16px; line-height: 24px; }
.subhead { margin: 40px 0 8px; font-size: 20px; line-height: 28px; }
.check-summary { max-width: 42rem; }
.check-help { max-width: 42rem; margin: 24px 0 0; color: var(--text-2); }
/* R71-F30: one small size on the site pages, 14 px (the status lines and the file control of the installation check). */
.site-main .status, .site-main input[type="file"], .site-main input[type="file"]::file-selector-button { font-size: 14px; }
.workflow-failures { margin: 8px 0; color: var(--error); overflow-wrap: anywhere; }   /* the failing files, by path (decision D7) */
.workflow-failures:empty { display: none; }

.facts-table { max-width: 720px; margin: 0; }
.facts-table > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.facts-table > div:first-child { border-top: 1px solid var(--border); }
.facts-table dt { color: var(--text-2); font-size: 16px; line-height: 24px; }
.facts-table dd { margin: 0; font-size: 16px; line-height: 24px; }

/* The 404 page keeps its 7.5.3 landmark markup (<main class="hero">); the hero spans the page and sits above the footer. */
main.hero { width: auto; min-height: calc(100vh - var(--header-h) - 360px); margin: 0; border-bottom: 0; }
.error-page { padding: 96px 0 112px; }
.error-page h1 { max-width: 20ch; margin-bottom: 16px; }
.error-page p { max-width: 36rem; color: var(--text-2); font-size: 18px; line-height: 28px; }

/* --------------------------------------------------------------------------
   Website: footer
   -------------------------------------------------------------------------- */

.site-footer { margin-top: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 14px; line-height: 22px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; padding: 48px 0 32px; }
.footer-brand p { max-width: 22rem; margin: 12px 0 0; color: var(--text-2); }
.footer-nav { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-nav h2 { margin: 0 0 12px; color: var(--text); font-size: 14px; font-weight: 600; line-height: 20px; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav li { margin: 0 0 8px; }
.footer-nav li a { color: var(--text-2); text-decoration: none; }
.footer-nav li a:hover { color: var(--accent); text-decoration: underline; }
.footer-nav .footer-products ul { columns: 2; column-gap: 24px; }
.footer-base { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; padding: 16px 0 32px; border-top: 1px solid var(--border); }
.footer-base p { margin: 0; color: var(--text-2); font-size: 14px; }

/* --------------------------------------------------------------------------
   Charts (light plots inside result sections)
   -------------------------------------------------------------------------- */

.chart { width: 100%; min-height: 240px; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); overflow: hidden; }
.chart svg { display: block; width: 100%; height: auto; }
canvas.chart { display: block; height: auto; }

/* --------------------------------------------------------------------------
   Application shell: toolbar, model tree, settings, results, graphics window,
   status bar and help panel. The page supplies the sections; app-shell.mjs
   builds the tree, the export menu and the help panel.
   -------------------------------------------------------------------------- */

body.app-page { background: var(--surface); }

.app-shell {
  --tree-w: 240px;
  --settings-w: 432px; /* R71-F21: a 208 px label column at 1280 px and wider, so settings labels keep to one or two lines */
  --toolbar-h: 44px;
  --statusbar-h: 28px;
  position: relative;
  display: grid;
  grid-template-columns: var(--tree-w) var(--settings-w) minmax(0, 1fr);
  grid-template-rows: var(--toolbar-h) minmax(0, 1fr) var(--statusbar-h);
  grid-template-areas: "toolbar toolbar toolbar" "tree settings results" "status status status";
  height: calc(100dvh - var(--header-h));
  min-height: 560px;
  background: var(--page);
  font-size: 13px;
  line-height: 20px;
}

.app-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.app-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-identity img { width: 20px; height: 20px; flex: 0 0 20px; }
.app-name { overflow: hidden; color: var(--text); font-size: 15px; line-height: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.app-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.app-actions button, .app-actions .button { min-height: 30px; padding: 4px 12px; font-size: 13px; line-height: 20px; }
.app-actions .app-separator { width: 1px; height: 20px; margin: 0 4px; background: var(--border); }
.app-menu { position: relative; }
.app-menu-button::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.app-menu-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 60; }

.app-tree {
  grid-area: tree;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain; /* R71-F15: scrolling past the end of a column does not move the module window */
  padding: 8px 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.app-tree [role="tree"] { margin: 0; padding: 0; list-style: none; }
.app-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
.app-tree li { margin: 0; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
  user-select: none;
}
.tree-row[data-depth="1"] { padding-left: 32px; }
.tree-row:hover { background: var(--surface-2); }
[role="treeitem"]:focus { outline: none; }
[role="treeitem"]:focus-visible > .tree-row { outline: 2px solid var(--focus); outline-offset: -2px; }
[role="treeitem"][aria-selected="true"] > .tree-row { background: var(--accent-tint); color: var(--accent-hover); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
/* R71-F10: one current node (aria-selected, filled); the other sections on screen, one per group, carry the bar without the fill. */
[role="treeitem"][data-shown="true"] > .tree-row { box-shadow: inset 2px 0 0 var(--accent); }
.tree-twisty { width: 12px; flex: 0 0 12px; display: inline-flex; justify-content: center; }
[aria-expanded] > .tree-row .tree-twisty::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(-45deg); }
[aria-expanded="true"] > .tree-row .tree-twisty::before { transform: rotate(45deg); margin-top: -3px; }
.tree-group-label { color: var(--text); font-weight: 600; }
.tree-tools { margin: 8px 12px 0; padding-top: 8px; border-top: 1px solid var(--border); }
.tree-tools .check { min-height: 28px; font-size: 13px; }
.app-tree-select { display: none; }

.app-settings {
  grid-area: settings;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--border);
  background: var(--page);
  scroll-padding-block: 12px;
}
.app-results {
  grid-area: results;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--surface);
  scroll-padding-block: 12px;
}
.app-settings > .app-section { padding: 12px 16px 16px; border-bottom: 1px solid var(--border); }
.app-section > h2, .app-section-head h2 { margin: 0 0 8px; color: var(--text); font-size: 15px; font-weight: 600; line-height: 22px; }
.app-section h3 { margin: 16px 0 8px; font-size: 14px; line-height: 20px; }
.app-section p { margin: 0 0 8px; font-size: 13px; line-height: 20px; }
.app-results > .app-section { margin: 0 0 12px; padding: 12px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.app-results > .app-section:last-child { margin-bottom: 0; }
.app-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.app-section-head h2 { margin: 0; }

/* Settings: label, input and unit on one row, like a settings window. */
.app-settings .field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 132px) 44px; align-items: center; gap: 4px 8px; margin: 4px 0; }
.app-settings .field > label { display: contents; color: var(--text); font-size: 13px; font-weight: 400; }
.app-settings .field > label > span:not(.label-text) { grid-column: 3; grid-row: 1; color: var(--text-2); font-size: 12px; white-space: nowrap; }
/* A label whose text holds markup (sub, sup, em) wraps the text in span.label-text, so the text stays one grid item in column 1. */
.app-settings .field > label > .label-text { grid-column: 1; grid-row: 1; }
.app-settings .field > :is(input, select) { grid-column: 2; grid-row: 1; min-height: 28px; padding: 2px 8px; font-size: 13px; line-height: 20px; }
.app-settings .field > select { grid-column: 2 / 4; }
/* R71-F20: a select spans the unit column only when its field has no unit; a file control spans both (it has none). */
.app-settings .field:has(> label > span:not(.label-text)) > select { grid-column: 2; }
.app-settings .field > input[type="file"] { grid-column: 2 / 4; min-height: 0; padding: 0; }
.app-settings .field.wide { grid-template-columns: minmax(0, 1fr); }
.app-settings .field.wide > label { display: block; margin-bottom: 4px; }
.app-settings .field.wide > :is(input, select, textarea) { grid-column: 1; grid-row: auto; }
.app-settings .field > :is(small, .help, .field-error, .message) { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 18px; }
.app-settings .row { gap: 0 12px; grid-template-columns: 1fr; }
.app-settings fieldset { padding: 8px 12px; }
.app-settings .buttonrow { margin-top: 8px; }
.app-settings .buttonrow button { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.app-settings .check { min-height: 28px; font-size: 13px; }

/* Results */
.app-results .metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 0; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.app-results .metric { min-width: 0; padding: 8px 12px; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; background: var(--page); }
.app-results .metric .label { color: var(--text-2); font-size: 12px; font-weight: 400; line-height: 16px; text-transform: none; letter-spacing: 0; }
.app-results .metric .value { margin-top: 2px; font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.app-results .metric .unit { color: var(--text-2); font-family: var(--font); font-size: 12px; line-height: 16px; }
.app-results table { font-size: 13px; }
.app-results th, .app-results td { padding: 4px 8px; }
.app-results .chart { margin: 8px 0; }
.app-results .buttonrow button { min-height: 30px; padding: 4px 12px; font-size: 13px; }

/* Graphics window: dark neutral view, light chrome, its own small view toolbar. */
.app-results > .app-graphics { padding: 0; overflow: hidden; }
.app-graphics-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.app-graphics-bar h2 { margin: 0 auto 0 0; font-size: 13px; font-weight: 600; line-height: 20px; }
.app-view-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.app-view-tools button { min-height: 26px; padding: 2px 8px; border-color: transparent; background: transparent; font-size: 12px; line-height: 20px; }
.app-view-tools button:hover { border-color: var(--border); background: var(--page); }
.app-view-tools button[aria-pressed="true"] { border-color: var(--border-strong); background: var(--page); }
.app-graphics-view { position: relative; background: var(--graphics); }
.app-graphics .science-3d-host { height: clamp(320px, 52vh, 620px); border: 0; border-radius: 0; background: var(--graphics); }
.app-graphics .science-viewer { margin: 0; }
.app-graphics .science-viewer figcaption { padding: 8px 12px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--page); color: var(--text-2); font-size: 12px; line-height: 18px; }
.app-graphics-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--page); }
.app-graphics-footer .playback { margin: 0; flex: 1 1 100%; }
.app-graphics-footer .field { margin: 0; }
.app-graphics-body { padding: 8px 12px 12px; background: var(--page); }
.app-graphics-body:empty { display: none; }

/* Property lists (a nuclide's properties under its selector), preset rows and the graphics window's own status line. */
.property-list { margin: 8px 0; }
.property-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 20px; }
.property-list dt { color: var(--text-2); }
.property-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.preset-label { display: block; margin-bottom: 4px; color: var(--text); font-size: 13px; }
.app-graphics-status { min-height: 0; max-width: 40%; margin: 0; overflow: hidden; color: var(--text-2); font-size: 12px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.app-graphics-footer .event-select { flex: 1 1 240px; }
.app-graphics-footer .layer-grid { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; border: 0; }
.app-graphics-footer .layer-grid legend { float: left; margin-right: 12px; padding: 0; font-size: 12px; font-weight: 600; }
.app-graphics-body .metrics { margin-top: 0; }
.app-settings > .live-input-bar { margin: 0; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.app-settings > .live-input-bar .buttonrow { margin: 8px 0; }
.app-settings > .live-input-bar button { min-height: 28px; padding: 4px 12px; font-size: 12px; line-height: 18px; }
.app-settings > .live-input-bar details { margin: 8px 0 0; }
.app-settings > .live-input-bar summary { padding: 4px 12px; font-size: 12px; font-weight: 500; }
.app-settings > .live-input-bar small { font-size: 12px; }
/* In the shell the status bar carries the calculation state, so the live bar's own copy of it is not drawn twice. */
.app-shell .live-input-bar > small[data-state] { display: none; }

/* Status bar */
.app-status {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  line-height: 16px;
}
.app-status-state { flex: 0 0 auto; color: var(--text); font-weight: 600; }
.app-status-state[data-state="error"] { color: var(--error); }
.app-status #status { flex: 1 1 auto; min-width: 0; min-height: 0; margin: 0; overflow: hidden; color: var(--text-2); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.app-status #status[data-kind="error"] { color: var(--error); }
.app-status progress { width: 96px; height: 6px; flex: 0 0 96px; accent-color: var(--accent); }
.app-status-last { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

/* Help panel */
.app-help {
  position: absolute;
  top: var(--toolbar-h);
  right: 0;
  bottom: var(--statusbar-h);
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  border-left: 1px solid var(--border);
  background: var(--page);
  box-shadow: var(--shadow-menu);
}
.app-help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--border); }
.app-help-head h2 { font-size: 15px; line-height: 22px; }
.app-help-body { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 16px; font-size: 14px; line-height: 22px; }
.app-help-body h3 { margin: 16px 0 8px; font-size: 14px; line-height: 20px; }
.app-help-body h3:first-child { margin-top: 0; }
.app-help-body p { margin: 0 0 12px; color: var(--text); }
.app-help-body ul { padding-left: 20px; }

/* Out-of-date results are dimmed until the next computation. */
.app-shell [data-freshness="stale"] > :not(h2):not(.app-section-head), .app-shell [data-freshness="historical"] > :not(h2):not(.app-section-head) { opacity: .55; }

@media (max-width: 1279px) { .app-shell { --tree-w: 210px; --settings-w: 340px; } }

/* Below 1024 px the tree becomes a select and the columns stack. */
@media (max-width: 1023px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas: "toolbar" "tree" "settings" "results" "status";
    height: auto;
    min-height: 0;
  }
  .app-toolbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .app-tree { overflow: visible; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .app-tree [role="tree"], .app-tree .tree-tools { display: none; }
  .app-tree-select { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .app-tree-select label { font-size: 13px; font-weight: 600; }
  .app-tree-select select { min-height: 32px; font-size: 14px; }
  .app-settings, .app-results { overflow: visible; border-right: 0; }
  .app-settings { border-bottom: 1px solid var(--border); }
  .app-status { position: sticky; bottom: 0; z-index: 20; min-height: 28px; }
  /* R71-F33: below 1024 px Help is a modal dialog over the whole screen (app-shell.mjs makes the rest of the page inert). */
  .app-help { position: fixed; inset: 0; z-index: 60; width: auto; border-left: 0; box-shadow: none; }
  html:has(.app-shell) { scroll-padding-bottom: 36px; } /* R71-F25: a control reached with Tab is not left under the status bar */
  .app-shell > aside.app-help[aria-modal="true"] { top: 0; } /* also over a module's own rows above the toolbar (the YieldProof tool strip) */
}
@media (max-width: 599px) {
  .app-toolbar { padding: 8px; }
  .app-actions { flex-wrap: wrap; width: 100%; margin-left: 0; }
  .app-settings .field { grid-template-columns: minmax(0, 1fr) minmax(0, 120px) 40px; }
  .app-results { padding: 8px; }
  .app-results > .app-section { padding: 12px; }
  .app-status-last { display: none; }
  /* R71-F28: the status line wraps to two lines on a phone, so a result message can be read */
  .app-status { padding: 4px 8px; }
  .app-status #status { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  html:has(.app-shell) { scroll-padding-bottom: 52px; }
}

/* ==========================================================================
   Module pages that have not adopted the application shell yet. Plain,
   readable and usable on the new tokens; their lanes convert them.
   ========================================================================== */

.labhead, main, .hero-plain { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-main, .app-main { width: auto; margin: 0; }
.labhead { padding: 24px 0 16px; }
.labhead h1 { font-size: 28px; line-height: 36px; }
.labhead .lede, .lede { max-width: 72ch; margin: 8px 0 0; color: var(--text-2); font-size: 16px; line-height: 24px; }
.truthline { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--text-2); font-size: 13px; }

.labgrid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 32px; }
.labgrid > div, .labgrid > .controls { min-width: 0; }
.panel { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.panel + .panel { margin-top: 12px; }
.panel h2 { margin: 0 0 12px; font-size: 18px; line-height: 26px; }
.panel h3 { margin: 16px 0 8px; font-size: 15px; line-height: 22px; }
.controls { position: sticky; top: calc(var(--header-h) + 12px); max-block-size: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; scrollbar-gutter: stable; scroll-padding-block: 16px; }
.controls :is(input, select, textarea, button) { scroll-margin-block: 16px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.metrics:empty { display: none; }
.metric { min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--page); }
.metric .label { color: var(--text-2); font-size: 12px; line-height: 16px; }
.metric .value { margin-top: 2px; font-size: 17px; font-weight: 600; line-height: 24px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric .value.long-value { font-size: 14px; line-height: 20px; font-weight: 500; }
.metric .unit { color: var(--text-2); font-size: 12px; line-height: 16px; }
.process-value { font-size: 15px !important; }
.warnings { margin: 8px 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 20px; }
.warnings li + li { margin-top: 4px; }
.result-association { display: block; margin: 0 0 8px; color: var(--text); font-size: 13px; font-weight: 600; }
[data-state="historical"] { border-color: var(--border-strong); }
.pass { color: var(--success); font-weight: 600; }
.drift { color: var(--error); font-weight: 600; }
.hash { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.equation { margin: 12px 0; padding: 8px 0; overflow-x: auto; font-size: 15px; }
ul.tight { margin: 4px 0 0; padding-left: 18px; }

/* 3D views and playback */
.viewer-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.viewer-title h2 { margin-bottom: 4px; }
.science-viewer { margin: 0; }
.science-viewer figcaption { padding: 8px 12px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); color: var(--text-2); font-size: 13px; line-height: 20px; }
.science-3d-host { position: relative; width: 100%; height: clamp(380px, 56vh, 680px); overflow: hidden; border: 1px solid var(--graphics); border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--graphics); touch-action: none; scroll-margin-top: calc(var(--header-h) + 12px); --hbf-viewer-layout: 1; }
.science-3d-host.compact-viewer { height: clamp(340px, 48svh, 600px); }
.science-3d-canvas { display: block; width: 100%; height: 100%; }
.science-3d-host[data-stale="true"] { opacity: .6; }
.science-3d-host[data-stale="true"]::after { content: "Previous scene. Compute to update."; position: absolute; top: 8px; left: 8px; z-index: 3; padding: 4px 8px; border-radius: 4px; background: rgba(24, 33, 43, .85); color: #fff; font-size: 12px; line-height: 16px; pointer-events: none; }
.viewer-fallback { display: grid; place-content: center; min-height: 100%; padding: 24px; color: var(--graphics-text); text-align: center; }
.viewer-fallback strong { color: #fff; }
.panel:fullscreen { overflow: auto; padding: 20px; background: var(--page); }
.panel:fullscreen .science-3d-host { height: 70vh; }
.live-3d-panel .science-3d-host { height: 420px; }
.live-3d-panel .source-note { margin: 8px 0; }
#viewer { position: relative; overflow: auto; }
.imagecanvas { display: block; max-width: 100%; height: auto; background: var(--surface-2); border-radius: var(--radius); }
.overlay { position: absolute; inset: 0; max-width: 100%; height: auto; pointer-events: none; }

.playback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.playback button { min-width: 36px; padding-inline: 8px; }
.playback .field { margin: 0; }
.playback-slider { flex: 1 1 180px; min-width: 150px; font-size: 13px; }
.playback-slider input { display: block; width: 100%; }
.playback .compact, .compact { flex: 0 0 100px; min-width: 90px; }
.playback .field.compact label { display: block; font-size: 12px; overflow-wrap: normal; }
.playback .field.compact label > span { display: block; }

.layer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 4px 12px; margin: 12px 0 0; padding: 8px 12px; }
.layer-grid label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.layer-grid input { width: 16px; }
.filedrop { padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-card); background: var(--surface); }

.live-input-bar { margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.live-input-bar small { display: block; color: var(--text-2); font-size: 13px; }
.live-input-bar .buttonrow { margin: 8px 0; }
.live-input-bar details { background: var(--page); }
.live-input-bar textarea, .live-input-bar input[type=file], .experiment-diff { font-size: 13px; }
.live-input-bar label { display: grid; gap: 4px; margin: 8px 0; font-size: 13px; }
.live-input-bar .check { display: inline-flex; margin: 0; }
.scene-tools { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.scene-inspector { padding: 12px 0; }
.scene-inspector select { max-width: 100%; }

.reactor-workbench { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(230px, 280px); gap: 16px; align-items: start; margin: 16px 0 32px; }
.reactor-controls { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; scrollbar-gutter: stable; min-width: 0; }
.reactor-view-panel, .reactor-live-rail { min-width: 0; }
.reactor-live-rail { position: sticky; top: calc(var(--header-h) + 12px); }
.science-3d-host, .live-3d-panel, .reactor-view-panel { scroll-margin-top: calc(var(--header-h) + 16px); }

.download-receipt{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:12px;max-width:100%;margin:12px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--page);font-size:13px;overflow-wrap:anywhere}
.download-receipt a { flex: 1; min-width: 0; }
.download-receipt button { flex: none; min-height: 28px; padding: 2px 10px; font-size: 13px; }
/* In the application shell the receipt sits in the status bar, in flow, after the last computation time. */
.app-status .download-receipt { flex: 0 1 auto; flex-wrap: nowrap; gap: 8px; min-width: 0; margin: 0; padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: transparent; font-size: 12px; white-space: nowrap; }
.app-status .download-receipt a { overflow: hidden; text-overflow: ellipsis; }
.app-status .download-receipt button { min-height: 22px; padding: 0 8px; font-size: 12px; }

.study-results-table { max-width: 100%; overflow: auto; margin: 16px 0; }
.study-results-table caption { padding: 8px; font-weight: 600; }
.study-results-table th, .study-results-table td { min-width: 90px; vertical-align: top; overflow-wrap: anywhere; }
.study-results-table [data-qualifier="false"] { font-weight: 600; }
.typed-study-form { display: grid; gap: 10px; min-width: 0; margin: 12px 0; }
.typed-study-form fieldset { display: grid; gap: 8px; min-width: 0; padding: 10px; }
.typed-study-form label, .study-file-tools label { display: grid; gap: 4px; min-width: 0; font-size: 13px; }
.typed-study-form input, .typed-study-form textarea { width: 100%; min-width: 0; }
.typed-study-form input[type=checkbox] { width: 16px; justify-self: start; }
.typed-study-form input:invalid, .typed-study-form textarea:invalid { border-color: var(--error); }
.study-file-tools { display: grid; gap: 10px; margin: 12px 0; }
.research-panel textarea { width: 100%; min-height: 110px; }
.research-panel > details > details textarea { min-height: 160px; }
.research-panel pre { max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.research-panel details { margin: 12px 0; }
.research-panel .status { overflow-wrap: anywhere; }

.stage-selected { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-tint); }
.stage-selection-controls { display: grid; gap: 8px; margin: 12px 0; }
[data-stage-index]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.validation-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.validation-form label { display: grid; gap: 4px; }
.validation-form input, .validation-form select { max-width: 100%; }
.validation-wide { grid-column: 1 / -1; }
.validation-output { overflow-x: auto; }
.validation-output td, .validation-output th { min-width: 5rem; white-space: normal; }

.detector-validation-workbench { min-width: 0; }
.detector-validation-workbench > details { margin-top: 8px; padding: 12px 0; border-width: 1px 0 0; border-radius: 0; }
.detector-validation-workbench > details[open] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.detector-validation-workbench > details > :is(summary, p, pre, .tablewrap) { grid-column: 1 / -1; }
.detector-validation-workbench .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detector-validation-workbench .field :is(input, select) { width: 100%; min-width: 0; }
.detector-validation-workbench .tablewrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.detector-validation-workbench :is(th, td) { padding: 8px; vertical-align: top; }
.detector-validation-workbench td .field { min-width: 10rem; }
.detector-validation-workbench pre { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.detector-validation-workbench [role="status"] { overflow-wrap: anywhere; }
.detector-validation-workbench button { align-self: start; }

.deflist { display: grid; gap: 0; margin: 16px 0 0; }
.deflist > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-top: 1px solid var(--border); }
.deflist dt { font-weight: 600; }
.deflist dd { margin: 0; color: var(--text-2); }
.methodlist { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.methodlist li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 4px 24px; margin: 0; padding: 12px 0; border-top: 1px solid var(--border); }
.methodlist li > strong { font-weight: 600; }
.methodlist li > span { color: var(--text-2); }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 8px 0; }
.preset-grid button { min-height: 30px; padding: 4px; font-size: 13px; }
.thermal-result { font-size: 13px; }

/* Immersive workspaces (Virtual Lab, Reactor 3D, Torus Lab): light chrome around a dark graphics stage. */
.recorded-workspace { height: 100dvh; overflow: hidden; background: var(--page); font-size: 13px; }
.recorded-workspace input, .recorded-workspace select, .recorded-bench input, .recorded-bench select { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.recorded-workspace button, .recorded-bench button { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.hbf-workspace { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: 64px 24px minmax(0, 1fr) 122px; isolation: isolate; background: var(--page); }
.hbf-workspace-header { grid-row: 1; z-index: 4; display: flex; align-items: center; gap: 16px; min-width: 0; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.workspace-brand { color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.workspace-tabs { display: flex; flex: 1; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; border: 0; }
.workspace-tablist { display: flex; gap: 2px; min-width: 0; border: 0; }
.workspace-tabs button, .workspace-tabs [role=tab] { flex: 0 0 auto; margin: 0; border: 1px solid transparent; border-radius: var(--radius); background: transparent; white-space: nowrap; }
.workspace-tabs [role=tab][aria-selected=true], .workspace-tabs button[aria-pressed=true], .bench-tabs button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-hover); font-weight: 600; }
.workspace-tabs .workspace-show-all { flex: 0 0 auto; margin-left: 6px; border-color: var(--border-strong); }
.workspace-utility { display: flex; align-items: center; gap: 6px; }
.workspace-utility select { max-width: 150px; }
.quality-note { max-width: 96px; color: var(--text-2); font-size: 11px; }
.workspace-boundary { grid-row: 2; z-index: 4; overflow: hidden; padding: 4px 14px; border-bottom: 1px solid var(--border); background: var(--page); color: var(--text-2); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.hbf-stage.panel { position: relative; grid-row: 3; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: var(--graphics); }
.recorded-workspace .hbf-stage .science-3d-host { position: absolute; inset: 0; left: var(--scene-left, 0px); right: var(--scene-right, 176px); width: auto; height: 100% !important; min-height: 0; margin: 0; border: 0; border-radius: 0; scroll-margin: 0; }
.workspace-drawer { position: absolute; z-index: 5; top: 94px; bottom: 132px; left: 12px; width: 340px; max-width: calc(100vw - 24px); overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); box-shadow: var(--shadow-menu); scroll-padding-top: calc(var(--section-offset, 0px) + 16px); }
.workspace-drawer:has([data-mode-panel=Compare]:not([hidden])), .workspace-drawer:has([data-mode-panel=Energy]:not([hidden])) { width: min(480px, 42vw); }
.workspace-drawer .workspace-pane { scroll-margin-top: 0; }
.workspace-drawer [data-section] :is(h2, h3)[tabindex="-1"]:focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.workspace-pane > .panel { margin: 8px 0; }
.workspace-pane[role=tabpanel]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.workspace-pane .panel h2 { font-size: 16px; line-height: 22px; }
.workspace-pane .layer-grid { grid-template-columns: 1fr; margin-top: 10px; }
.workspace-pane figcaption { color: var(--text-2); font-size: 12px; }
.workspace-close { position: sticky; top: 0; z-index: 2; float: right; margin: 0 0 8px 8px; }
.workspace-pane > h2 { clear: both; }
.recorded-workspace .workspace-controls { position: static; width: auto; max-height: none; overflow: visible; scrollbar-gutter: auto; }
.workspace-controls > .panel { padding: 10px; }
.workspace-controls .field { margin: 8px 0; }
.workspace-controls .field label { font-size: 13px; }
.workspace-controls .help, .workspace-controls small { font-size: 12px; }
.recorded-workspace .workspace-drawer .labhead { width: auto; padding: 12px 0; }
.workspace-drawer .labhead :is(h1, h2) { font-size: 20px; line-height: 28px; }
.workspace-drawer .labhead .lede { font-size: 13px; line-height: 20px; }
.workspace-drawer .lab-startup { width: auto; margin: 12px 0; }
.workspace-drawer .sitebar { position: static; }
.workspace-camera { position: absolute; z-index: 3; top: 100px; right: 14px; display: grid; gap: 4px; width: 150px; }
.workspace-camera button { justify-content: flex-start; min-height: 30px; font-size: 12px; }
.workspace-assembly { position: absolute; z-index: 3; bottom: 132px; left: 14px; width: 300px; max-height: 45vh; margin: 0; overflow: auto; box-shadow: var(--shadow-menu); }
.workspace-assembly .scene-tools { margin: 0; padding: 0; border: 0; }
.workspace-assembly summary { padding: 8px 10px; font-size: 13px; }
.workspace-assembly .buttonrow { margin: 8px 0; }
.workspace-assembly .scene-inspector { padding: 8px 0; }
.workspace-assembly .scene-inspector label { font-size: 12px; }
.workspace-hud { position: absolute; z-index: 2; top: 98px; left: 50%; max-width: calc(100% - 400px); overflow: hidden; padding: 4px 10px; border-radius: 4px; background: rgba(24, 33, 43, .85); color: #fff; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; transform: translateX(-50%); pointer-events: none; }
.workspace-timeline { grid-row: 4; z-index: 4; overflow: auto; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.workspace-timeline .playback { flex-wrap: nowrap; gap: 6px; margin: 0; }
.workspace-timeline .playback button { min-width: 32px; padding: 4px 8px; }
.workspace-timeline .playback .compact { flex-basis: 70px; }
.workspace-timeline .playback .field label { margin: 0; font-size: 11px; }
.workspace-timeline input[type=range] { min-height: 24px; padding: 0; }
.workspace-timeline .check { font-size: 12px; }
.workspace-timeline > .download-receipt { margin: 6px 0 0; padding: 6px 10px; }
.timeline-status { display: block; margin-top: 4px; color: var(--text-2); font-size: 11px; }
.workspace-primary-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; color: var(--text); font-size: 12px; }
.workspace-primary-summary .buttonrow { flex-wrap: nowrap; margin: 0; }
.workspace-primary-summary button { min-height: 26px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.workspace-deeplink-notice { margin: 0 0 4px; color: var(--text-2); font-size: 12px; }
.science-shortcuts { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 12px; padding: 8px 92px 8px 0; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--page); }
.science-shortcuts button { flex: 0 0 auto; min-height: 28px; padding: 2px 10px; font-size: 13px; white-space: nowrap; }
.science-shortcuts button[aria-current=true] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-hover); }
.hbf-workspace:has(.workspace-timeline > .download-receipt) { grid-template-rows: 64px 24px minmax(0, 1fr) auto; }
.workspace-timeline:has(> .download-receipt) { max-height: 40dvh; min-height: 122px; }
@media (min-width: 851px) {
  .workspace-drawer:not([hidden]) ~ .workspace-assembly { left: calc(var(--scene-left) + 12px); width: 230px; }
  .workspace-drawer:not([hidden]) ~ .workspace-hud { left: calc(var(--scene-left) + 12px); max-width: calc(100% - var(--scene-left) - 200px); transform: none; }
}
@media (max-width: 1100px) {
  .workspace-utility { gap: 3px; }
  .workspace-utility select { max-width: 110px; }
  .workspace-brand { font-size: 12px; }
  .hbf-workspace-header { gap: 8px; }
  .quality-note { display: none; }
  .workspace-tabs button { padding: 4px 7px; font-size: 12px; }
  .workspace-hud { top: auto; right: 14px; bottom: 135px; left: auto; max-width: calc(100% - 340px); transform: none; }
}
@media (max-width: 850px) {
  .hbf-workspace { grid-template-rows: 88px 24px minmax(0, 1fr) 142px; }
  .hbf-workspace-header { flex-wrap: wrap; gap: 5px; }
  .workspace-brand { flex: 1; }
  .workspace-tabs { order: 3; flex-basis: 100%; }
  .workspace-utility select { max-width: 130px; }
  .workspace-boundary { padding: 4px 8px; font-size: 11px; }
  .workspace-drawer { top: 120px; bottom: 152px; }
  .workspace-drawer:has([data-mode-panel=Compare]:not([hidden])), .workspace-drawer:has([data-mode-panel=Energy]:not([hidden])) { width: calc(100vw - 24px); }
  .workspace-camera { top: 122px; right: 8px; width: 112px; gap: 4px; }
  .workspace-camera button { min-height: 28px; font-size: 11px; }
  .workspace-hud { bottom: 152px; max-width: calc(100% - 190px); }
  .workspace-assembly { bottom: 152px; left: 8px; width: 180px; }
  .workspace-drawer:not([hidden]) ~ .workspace-assembly { display: none; }
  .workspace-timeline { padding: 7px 8px; }
  .workspace-timeline .playback { flex-wrap: wrap; gap: 4px; }
  .workspace-timeline .playback-slider { flex-basis: calc(100% - 220px); min-width: 110px; }
  .workspace-timeline .playback .compact { display: block; flex-basis: 88px; }
  .timeline-status { font-size: 10px; }
  .workspace-primary-summary { align-items: flex-start; font-size: 11px; }
  .workspace-primary-summary .buttonrow { flex-direction: column; gap: 3px; }
  .science-shortcuts { gap: 4px; padding-right: 80px; }
  .hbf-workspace:has(.workspace-timeline > .download-receipt) { grid-template-rows: 88px 24px minmax(0, 1fr) auto; }
  .workspace-timeline:has(> .download-receipt) { min-height: 142px; }
}
@media (max-width: 560px) {
  .hbf-workspace { grid-template-rows: 118px 24px minmax(0, 1fr) 154px; }
  .hbf-workspace-header { align-content: center; }
  .workspace-brand { flex-basis: 100%; font-size: 12px; }
  .workspace-utility { order: 2; flex-basis: 100%; min-width: 0; }
  .workspace-utility select { flex: 1; min-width: 0; max-width: none; min-height: 28px; font-size: 11px; }
  .workspace-tabs { order: 3; flex-basis: 100%; }
  .workspace-drawer { top: 150px; bottom: 164px; }
  .workspace-camera { top: 152px; }
  .workspace-assembly, .workspace-hud { bottom: 164px; }
  .workspace-timeline .playback button { min-width: 25px; padding: 4px; }
  .workspace-timeline .playback-slider { flex-basis: calc(100% - 190px); }
  .workspace-primary-summary { gap: 5px; }
  .hbf-workspace:has(.workspace-timeline > .download-receipt) { grid-template-rows: 118px 24px minmax(0, 1fr) auto; }
  .workspace-timeline:has(> .download-receipt) { min-height: 154px; }
}

/* Compact workbench of the bench modules (FusionSim, AlphaTrack, DirectConvert) until they adopt the shell. */
.recorded-bench .sitebar { position: sticky; }
.recorded-bench .labhead { padding: 12px 0; }
.recorded-bench .labhead h1 { font-size: 24px; line-height: 32px; }
.recorded-bench .labhead .lede { max-width: 1000px; margin: 4px 0; font-size: 14px; line-height: 20px; }
.recorded-bench .labgrid { grid-template-columns: 340px minmax(0, 1fr); gap: 16px; }
.recorded-bench .controls { top: calc(var(--header-h) + 8px); max-block-size: calc(100dvh - var(--header-h) - 16px); overflow-y: auto; scroll-padding-block: 16px 80px; scrollbar-gutter: stable; }
.recorded-bench .controls .field label { display: block; font-size: 13px; }
.recorded-bench .controls .field label > span { display: inline-block; margin-left: 6px; color: var(--text-2); }
.recorded-bench .panel h2 { font-size: 16px; line-height: 22px; }
.recorded-bench .science-3d-host { height: 440px; }
.recorded-bench .lab-startup[data-state=ready] { margin: 6px auto; padding: 4px 10px; font-size: 12px; }
.recorded-bench .lab-startup[data-state=ready] .buttonrow { margin: 4px 0 0; }
.recorded-bench .lab-startup[data-state=ready] button { min-height: 26px; font-size: 12px; }
.bench-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.bench-tab-panel > .panel:first-child { margin-top: 0; }

/* Startup and loading screen (the boot loader holds the page until its layout is ready). */
.lab-startup { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin: 12px auto; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); font-size: 13px; }
.lab-startup p { margin: 0; overflow-wrap: anywhere; }
.lab-startup .buttonrow { margin: 8px 0 0; }
.lab-startup button { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.lab-startup[data-state=error], .lab-startup[data-state=slow] { border-color: var(--error); }
.lab-startup[data-state=error] p, .lab-startup[data-state=slow] p { color: var(--error); }
.app-page .lab-startup[data-state=ready] { display: none; }
/* The first-paint gate (boot.js removes data-hbf-startup when the module is ready; #hbf-static-view is the script-free escape). */
html[data-hbf-startup]:not(:target){background:var(--page)}
html[data-hbf-startup]:not(:target) body{overflow:hidden;background:var(--page)}
html[data-hbf-startup]:not(:target) body>:not(#labLoadingScreen),
html[data-hbf-startup]:not(:target) body>:not(#labLoadingScreen) *{visibility:hidden!important;pointer-events:none!important}
#labLoadingScreen{display:none}
html[data-hbf-startup]:not(:target) #labLoadingScreen{position:fixed;inset:0;z-index:10000;display:flex;align-items:flex-start;justify-content:flex-start;overflow:auto;padding:clamp(16px,4vw,48px);background:var(--surface);color:var(--text);font-family:var(--font)}
.lab-loading-card { width: min(100%, 560px); margin: auto; padding: clamp(24px, 5vw, 40px); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.lab-loading-card h1 { margin: 8px 0 16px; font-size: 24px; line-height: 32px; }
.lab-loading-card p { line-height: 1.6; }
.lab-loading-card .loading-brand { margin: 0; color: var(--text-2); font-size: 14px; font-weight: 600; }
.lab-loading-card .help { color: var(--text-2); font-size: 14px; }
.lab-loading-card .buttonrow { gap: 16px; margin-top: 24px; }
.lab-loading-card a { color: var(--accent); }

/* --------------------------------------------------------------------------
   Responsive website
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reactor-workbench { grid-template-columns: 1fr; }
  .reactor-controls, .reactor-live-rail { position: static; max-height: none; overflow: visible; }
  .reactor-view-panel { grid-row: 2; }
  .reactor-live-rail { grid-row: 3; }
}
@media (max-width: 980px) {
  .labgrid, .recorded-bench .labgrid { grid-template-columns: 1fr; }
  .controls, .recorded-bench .controls { position: static; max-block-size: none; overflow: visible; scrollbar-gutter: auto; }
  .split, .product-section, .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > li:nth-child(3) { border-left: 0; }
  .steps > li:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .contact-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .methodlist li, .deflist > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --header-h: 108px; --hbf-sticky-offset: 7.5rem; }
  /* Two rows in document order (the keyboard order): the wordmark, then the navigation. Contact is in the navigation, so the
     Contact us button is not repeated on a phone. */
  .sitebar { flex-wrap: wrap; gap: 0 12px; padding: 8px var(--gutter) 4px; }
  .brand { min-height: 44px; }
  .site-cta { display: none; }
  .site-nav { flex: 1 1 100%; gap: 0; margin: 0 -8px; overflow-x: auto; }
  .site-nav > a, .nav-menu > summary { min-height: 44px; padding: 8px; font-size: 16px; }
  .nav-menu { position: static; }
  .nav-menu-panel { top: 100%; right: var(--gutter); left: var(--gutter); width: auto; max-height: calc(100dvh - var(--header-h) - 16px); overflow: auto; }
  .nav-menu-panel ul { grid-template-columns: minmax(0, 1fr); }
  h1, .hero h1 { font-size: 32px; line-height: 40px; }
  h2 { font-size: 24px; line-height: 32px; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 48px; }
  .hero-text p, .section-head p, .page-head p { font-size: 16px; line-height: 26px; } /* R71-F30: a phone keeps the 16 px body size for leads */
  .page-head { padding: 40px 0 32px; }
  .product-grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps > li + li { border-left: 0; border-top: 1px solid var(--border); }
  .contact-band { grid-template-columns: minmax(0, 1fr); }
  .contact-band .hero-actions { justify-content: flex-start; }
  .footer-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-nav .footer-products { grid-column: 1 / -1; }
  .facts-table > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .email-address { font-size: 20px; line-height: 28px; }
  .row { grid-template-columns: 1fr; }
  .panel { padding: 12px; }
  .science-3d-host { height: clamp(300px, 52svh, 500px); }
  .viewer-title { display: block; }
  .error-page { padding: 56px 0 72px; }
}
@media (max-width: 380px) {
  .brand { font-size: 16px; }
  .site-nav > a, .nav-menu > summary { padding: 8px 8px; font-size: 14px; }
}

/* --------------------------------------------------------------------------
   Print and motion preferences
   -------------------------------------------------------------------------- */

@media print {
  .sitebar, .site-footer, .app-toolbar, .app-tree, .app-status, .controls, .buttonrow, .skip-link { display: none !important; }
  .app-shell { display: block; height: auto; }
  .app-settings, .app-results { overflow: visible; }
  .labgrid { display: block; }
  .panel, .app-section { break-inside: avoid; }
  .science-3d-host { display: none; }
  .controls { position: static; max-block-size: none; overflow: visible; }
  .recorded-workspace { height: auto; overflow: visible; }
  .hbf-workspace { position: static; display: block; }
  .hbf-stage, .workspace-camera, .workspace-assembly, .workspace-tabs, .workspace-utility, .workspace-timeline { display: none; }
  .workspace-drawer { position: static; display: block !important; width: 100% !important; max-width: none; overflow: visible; }
  .workspace-pane, .bench-tab-panel, .workspace-drawer [hidden] { display: block !important; }
  .workspace-hud { position: static; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  /* no transition at all: a near-zero duration would still start a transition, and a state read at once (a focused skip link) would be stale */
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================================
   Module styles carried from 7.6.0 on the new tokens (colours mapped to the
   tokens above; highlight components removed). Each module lane replaces its
   block when it moves its module into the application shell.
   ========================================================================== */

/* === v753 B06 DirectConvert === */
/* DC-C02 origin-preserving plant ledger: grouped sink and provenance inputs, origin/sink tables, pooled comparison. */
.dc-plant-ledger { margin-top: .9rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.dc-ledger-lede { margin: 0 0 .6rem; color: var(--muted); font-size: .82rem; }
.dc-qualification .check { font-weight: 650; }
.dc-ledger-group { margin: .7rem 0 0; }
.dc-ledger-group > summary .dc-summary-note { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.dc-sink { min-width: 0; margin: .7rem 0 0; padding: .55rem .7rem .7rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.dc-sink legend { padding: 0 .35rem; color: var(--cyan-2); font-weight: 650; font-size: .82rem; }
.dc-provenance .dc-source[hidden] { display: none; }
.dc-ledger-mapping { margin: 0 0 .6rem; }
.dc-origin-table .dc-total th, .dc-origin-table .dc-total td { border-top: 2px solid var(--line); font-weight: 650; }
.dc-origin-table caption, .dc-sink-table caption { caption-side: top; text-align: left; color: var(--muted); font-size: .8rem; padding: .3rem 0; }
/* V02 O-06: the note under the sink table stays inside the visible width of the scrolling table and reads as prose. */
.dc-sink-table .dc-withheld-note td { padding: .6rem .7rem; text-align: left; white-space: normal; border-top: 2px solid var(--line); }
.dc-sink-table .dc-withheld-note p { position: sticky; left: 0; margin: 0; max-width: min(66ch, calc(100vw - 5rem)); color: var(--muted); font-size: .84rem; line-height: 1.45; }
.dc-pooled, .dc-routes { margin-top: .9rem; }
/* DC-C05 campaign panel: raw-content conflicts shown readably above the JSON. */
/* 7.7.0 (lane F71c; docs/V770-PLAN.md section 4 rule 6, R71-F34): the DirectConvert and field measurement panels are plain bordered boxes; the
   words carry the state (no coloured side bar, chip or badge). Spacing on the 4 px grid (R71-F31). */
.dc-campaign-conflicts { margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.dc-campaign-conflicts h4 { margin: 0 0 .3rem; }
.dc-campaign-conflicts code { word-break: break-all; font-size: .78rem; }
.dc-campaign-conflicts ul { margin: 0; padding-left: 1.1rem; }
/* V02 F-16: an alias records the digest as the manifest wrote it (64 characters, or whatever was typed); it wraps instead of widening the table. */
.dc-campaign-conflicts li { overflow-wrap: anywhere; }
/* DC-C10 PIC numerical checks: the outcome in one sentence, the steady window, one table of the checks, and the explicit refinement study. */
.dc-pic-rail, .dc-pic-study { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.dc-pic-rail h4, .dc-pic-study h4 { margin: 0 0 4px; }
.dc-rail-verdict { margin: 0 0 8px; }
.dc-rail-note { margin: 4px 0; color: var(--text-2); font-size: 13px; }
.dc-rail-reasons { margin: 4px 0; padding-left: 20px; font-size: 13px; }
.dc-rail-checks td { vertical-align: top; }
.dc-pic-rail caption, .dc-pic-study-output caption { caption-side: top; padding: 4px 0; color: var(--text-2); font-size: 13px; text-align: left; }
.dc-pic-study progress { width: 100%; max-width: 26rem; accent-color: var(--accent); }
/* DC-C08 grouped acquisition: persistent evidence banner, four steps, dependency summary, power-boundary and example-check cards. */
/* The sticky head is one line (select and class name) so it can stay on screen on a phone; the explaining sentence follows it. */
.dc-acq-head { position: sticky; top: var(--dc-sticky-top, 0px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.dc-acq-head label { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-width: 0; max-width: 100%; margin: 0; font-weight: 650; }
.dc-acq-head select { flex: 1 1 12rem; min-width: 0; max-width: 100%; min-height: 2.5rem; }   /* wraps under the label on a narrow phone instead of overflowing */
.dc-evidence-banner { margin: .4rem 0 .7rem; padding: 0 .2rem; font-size: .82rem; color: var(--ink); }
.dc-example { margin: .6rem 0; padding: .6rem .75rem; border: 1px dashed var(--line-3); border-radius: var(--r-md); }
.dc-example-text { margin: 0 0 .5rem; font-size: .84rem; }
.dc-acq-form { display: block; margin-top: .7rem; }
.dc-sweep-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin-top: .8rem; }
.dc-sweep-actions label { display: grid; gap: .25rem; }
/* The sticky banner and the site bar must not hide a control that keyboard focus scrolls into view. */
.dc-acq :is(input, select, button, summary, h3, h4) { scroll-margin-top: 9rem; }
.dc-steps { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.dc-steps li { flex: 1 1 10rem; min-width: 0; }
.dc-step-tab { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "num title" "num state"; align-items: center; column-gap: .6rem; width: 100%; text-align: left; }
.dc-step-num { grid-area: num; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 1px solid currentColor; border-radius: 999px; font-weight: 650; }
.dc-step-title { grid-area: title; }
.dc-step-state { grid-area: state; font-size: .74rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.dc-step-tab[aria-current="step"] { background: var(--surface); border-color: var(--accent); color: var(--text); }
.dc-step-tab[aria-current="step"] .dc-step-state { color: var(--text); }
.dc-step-tab[data-complete="true"]:not([aria-current="step"]) .dc-step-state { color: var(--green); }
.dc-acq-step { min-width: 0; margin: 0 0 .5rem; padding: .6rem .75rem .8rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.dc-acq-step[hidden] { display: none; }
.dc-acq-step legend { padding: 0 .35rem; }
.dc-acq-step legend h3 { margin: 0; font-size: .95rem; color: var(--cyan-2); }
.dc-acq-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.dc-acq-fields label { display: grid; gap: .25rem; align-content: space-between; }   /* labels of different length: inputs share a baseline at the bottom of the row */
.dc-acq-fields input, .dc-acq-fields select { min-height: 2.75rem; max-width: 100%; }
.dc-acq-fields .dc-declaration { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: .65rem; }
.dc-acq-fields .dc-declaration input { order: -1; flex: 0 0 auto; width: 1.4rem; min-height: 1.4rem; margin-top: .15rem; }
.dc-step-actions { margin-top: .75rem; }
.dc-file-note[hidden] { display: none; }
.dc-dependency { margin: .8rem 0 0; }
.dc-dependency-body { overflow-x: auto; }
.dc-dependency caption { caption-side: top; padding: .3rem 0; color: var(--muted); font-size: .8rem; text-align: left; }
.dc-dependency td, .dc-dependency th { white-space: normal; vertical-align: top; }
.dc-power-boundary, .dc-example-check { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.dc-power-boundary h4, .dc-example-check h4 { margin: 0 0 .35rem; }
.dc-power-boundary ul { margin: 0; padding-left: 1.1rem; font-size: .84rem; }
.dc-example-check caption { caption-side: top; padding: .3rem 0; color: var(--muted); font-size: .8rem; text-align: left; }
/* Phone: three columns leave the Detail column about 60 px wide, so each dependency becomes a stacked card (name and state on one line,
   the detail under them at full width). The table roles are set explicitly in collector-validation-ui.mjs; the header row stays for assistive technology. */
@media (max-width: 560px) {
  .dc-dependency table, .dc-dependency tbody { display: block; }
  .dc-dependency thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dc-dependency tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
  .dc-dependency td { display: block; min-width: 0; padding: 0; border: 0; }
  .dc-dependency td:nth-child(1) { font-weight: 650; }
  .dc-dependency td:nth-child(2) { color: var(--muted); font-size: .78rem; text-align: right; }
  .dc-dependency td:nth-child(3) { grid-column: 1 / -1; overflow-wrap: anywhere; }   /* run identifiers and hashes are long unbroken tokens */
  .dc-dependency caption { display: block; }   /* a table-caption inside a block-level table would shrink to one narrow column */
  .dc-dependency tbody tr:hover td { background: none; }   /* the global hover tint is per cell; here the row is the card */
  .dc-dependency tbody tr:hover { background: var(--surface); }
  .dc-dependency tbody tr:last-child { border-bottom: 0; }
}
/* === end v753 B06 === */
/* === v753 B05 AlphaTrack === */
/* Method identity, blank/control record and output-layer boundary (audit AT-03, AT-04, readiness §3.2). */
.method-schema-note code, .method-identity code { overflow-wrap: anywhere; }
.method-identity { margin: .75rem 0; font-size: .875rem; overflow-wrap: anywhere; }
.method-identity .mono { display: block; margin-top: .2rem; color: var(--muted); word-break: break-all; }
.control-formula { overflow-wrap: anywhere; }
.control-record { margin: .75rem 0; padding: .6rem .8rem; border: 1px solid var(--line-2); border-left: 3px solid var(--amber); border-radius: var(--r-sm); background: var(--sunken); overflow-wrap: anywhere; }
.control-record.negative { border-left-color: var(--red); }
.control-record h3 { margin: 0 0 .35rem; font-size: .9rem; }
.control-record .formula { margin: .2rem 0; font-family: var(--mono); font-size: .85rem; }
.output-layers { margin: .75rem 0; }
.output-layers summary { cursor: pointer; font-weight: 600; }
.output-layers td { vertical-align: top; overflow-wrap: break-word; }
/* Custody image-set summaries (AT-01 follow-up): a mismatch is unmistakable and says no score was published. */
.custody-image-set { margin: .6rem 0 .9rem; padding: .7rem .9rem; border: 1px solid var(--line-2); border-left: 4px solid var(--violet); border-radius: var(--r-sm); background: var(--sunken); overflow-wrap: anywhere; }
.custody-image-set[data-tone="mismatch"] { border-color: var(--error); border-left-color: var(--red); background: var(--surface); }
.custody-image-set[data-tone="exact"] { border-left-color: var(--green); }
.custody-image-set[data-tone="partial"] { border-left-color: var(--amber); }
.custody-image-set-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.custody-image-set h4 { margin: 0; font-size: .95rem; }
.custody-image-set h5 { margin: .5rem 0 .2rem; font-size: .85rem; }
.custody-no-score { margin: .4rem 0; color: var(--error); }
.custody-image-set table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.custody-image-set :is(th, td) { padding: .25rem .4rem; text-align: left; vertical-align: top; }
.custody-image-set code { word-break: break-all; }
.custody-image-set code.whole { word-break: normal; white-space: nowrap; }
.custody-hash-list ol { margin: 0; padding-left: 1.4rem; max-height: 14rem; overflow: auto; }
/* Review decisions (AT-05 / AT-W4): object list, reason, undo/redo and the immutable log. */
.review-decisions .review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem 1rem; align-items: start; margin: .5rem 0; }
.review-decisions select[multiple] { width: 100%; font-family: var(--mono); font-size: .8rem; }
.review-decisions .status { overflow-wrap: anywhere; }
.review-decisions .status[data-kind="error"] { padding: .4rem .6rem; border-left: 3px solid var(--red); background: var(--surface); color: var(--error); }
.review-decisions details { margin-top: .6rem; }
.review-decisions summary { cursor: pointer; font-weight: 600; }
.review-decisions td, .review-decisions th { vertical-align: top; overflow-wrap: break-word; }
.reviewed-line { margin: .5rem 0; font-size: .9rem; overflow-wrap: anywhere; }
.review-decisions .field label { flex-wrap: wrap; }
.review-decisions .field label > span { flex: 1 1 11rem; min-width: 0; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 760px) { .review-decisions .review-grid { grid-template-columns: minmax(0, 1fr); } .review-decisions .field label > span { text-align: left; } }
/* Input support and budgets (AT-07 / AT-08). */
#cancelLoad[hidden] { display: none; }
.ingestion-support { margin: .75rem 0; padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--sunken); }
.ingestion-support > summary { cursor: pointer; font-weight: 600; }
.ingestion-body h4 { margin: .7rem 0 .2rem; font-size: .85rem; }
.ingestion-body ul { margin: .2rem 0; padding-left: 1.2rem; }
/* The panel lives in the narrow controls column on a desktop and fills the screen on a phone: a label stacks above its value in both. */
.ingestion-body dl { margin: .2rem 0; font-size: .85rem; }
.ingestion-body dt { font-weight: 600; }
.ingestion-body dd { margin: 0 0 .3rem; overflow-wrap: break-word; }
/* Tables of this lane keep whole words. On a phone each row of the output-layer and review-log tables becomes a labelled block
   (the header row stays available to assistive technology) and each row of a custody summary stacks its label above its value,
   instead of a grid squeezed to a few letters per column. */
@media (max-width: 640px) {
  :is(.output-layers, .review-decisions) :is(table, tbody, tr, td) { display: block; }
  :is(.output-layers, .review-decisions) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  :is(.output-layers, .review-decisions) tr { padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
  :is(.output-layers, .review-decisions) td { padding: .1rem 0; border: 0; }
  :is(.output-layers, .review-decisions) td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  .custody-image-set-table :is(tbody, tr, th, td) { display: block; }
  .custody-image-set-table th[scope="row"] { padding-bottom: 0; border-bottom: 0; background: none; }
  .custody-image-set-table td { padding-top: .1rem; }
}
/* === end v753 B05 === */
/* === v753 B02 Isotope === */
#beamHelp .domain-line{display:block}
.submodel-status{margin:.5rem 0}
/* HBF-004: run identity and freshness line above every result group. */
.run-line{margin:.35rem 0 .6rem;padding:.25rem .6rem;border-left:3px solid var(--line-3);font-size:.9rem;line-height:1.4;color:var(--ink-2);overflow-wrap:anywhere}
.run-line[data-freshness="current"]{border-left-color:var(--green)}
.run-line[data-freshness="stale"],.run-line[data-freshness="invalid"]{border-left-color:var(--amber);color:var(--text)}
.run-line[data-freshness="none"]{border-left-color:var(--red);color:var(--error)}
[data-freshness="stale"]:not(.run-line),[data-freshness="invalid"]:not(.run-line){opacity:.6}
#xsResult[data-scalar="stale"]{opacity:1}
/* HBF-013: use restriction beside the source and transport results. */
.source-restriction{margin:.5rem 0 .75rem}
.source-restriction details{margin-top:.4rem}
.source-restriction details p{margin:.35rem 0;font-size:.92rem}
.source-restriction .tablewrap{max-width:100%;overflow-x:auto}
.source-restriction .restriction-actions{margin-top:.4rem}
.source-restriction .restriction-actions button{font-size:.9rem}
#heldOutReproduction{margin-top:.4rem;font-size:.9rem;overflow-wrap:anywhere}
#branchModelStatus[data-status="unavailable"],#branchModelStatus[data-status="invalid"]{color:var(--error)}
/* I-P2-02: persistent frame / time / source badges above each 3D view; a physical-time badge and a normalized-time badge differ in colour as well as words. */
.view-badges-host{margin:.5rem 0 .75rem}
/* The page-wide rule above dims every stale element; here the stale statement (the Run badge) keeps full strength and the badges describing the previous scene are dimmed instead. */
/* I13: the detector half-angle states its own validity beside the control (range and unit), without hiding the other results. */
.field-error{display:block;margin-top:.25rem;padding:.3rem .5rem;border-left:3px solid var(--red);border-radius:4px;background:var(--surface);color:var(--error);font-size:.9rem;line-height:1.4;overflow-wrap:anywhere}
.field-error[hidden]{display:none}
#detectorAngle[aria-invalid="true"]{border-color:var(--red);outline-color:var(--red)}
/* I-P2-03: summary-first angular comparison. The summary wraps its text so that all seven columns, the verdict included, fit at 1353 px;
   the detail tables sit in labelled, focusable scroll regions. Header text keeps its case so that units read keV, not KEV. */
.iso-angular-view{margin:.25rem 0 1rem}
.iso-angular-view h4{margin:.4rem 0 .5rem;font-size:1.02rem}
.iso-angular-view .iso-restriction{margin:.25rem 0 .6rem;color:var(--text-2);font-size:.92rem;line-height:1.4;overflow-wrap:anywhere}
.iso-angular-view .iso-restriction strong{color:var(--text)}
.iso-angular-view .iso-note{margin:.4rem 0;font-size:.9rem;line-height:1.4;color:var(--ink-2);overflow-wrap:anywhere}
.iso-table-region{max-width:100%;overflow-x:auto;margin:.5rem 0;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface)}
.iso-table-region:focus-visible{outline:2px solid var(--cyan-2);outline-offset:2px}
.iso-table-region table{width:100%;border-collapse:collapse;font-size:.88rem}
.iso-table-region caption{caption-side:top;padding:.55rem .7rem;font-size:.86rem;font-weight:600;color:var(--ink-2)}
/* overflow-wrap:anywhere would shrink the table's min-content width to one character and break numbers into vertical strings; break-word does not. */
.iso-table-region th,.iso-table-region td{padding:.45rem .4rem;overflow-wrap:break-word;vertical-align:top;line-height:1.35}
.iso-table-region td.num{white-space:nowrap}
/* 7.7.0 (WP7-11, lane F71b): a value with its uncertainty, or a range, may wrap between its two parts (each part stays whole), so that the
   summaries fit at 1353 px beside the 432 px settings column of the shell */
.iso-table-region td.num-parts{white-space:normal}
.iso-table-region td .iso-part{white-space:nowrap}
.iso-table-region th{text-transform:none;font-family:inherit;font-size:.82rem}
.iso-table-region th[scope="row"]{color:var(--ink);font-weight:600;background:var(--surface)}
.iso-table-region .num{font-variant-numeric:tabular-nums}
.iso-table-region td small{display:block;margin-top:.15rem;color:var(--muted);font-size:.76rem;line-height:1.3}
.iso-table-region td[data-tone="fail"] strong{color:var(--red)}
.iso-table-region td[data-tone="pass"] strong{color:var(--green)}
.iso-table-region td[data-tone="inconclusive"] strong,.iso-table-region td[data-tone="unclassified"] strong{color:var(--amber)}
.iso-angular-detail{margin:.6rem 0}
.iso-angular-detail .iso-table-region table{min-width:56rem}
.iso-angular-detail table.sticky-first th[scope="row"]{position:sticky;left:0;z-index:1;box-shadow:1px 0 0 var(--line)}
/* === end v753 B02 === */
/* === v753 B07 reactor === */
/* HBF-012 / R3D-C06: APG mode tabs, a separate "All panels" toggle, focused section headings never hidden
   under the sticky section bar (WCAG 2.4.11 via scroll-padding, technique C43). */
.workspace-tabs{align-items:center}
.workspace-tablist{display:flex;gap:4px;min-width:0}
.workspace-tabs [role=tab]{background:transparent;border-color:transparent;white-space:nowrap;flex:0 0 auto}
.workspace-tabs [role=tab][aria-selected=true]{background:var(--surface);border-color:var(--accent);color:var(--text)}
.workspace-tabs .workspace-show-all{flex:0 0 auto;margin-left:6px;border-color:var(--border)}
.workspace-tabs [role=tab]:focus-visible,.workspace-show-all:focus-visible,.science-shortcuts button:focus-visible{outline:2px solid var(--border);outline-offset:2px}
/* The sticky bar sits below the drawer's 9px padding, so scrolled headings clear it by 16px (bar height + padding + a gap). */
.workspace-drawer{scroll-padding-top:calc(var(--section-offset,0px) + 16px)}
.workspace-drawer .workspace-pane{scroll-margin-top:0}
.workspace-drawer [data-section] :is(h2,h3)[tabindex="-1"]:focus{outline:2px solid var(--border);outline-offset:3px;border-radius:3px}
.workspace-pane[role=tabpanel]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.science-shortcuts button[aria-current=true]{background:var(--surface);border-color:var(--accent);color:var(--text)}
/* One line that scrolls sideways, so the sticky bar never covers most of a narrow drawer. */
.workspace-drawer .science-shortcuts{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
.workspace-drawer .science-shortcuts button{flex:0 0 auto;white-space:nowrap}
.workspace-deeplink-notice{margin:0 0 4px;font-size:11px;color:var(--text)}
/* HBF-014 / R3D-C04: origin accounts read as a plain table: sentence-case row labels, right-aligned numbers, a ruled total. */
.origin-accounts .origin-table th[scope=row]{text-transform:none;letter-spacing:0;font-family:inherit;font-weight:600;font-size:.82rem;color:inherit;min-width:9.5rem}
.origin-accounts .origin-table th[scope=row] .source-note{display:block;font-weight:400;margin-top:2px}
.origin-accounts .origin-table td.num{text-align:right;white-space:nowrap}
.origin-accounts .origin-table tfoot :is(th,td){border-top:2px solid var(--line);font-weight:650}
.origin-accounts .origin-closure{margin:8px 0}
.origin-accounts details{margin:8px 0}
/* R3D-C01 / VR-03 / VR-B: persistent qualification rail (evidence class, component gates, net boundary) in its own grid row between
   the boundary line and the scene. Two fixed lines scroll sideways on a narrow screen; the overlays below shift down by the rail height. */
.hbf-workspace.has-qualification-rail{--rail-h:44px;grid-template-rows:56px 28px var(--rail-h) minmax(0,1fr) 86px}
.has-qualification-rail .hbf-stage.panel{grid-row:4}
.has-qualification-rail .workspace-timeline{grid-row:5}
.has-qualification-rail .workspace-drawer{top:calc(94px + var(--rail-h))}
.has-qualification-rail .workspace-camera{top:calc(100px + var(--rail-h))}
.has-qualification-rail .workspace-hud{top:calc(98px + var(--rail-h))}
.workspace-rail{grid-row:3;z-index:4;box-sizing:border-box;height:var(--rail-h,44px);display:flex;flex-direction:column;justify-content:center;background:var(--surface);border-bottom:1px solid var(--border);padding:0 14px;font-size:11px;line-height:20px;color:var(--accent);min-width:0}
.workspace-rail .rail-line{display:flex;align-items:center;gap:10px;margin:0;height:20px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.workspace-rail .rail-line::-webkit-scrollbar{display:none}
.workspace-rail .rail-key{flex:0 0 auto;color:var(--text-2);font-size:10px}
.workspace-rail .rail-class{flex:0 0 auto;color:var(--text);font-weight:650}
.workspace-rail[data-evidence-class=presentation-illustrative] .rail-class{color:var(--text)}
.workspace-rail[data-evidence-class=regression-fixture] .rail-class{color:var(--text)}
.workspace-rail[data-evidence-class=guided-numerical-fixture] .rail-class{color:var(--success)}
.workspace-rail .rail-flag{flex:0 0 auto;color:var(--text)}
.workspace-rail .rail-stale{color:var(--error)}
.workspace-rail .rail-scope{flex:0 0 auto;color:var(--text-2)}
.workspace-rail .rail-gates{display:inline-flex;gap:12px;flex:0 0 auto}
.workspace-rail .rail-gate{flex:0 0 auto;white-space:nowrap}
.workspace-rail .rail-gate[data-status=passed]{color:var(--success)}
.workspace-rail .rail-gate[data-status=failed]{color:var(--error);font-weight:650}
.workspace-rail .rail-gate[data-status=unavailable]{color:var(--text)}
.workspace-rail .rail-net{flex:0 0 auto;color:var(--accent)}
.workspace-rail .rail-net[data-direction=negative] .rail-net-value{color:var(--error)}
.workspace-rail .rail-net[data-direction=positive] .rail-net-value{color:var(--text)}
.workspace-rail[data-state=stale] .rail-gates,.workspace-rail[data-state=stale] .rail-net,.workspace-rail[data-state=unavailable] .rail-gates,.workspace-rail[data-state=unavailable] .rail-net{opacity:.55}
@media(max-width:850px){
  .hbf-workspace.has-qualification-rail{grid-template-rows:88px 24px var(--rail-h) minmax(0,1fr) 100px}
  .has-qualification-rail .workspace-drawer{top:calc(120px + var(--rail-h))}
  .has-qualification-rail .workspace-camera{top:calc(122px + var(--rail-h))}
  .has-qualification-rail .workspace-hud{top:auto}
  .workspace-rail{padding:0 8px}
}
@media(max-width:560px){
  /* Three lines on a phone: the class, then the four gates, then the net boundary, so nothing needs a sideways scroll. */
  .hbf-workspace.has-qualification-rail{--rail-h:64px;grid-template-rows:118px 24px var(--rail-h) minmax(0,1fr) 100px}
  .has-qualification-rail .workspace-drawer{top:calc(150px + var(--rail-h))}
  .has-qualification-rail .workspace-camera{top:calc(152px + var(--rail-h))}
  .workspace-rail .rail-line:nth-child(2){flex-wrap:wrap;height:40px;gap:0 8px;overflow:hidden;white-space:normal}
  .workspace-rail .rail-line:nth-child(2)>.rail-key:first-child{display:none}
  .workspace-rail .rail-gates{gap:8px}
  .workspace-rail .rail-net-desc{display:none}
}
/* F-17 (V02 review): while a download notice sat in the playback row, `.hbf-workspace:has(.workspace-timeline>.download-receipt)` (specificity
   0,3,0, above) replaced the five-row template of the qualification-rail layout (0,2,0) with a four-row one: the rail took the flexible row, the
   scene fell into the auto row and collapsed to 0 px. The rail layout now keeps its five rows while a notice is shown. The playback row grows by
   --notice-h, a fixed allowance, so the scene does not depend on how the file name wraps; the notice sticks to the bottom of that row and
   scroll-padding keeps whatever is scrolled or focused in the playback bar clear of it, so no control is hidden behind the notice. The selectors
   are more specific than the notice rules above, so this holds at every breakpoint. */
.hbf-workspace.has-qualification-rail:has(.workspace-timeline>.download-receipt){--notice-h:72px;grid-template-rows:56px 28px var(--rail-h) minmax(0,1fr) calc(86px + var(--notice-h))}
@media(max-width:850px){.hbf-workspace.has-qualification-rail:has(.workspace-timeline>.download-receipt){grid-template-rows:88px 24px var(--rail-h) minmax(0,1fr) calc(100px + var(--notice-h))}}
@media(max-width:560px){.hbf-workspace.has-qualification-rail:has(.workspace-timeline>.download-receipt){grid-template-rows:118px 24px var(--rail-h) minmax(0,1fr) calc(100px + var(--notice-h))}}
.has-qualification-rail .workspace-timeline:has(>.download-receipt){max-height:none;min-height:0;scroll-padding-bottom:calc(var(--notice-h) + 8px)}
.has-qualification-rail .workspace-timeline>.download-receipt{position:sticky;bottom:0}
/* The "Input examples" panel: stacked buttons that wrap, the loaded one pressed. */
.preset-buttons{display:grid;gap:6px;margin:8px 0}
.preset-button{text-align:left;white-space:normal;line-height:1.3;height:auto;text-transform:none;letter-spacing:0;font-weight:600}
.preset-button[aria-pressed=true]{background:var(--surface);border-color:var(--accent);color:var(--text)}
.preset-detail .preset-class{margin:6px 0}
.preset-detail .preset-failing{color:var(--text)}
.preset-detail .preset-changes{margin:4px 0 8px 18px;padding:0}
.preset-explanation{border:1px dashed var(--accent);border-radius:8px;padding:8px 10px;margin:8px 0;font-size:12px}
/* R3D-C03: the model-dependency graph, a chain of stages and the typed-boundary table. */
.dependency-graph .dependency-chain{display:flex;flex-wrap:wrap;gap:6px 22px;list-style:none;margin:8px 0;padding:0}
.dependency-graph .dependency-chain li{position:relative;border:1px solid var(--line);border-radius:8px;padding:6px 10px;min-width:8rem;max-width:100%}
.dependency-graph .dependency-chain li:not(:last-child)::after{content:"\2192";position:absolute;right:-18px;top:50%;transform:translateY(-50%)}
.dependency-graph .dependency-chain li[data-basis=not-computed]{border-style:dashed;border-color:var(--border)}
.dependency-graph .dependency-chain .source-note{display:block;overflow-wrap:anywhere}
.dependency-graph .dependency-table th[scope=row]{text-transform:none;letter-spacing:0;font-family:inherit;font-weight:600;font-size:.82rem;color:inherit;min-width:9.5rem}
.dependency-graph .dependency-table .source-note{display:block;font-weight:400;margin-top:2px;overflow-wrap:anywhere}
.dependency-graph .dependency-table td{vertical-align:top;min-width:9rem}
.dependency-graph .dependency-table tr[data-matched=false] th[scope=row]{border-left:3px solid var(--border)}
.dependency-graph details{margin:8px 0}
.dependency-graph .dependency-omitted{margin:6px 0 6px 18px;padding:0}
/* R3D-C05: per-card freshness. Every result card carries a stamp with the run id; a historical card is dimmed, hatched and says so. */
.result-stamp{margin:6px 0;padding:4px 8px;border-radius:6px;border:1px solid var(--line);font-size:.78rem;font-weight:650;line-height:1.35;color:var(--success);overflow-wrap:anywhere}
.result-stamp[data-state=historical]{background:var(--surface);color:var(--text);border-color:var(--border)}
.result-stamp[data-state=none]{color:var(--muted)}
[data-result-group][data-freshness=historical]{position:relative}
[data-result-group][data-freshness=historical]>:not([data-result-stamp]):not(h2):not(h3){opacity:.55}
[data-result-group][data-freshness=historical] .result-headline .value,.workspace-rail[data-freshness=historical] .rail-net-value{text-decoration:line-through}
.workspace-primary-summary [data-freshness=historical]{color:var(--text)}
.rail-run{font-size:.74rem;white-space:nowrap;color:var(--success)}
.rail-run[data-freshness=historical]{color:var(--text)}
#exportState{margin:6px 0 0}
/* R3D-C07: scientific display preset. Every display-only control is tagged "overlay" (draws an input or computed quantity) or "appearance" (illustrative, no physical meaning). */
.display-statement,.display-preset-status{margin:6px 0}
.display-group{margin:8px 0;padding:6px 10px;border:1px solid var(--line);border-radius:8px}
.display-group legend{padding:0 6px;font-size:.78rem;font-weight:650}
.display-group[data-display-group=appearance] legend{color:var(--text)}
.display-group label{display:block;margin:4px 0}
label[data-display-kind]::after{margin-left:6px;font-size:.66rem;font-weight:650;color:var(--muted)}
label[data-display-kind=overlay]::after{content:"overlay"}
label[data-display-kind=appearance]::after{content:"appearance";color:var(--text)}
[data-display-preset][aria-pressed=true]{background:var(--surface);border-color:var(--success)}
/* R3D-C08: evidence card for the selected component: status chip, parameter origins, linked dependency, run scope. */
.component-evidence{margin:8px 0;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:.82rem}
.component-evidence h3{margin:0 0 6px;font-size:.86rem}
.component-evidence p{margin:6px 0}
.evidence-status{display:inline-block;padding:1px 8px;border-radius:999px;border:1px solid var(--line);font-size:.7rem;font-weight:700}
.evidence-status[data-status=illustrative]{color:var(--text);border-color:var(--border);background:var(--surface)}
.evidence-status[data-status=modelled]{color:var(--success);border-color:var(--success);background:var(--surface)}
.evidence-status[data-status=sourced]{color:var(--accent);border-color:var(--border);background:var(--surface)}
.evidence-status[data-status=measured]{color:var(--text);border-color:var(--border)}
.evidence-caption{font-weight:650}
.evidence-parameters{list-style:none;margin:4px 0;padding:0}
.evidence-parameters li{padding:5px 0;border-top:1px solid var(--line)}
.evidence-line{display:flex;flex-wrap:wrap;gap:2px 10px;justify-content:space-between}
.evidence-name{font-weight:650}
.evidence-origin{font-size:.76rem}
.evidence-basis{margin-top:1px;overflow-wrap:anywhere}
.evidence-tag{font-size:.62rem;font-weight:650;color:var(--muted)}
.evidence-value{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.component-evidence[data-freshness=historical] .evidence-value{opacity:.55;text-decoration:line-through}
.evidence-run[data-state=historical]{color:var(--text)}
/* The inspector grows while it is open so the evidence card is readable without scrolling a narrow strip. */
.workspace-assembly[open]{max-height:62vh;width:min(360px,calc(100vw - 28px))}
@media(min-width:851px){.workspace-drawer:not([hidden])~.workspace-assembly[open]{width:min(340px,calc(100vw - var(--scene-left) - 190px))}}
/* R3D-C10: the orbit evidence block that always sits beside the tracer energy invariant, and its chip in the qualification rail. */
/* 7.7.0 (R71-F34, lane F71c): a plain bordered box; the words of the table carry the verdict, no coloured side bar. Spacing on the 4 px grid. */
.orbit-evidence{margin:8px 0;padding:8px 12px;border:1px solid var(--line);border-radius:8px;font-size:.84rem}
.orbit-evidence h4{margin:0 0 4px;font-size:.9rem}
.orbit-evidence p{margin:5px 0}
.orbit-evidence-list{margin:6px 0;padding-left:1.15em}
.orbit-evidence-list li{margin:5px 0;overflow-wrap:anywhere}
.orbit-evidence-list li[data-state=failed],.orbit-evidence-list li[data-state=not-demonstrated],.orbit-evidence-list li[data-state=classification-changed],.orbit-evidence-list li[data-state=changed],.orbit-evidence-list li[data-state=unavailable]{color:var(--text)}
.orbit-evidence-host[data-state=historical] .orbit-evidence{opacity:.7}
.orbit-evidence .tablewrap{margin:8px 0}
.rail-orbit{font-size:.78rem;color:var(--muted);white-space:nowrap}
.rail-orbit[data-orbit-chip=consistent]{color:var(--success)}
.rail-orbit[data-orbit-chip=not-demonstrated],.rail-orbit[data-orbit-chip=classification-changed],.rail-orbit[data-orbit-chip=unavailable]{color:var(--text)}
/* === end v753 B07 === */
/* === v753 B04 torus === */
/* Named input examples of the Torus notebook (TL-03). The loaded example is also stated in text (#inputExampleNature) and
 * through aria-pressed; the thicker border only repeats it. Long names stay readable: no forced upper case, they wrap. */
.input-examples [data-input-example] { display: block; width: 100%; margin: 0 0 8px; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; line-height: 1.35; }
.input-examples [data-input-example][aria-pressed="true"] { border-width: 2px; border-style: solid; font-weight: 700; }
.input-examples #inputExampleNature { overflow-wrap: anywhere; }
/* === end v753 B04 === */
/* === v753 B08 shared research UI === */
/* VR-01 current-model frame card (measured-field diagnostics). State is always stated in text. */
/* 7.7.0 (lane F71c, R71-F26 and F31): the terms of the frame card in --text-2 (4.5:1 and more on the grey surface), 14 px type, 4 px grid. */
.model-frame-card{border:1px solid var(--line-2);border-radius:var(--r-md);padding:12px 16px;margin:12px 0;background:var(--surface);min-width:0}
.model-frame-card h3{margin:0 0 4px;font-size:16px}
.model-frame-facts{display:grid;grid-template-columns:minmax(8rem,max-content) minmax(0,1fr);gap:4px 16px;margin:8px 0;font-size:14px}
.model-frame-facts dt{color:var(--text-2)}
.model-frame-facts dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.model-frame-check{overflow-wrap:anywhere}
.model-frame-transform-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:8px 16px}
.model-frame-transform-fields label{display:flex;flex-direction:column;gap:4px;font-size:14px}
.model-frame-transform-fields textarea{font-family:var(--font)}
@media(max-width:560px){.model-frame-facts{grid-template-columns:minmax(0,1fr)}}
/* I-P2-03 / TL-04 / F-P2 shared readable tables and the comparison summary. A scroll region is focusable (tabindex 0) and named; the
   identifier column stays put and the verdict column follows it, so neither needs horizontal scrolling to be read. */
.readable-table-region{max-width:100%;overflow-x:auto;margin:.5rem 0;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface)}
.readable-table-region:focus-visible{outline:2px solid var(--cyan-2);outline-offset:2px}
.readable-table{width:100%;border-collapse:collapse;font-size:.88rem}
.readable-table caption{caption-side:top;padding:.55rem .7rem;font-size:.86rem;font-weight:600;color:var(--ink-2);text-align:left}
/* break-word, not anywhere: anywhere shrinks the min-content width to one character and splits numbers into vertical strings. */
.readable-table th,.readable-table td{padding:.45rem .6rem;overflow-wrap:break-word;vertical-align:top;line-height:1.35}
.readable-table th{text-transform:none;font-family:inherit;font-size:.82rem}
.readable-table th[scope="row"]{color:var(--ink);font-weight:600;background:var(--surface);min-width:11rem;max-width:20rem}
.readable-table.sticky-first th[scope="row"]{position:sticky;left:0;z-index:1;box-shadow:1px 0 0 var(--line)}
.readable-table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.readable-table td small,.readable-table th small{display:block;margin-top:.15rem;color:var(--muted);font-size:.76rem;line-height:1.3;font-weight:400;overflow-wrap:anywhere}
.readable-table td[data-tone="changed"] strong{color:var(--amber)}
.readable-table td[data-tone="unavailable"] strong{color:var(--red)}
.readable-table td[data-tone="within"] strong{color:var(--green)}
.readable-table td[data-tone="identical"] strong{color:var(--muted)}
.readable-table-detail{margin:.4rem 0}
.readable-table-note{margin:.3rem 0;color:var(--muted);font-size:.86rem}
/* Compare runs (7.7.0, WP7-11, R71-F31 and F34): plain lines on the 4 px grid; the group line is text, no coloured side bar */
.cmp-body{margin-top:8px}
.cmp-lede{margin:8px 0;font-size:14px;line-height:20px;overflow-wrap:anywhere}
.cmp-families{margin:4px 0 8px;padding:0;border:0;color:var(--text-2);font-size:13px;line-height:20px;overflow-wrap:anywhere}
.cmp-body h3{margin:16px 0 4px;font-size:14px;line-height:20px}
.cmp-body h4{margin:12px 0 4px;font-size:13px;line-height:20px}
.cmp-body details{margin:8px 0}
.cmp-body details>summary{cursor:pointer}
@media(max-width:560px){.readable-table th[scope="row"]{min-width:8.5rem;max-width:10rem}}
/* Item 5: retained-study freshness banner. The state is stated in words (Current / Previous run / Independent of the main run);
   the border colour only repeats it. The Evaluate action and its reason sit beside the sentence, never behind a tooltip. */
.study-freshness{display:grid;gap:.35rem;margin:.5rem 0;padding:.5rem .7rem;border:1px solid var(--line);border-left:4px solid var(--line-3);border-radius:var(--r-md);background:var(--surface);min-width:0}
.study-freshness[hidden]{display:none}
.study-freshness[data-state="current"]{border-left-color:var(--green)}
.study-freshness[data-state="previous"]{border-left-color:var(--amber)}
.study-freshness[data-state="independent"]{border-left-color:var(--cyan-2)}
.study-freshness-text{margin:0;line-height:1.4;overflow-wrap:anywhere}
.study-freshness-text:focus-visible{outline:2px solid var(--cyan-2);outline-offset:2px}
.study-freshness-detail{display:block;margin-top:.15rem;color:var(--muted);font-size:.86rem}
.study-freshness-action{justify-self:start}
.study-freshness-action[hidden],.study-freshness-reason[hidden]{display:none}
.study-freshness-reason{margin:0;font-size:.84rem;overflow-wrap:anywhere}
/* === end v753 B08 === */
/* === v753 B03 virtual === */
/* HBF-011 / VR-02: field-level domain messages (range and unit) beside the control; the empty slot takes no space. */
.field-error { display: block; color: var(--red); font-size: .82rem; line-height: 1.3; margin-top: .2rem; overflow-wrap: anywhere; }
.field-error:empty { display: none; }
input[aria-invalid="true"] { border-color: var(--red); outline: 2px solid var(--error); outline-offset: 1px; }
/* Item 2 (VR-03 / VR-B): observation time in physical seconds, derived plan, bounce ratio beside the animation. */
.observation-time { min-width: 0; margin: .85rem 0 0; padding: .35rem .7rem .5rem; border: 1px solid var(--line-2); border-radius: 8px; }
.observation-time legend { padding: 0 .4rem; color: var(--cyan-2); font-weight: 650; font-size: .82rem; }
.observation-time input[readonly] { opacity: .78; border-style: dashed; }
.observation-derived { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .6rem 0 .3rem; }
.observation-derived .metric { padding: .45rem .55rem; min-width: 0; }
.observation-derived .metric .value { font-size: 1rem; overflow-wrap: anywhere; }
.observation-derived .note { grid-column: 1 / -1; margin: 0; }
.observation-status[data-kind="error"] { color: var(--red); }
#liveMetrics .observation-note { grid-column: 1 / -1; margin: .3rem 0 0; }
.observation-ratio { flex: 0 0 auto; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; min-width: 0; font-size: .82rem; color: var(--muted); }
.observation-ratio .label { color: var(--faint); font: 600 .73rem var(--mono); }
.observation-ratio strong { color: var(--cyan-2); font: 700 1rem var(--mono); }
.observation-ratio small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.observation-ratio[data-stale="true"] { opacity: .6; }
.observation-ratio[data-stale="true"] strong::after { content: " · previous run"; font-weight: 400; font-size: .74rem; color: var(--muted); }
@media (max-width: 850px) { .playback .observation-ratio { grid-column: 1 / -1; } }
/* Item 3 (audit Lab 03 scientific correction 1): model cards beside the values they explain, and the four version labels. The results sit in a
   narrow side pane in the immersive workspace, so rows stack by default and become two columns only where the card itself is wide. */
.model-group { margin: .9rem 0; min-width: 0; }
.model-group h4 { margin: 0 0 .4rem; color: var(--cyan-2); font-size: .8rem; font-weight: 650; }
.model-card-slot { min-width: 0; }
.model-card, .model-layers { container-type: inline-size; min-width: 0; }
.model-card { margin: .55rem 0 0; border-color: var(--line-2); border-radius: 8px; background: var(--panel-2); }
.model-card > summary { padding: .55rem .7rem; font-size: .84rem; line-height: 1.35; }
.model-card > summary:focus-visible { outline: 2px solid var(--cyan-2); outline-offset: -2px; }
.model-card-title { font-weight: 650; }
.model-card-id { display: inline-block; max-width: 100%; margin-top: .1rem; font: 600 .76rem var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink); overflow-wrap: anywhere; vertical-align: baseline; }
.model-card-id[data-state="emitted"] { color: var(--cyan-2); }
.model-card-id[data-state="not-emitted"], .model-card-id[data-state="label-only"] { font-weight: 400; color: var(--muted); }
.model-card-hint { display: inline-block; margin-left: .35rem; color: var(--faint); font-size: .68rem; font-weight: 500; }
.model-card > .model-card-body { margin-inline: 0; padding: .55rem .75rem .8rem; font-size: .88rem; line-height: 1.45; }
.model-card-headline { margin: 0 0 .35rem; }
.model-card-subhead { margin: .8rem 0 .25rem; color: var(--muted); font-size: .72rem; font-weight: 650; }
.model-card-list { margin: .15rem 0 0; padding-left: 1.05rem; }
.model-card-list li { margin: .25rem 0; overflow-wrap: anywhere; }
.model-card-rows, .model-layer-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: .15rem 0 0; }
.model-card-rows dt, .model-layer-list dt { margin-top: .5rem; color: var(--muted); }
.model-card-rows dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.model-layers { margin: .4rem 0 1rem; padding: .6rem .8rem .75rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); }
.model-layers-line { margin: 0 0 .4rem; font: 600 .78rem var(--mono); color: var(--cyan-2); overflow-wrap: anywhere; }
.model-layer-list { font-size: .88rem; line-height: 1.45; }
.model-layer-list dt { color: var(--ink); font-weight: 650; }
.model-layer-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.model-layer-value { font: 600 .8rem var(--mono); letter-spacing: 0; text-transform: none; color: var(--cyan-2); }
.model-layer-detail { color: var(--muted); font-size: .8rem; }
.model-layer-meaning { display: block; margin-top: .25rem; color: var(--muted); }
.model-layer-parts { margin-top: .35rem; font-size: .8rem; }
@container (min-width: 34rem) {
  .model-card-rows { grid-template-columns: minmax(9rem, 36%) minmax(0, 1fr); gap: .3rem .9rem; }
  .model-card-rows dt { margin-top: 0; }
  .model-layer-list { grid-template-columns: minmax(8rem, 22%) minmax(0, 1fr); gap: .55rem .9rem; }
  .model-layer-list dt { margin-top: 0; }
}
/* === end v753 B03 === */
/* === v753 B01 fusionsim === */
/* Three independent reactivity statuses, the headline retained-table rate and the source card beside it. */
.fusion-statuses { margin: 0 0 14px; }
.fusion-statuses h3 { margin: 0 0 8px; }
.fusion-status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fusion-status { padding: 10px 12px; border: 1px solid var(--line-2); border-left-width: 4px; border-radius: 8px; background: var(--sunken); }
.fusion-status[data-status="verified"], .fusion-status[data-status="benchmarked"] { border-left-color: var(--blue); }
.fusion-status[data-status="supported-not-benchmarked"] { border-left-color: var(--amber); }
.fusion-status[data-status="outside-supported-domain"], .fusion-status[data-status="not-verified"], .fusion-status[data-status="failed"], .fusion-status[data-status="unavailable"] { border-left-color: var(--red); }
.fusion-status[data-status="not-established"] { border-left-color: var(--violet); }
.fusion-status-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.fusion-status-title { font-weight: 600; color: var(--ink); }
.fusion-status-text { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fusion-headline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 0 0 12px; }
.fusion-headline-rate { flex: 1 1 14rem; min-width: 0; }
.fusion-source-card { flex: 2 1 22rem; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.fusion-source-card h3 { margin: 0 0 6px; }
.fusion-source-card p { margin: 6px 0; }
.fusion-source-card .field { margin: 8px 0; }
.fusion-source-card select { width: 100%; max-width: 100%; }
.fusion-source-card .tablewrap { overflow-x: auto; }
.fusion-source-dl { display: grid; grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; }
.fusion-source-dl dt { color: var(--muted); font-size: 13px; }
.fusion-source-dl dd { margin: 0; color: var(--ink-2); }
@media (max-width: 480px) { .fusion-source-dl { grid-template-columns: minmax(0, 1fr); } .fusion-source-dl dd { margin-bottom: 6px; } }
.fusion-rate-caption { margin: 6px 0 0; }
/* Keep the symbol case of the headline label: uppercase would turn the rate <σv> into <ΣV>. */
.fusion-headline .metric .label { text-transform: none; }
/* Burn domain policy: exit event, events table and plots (solid before the first exit, dashed with hollow markers after). */
.fusion-burn-view { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.fusion-burn-view h3 { margin: 0 0 6px; }
.fusion-burn-policy, .fusion-burn-exit-line { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.fusion-burn-svg { display: block; width: 100%; max-width: 720px; height: auto; margin: 8px 0 2px; }
.fusion-burn-text { fill: var(--ink-2); font-size: 11px; }
.fusion-burn-grid { stroke: var(--line-2); stroke-width: 1; }
.fusion-burn-level { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.fusion-burn-level-text { fill: var(--muted); }
.fusion-burn-exit { stroke: var(--red); stroke-width: 1.4; stroke-dasharray: 6 4; }
.fusion-burn-exit-text { fill: var(--red); }
.fusion-burn-line { fill: none; stroke-width: 2.4; }
.fusion-burn-post { stroke-dasharray: 7 5; }
.fusion-burn-s-ion { stroke: var(--blue); fill: var(--blue); }
.fusion-burn-s-electron { stroke: var(--amber); fill: var(--amber); }
.fusion-burn-s-fusion { stroke: var(--violet); fill: var(--violet); }
.fusion-burn-t-ion { fill: var(--blue); } .fusion-burn-t-electron { fill: var(--amber); } .fusion-burn-t-fusion { fill: var(--violet); }
.fusion-burn-line.fusion-burn-s-ion, .fusion-burn-line.fusion-burn-s-electron, .fusion-burn-line.fusion-burn-s-fusion { fill: none; }
.fusion-burn-mark.fusion-burn-post { fill: none; stroke-width: 1.6; stroke-dasharray: none; }
.fusion-burn-events td, .fusion-burn-events th { white-space: nowrap; }
/* Alpha-energy deposition interface: the controls sit under the plasma scenario, the accounting below the headline metrics. */
.fusion-deposition-controls { margin: .85rem 0; padding: .1rem .8rem .5rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.fusion-deposition-controls h3 { margin: .6rem 0 .1rem; font-size: 1rem; }
.fusion-deposition-controls select:disabled, .fusion-deposition-controls input:disabled, #deposit:disabled { opacity: .55; }
.fusion-deposition { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.fusion-deposition h3 { margin: 0 0 6px; }
.fusion-deposition-mode { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.fusion-deposition-table th:not(:first-child), .fusion-deposition-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.fusion-deposition-table tr[data-deposition-row="sum"] > *, .fusion-deposition-table tr[data-deposition-row="source"] > * { border-top: 1px solid var(--line-2); font-weight: 600; }
/* === end v753 B01 === */

/* === v754 L2 FusionSim === */
/* Data layer (audit F-W2) on the Sources tab: integrity line, source records, benchmark tables, full source tables and the question form. */
#dataLayerBody h3 { margin: 18px 0 8px; }
#dataLayerBody > h3:first-child { margin-top: 0; }
#dataLayerBody h4 { margin: 12px 0 6px; }
.fdl-integrity { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--green); border-radius: 8px; background: var(--sunken); line-height: 1.5; overflow-wrap: anywhere; }
.fdl-dl { display: grid; grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; }
.fdl-dl dt { color: var(--muted); font-size: 13px; }
.fdl-dl dd { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.fdl-provenance { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.fdl-sources { display: grid; gap: 8px; margin: 10px 0; }
.fdl-source { padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.fdl-source > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; cursor: pointer; }
.fdl-source[open] > summary { margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.fdl-source-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fdl-check { font-size: 12px; color: var(--muted); }
.fdl-check[data-state="verified"] { color: var(--green); }
.fdl-check[data-state="mismatch"] { color: var(--red); }
.fdl-check[data-state="incomplete"], .fdl-check[data-state="not-verified"] { color: var(--amber); }
.fdl-files { display: grid; gap: 8px; margin: 6px 0; padding: 0; list-style: none; }
.fdl-files li { padding-left: 8px; border-left: 3px solid var(--line-2); }
.fdl-files li[data-state="verified"] { border-left-color: var(--green); }
.fdl-files li[data-state="mismatch"] { border-left-color: var(--red); }
.fdl-files li[data-state="not-loaded"], .fdl-files li[data-state="not-verified"] { border-left-color: var(--amber); }
.fdl-hash, .fdl-path { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.fdl-note { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fdl-state { font-weight: 600; }
.fdl-coded { margin: 8px 0 4px; overflow-wrap: anywhere; }
.fdl-facts { margin: 6px 0; padding-left: 1.2rem; }
.fdl-index th[scope="row"], .fdl-benchmarks th[scope="row"], .fdl-window-table th[scope="row"] { text-align: left; font-weight: 600; }
.fdl-index td, .fdl-benchmarks td, .fdl-benchmarks th, .fdl-table td { vertical-align: top; }
.fdl-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fdl-benchmarks tr[data-result="pass"] > th:first-child { box-shadow: inset 4px 0 0 var(--green); }
.fdl-benchmarks tr[data-result="fail"] > th:first-child { box-shadow: inset 4px 0 0 var(--red); }
.fdl-result { font-weight: 700; }
.fdl-summary { margin: 8px 0; font-weight: 600; color: var(--ink); }
.fdl-window-table th, .fdl-window-table td { white-space: normal; }
.fdl-shares { margin: 10px 0; }
.fdl-chart { margin: 12px 0; }
.fdl-chart figcaption { margin-top: 6px; }
.fdl-table tr[data-excluded="true"] > td { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--red); }
.fdl-table tr[data-excluded="true"] > td:last-child { text-decoration: none; color: var(--amber); }
.fdl-query { display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; margin: 8px 0; }
.fdl-query .help, .fdl-query .buttonrow { grid-column: 1 / -1; }
/* 7.7.0 (WP7-11, lane F71b; R71-F14): the source of a look-up has a row of its own, so that its longest name is not cut */
.fdl-query .fdl-source { grid-column: 1 / -1; }
.fdl-query select, .fdl-query input { width: 100%; max-width: 100%; }
.fdl-answer { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--blue); border-radius: 8px; background: var(--sunken); line-height: 1.5; overflow-wrap: anywhere; }
.fdl-answer[data-state="stale"] { opacity: .85; border-left-color: var(--amber); }
.fdl-answer p { margin: 6px 0; }
.fdl-value { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Header text keeps its case so that units read keV, not KEV; row headers read as text, not as a column label. */
#dataLayerPanel table th { text-transform: none; font-family: inherit; font-size: .82rem; }
#dataLayerPanel table th[scope="row"] { color: inherit; background: transparent; }
#dataLayerPanel .tablewrap[role="region"]:focus-visible { outline: 2px solid var(--cyan-2); outline-offset: 2px; }
/* A long table is a bounded scroll region with a fixed header row, so the panel stays navigable. */
.fdl-scroll { max-height: 30rem; overflow: auto; }
.fdl-scroll thead th { position: sticky; top: 0; z-index: 1; }
/* The lab's global details and summary rules add outer margins and an indent; the records sit tight and use the whole width. */
.fdl-sources > .fdl-source, .fdl-fold { margin: 0; }
.fdl-fold { margin: 10px 0; }
.fdl-source > :not(summary) { margin-inline: 0; }
.fdl-source > summary { font: inherit; text-transform: none; letter-spacing: normal; color: inherit; padding: 8px 0; }
#dataLayerPanel .field label { flex-wrap: wrap; }
#dataLayerPanel .field label > .fdl-label-note { flex: 1 1 11rem; min-width: 0; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  #dataLayerPanel .field label > .fdl-label-note { text-align: left; }
  .fdl-dl { grid-template-columns: minmax(0, 1fr); }
  .fdl-dl dd { margin-bottom: 6px; }
  .fdl-source { padding: 0 10px; }
  .fdl-source > summary { gap: 4px 8px; }
}
/* Radiation terms (audit F-W4): the controls in the left column, then the inventory, the net, the optically-thin checks and the model notes in the result. */
.frt-controls select:disabled, .frt-controls input:disabled { opacity: .55; }
.frt-panel { margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.frt-panel h3 { margin: 0 0 6px; }
.frt-panel h4 { margin: 10px 0 6px; }
.frt-lead { margin: 6px 0 10px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.frt-table th, .frt-table td { vertical-align: top; }
/* Header text keeps its case so that units read keV, W m⁻³; row headers read as text, not as a column label. */
.frt-table th { text-transform: none; font-family: inherit; font-size: .82rem; }
.frt-table th[scope="row"] { color: inherit; background: transparent; text-align: left; font-weight: 600; }
.frt-table td[data-frt-cell="power"], .frt-table td[data-frt-cell="energy"] { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frt-table td[data-frt-cell="model"] { overflow-wrap: anywhere; }
.frt-table td[data-frt-cell="domain"] { min-width: 17rem; overflow-wrap: anywhere; line-height: 1.45; }
.frt-table .frt-role, .frt-table .frt-bound { font-weight: 400; color: var(--muted); font-size: 12px; }
.frt-table .frt-note { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.frt-table tr[data-frt-value="off"] > td, .frt-table tr[data-frt-value="not-modelled"] > td { color: var(--muted); }
.frt-table tr[data-frt-value="unavailable"] > th:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.frt-table tr[data-frt-value="number"][data-frt-kind="upper-bound"] > th:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.frt-scroll { max-height: 34rem; overflow: auto; }
.frt-scroll thead th { position: sticky; top: 0; z-index: 1; }
.frt-panel .tablewrap[role="region"]:focus-visible { outline: 2px solid var(--cyan-2); outline-offset: 2px; }
.frt-net, .frt-optical { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--blue); border-radius: 8px; background: var(--bg); line-height: 1.5; overflow-wrap: anywhere; }
.frt-net[data-frt-net-state="incomplete"], .frt-optical[data-frt-optical="thick-band-present"], .frt-optical[data-frt-optical="unavailable"] { border-left-color: var(--amber); }
.frt-optical[data-frt-optical="contradicted"] { border-left-color: var(--red); }
.frt-net p, .frt-optical p { margin: 6px 0; }
.frt-net-value strong { font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.frt-checks { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); gap: 4px 10px; margin: 8px 0; }
.frt-checks dt { color: var(--muted); font-size: 13px; }
.frt-checks dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.frt-limits, .frt-statements { margin: 8px 0; padding-left: 1.2rem; color: var(--ink-2); line-height: 1.5; }
.frt-models { margin: 10px 0 0; }
.frt-model { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); }
.frt-model h5 { margin: 0 0 4px; font-size: .95rem; }
.frt-model p { margin: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .frt-checks { grid-template-columns: minmax(0, 1fr); }
  .frt-checks dd { margin-bottom: 6px; }
  .frt-panel { padding: 8px 10px; }
}
/* === end v754 L2 === */
/* 7.7.0 (lane F71c, R71-F31): spacing on the 4 px grid and type on the 12/13/14 px scale of the application UI; no chip rule. */
/* === v754 L4A equilibrium-verification === */
/* Verification panels of the Torus Lab (equilibrium solver, COCOS, source and profile arithmetic). Every selector is prefixed l4a-. */
.l4a-verify { margin: 12px 0; }
.l4a-verify > summary, .l4a-panel > summary { cursor: pointer; font-weight: 600; }
.l4a-verify > summary:focus-visible, .l4a-panel > summary:focus-visible { outline: 2px solid var(--torus-focus, var(--accent)); outline-offset: 2px; }
.l4a-panel { margin: 8px 0; padding: 4px 12px 12px; border: 1px solid var(--torus-divider, var(--border)); border-radius: 8px; background: var(--torus-surface, var(--surface)); }
.l4a-panel h3 { margin: 16px 0 4px; font-size: 14px; }
.l4a-panel h4 { margin: 16px 0 4px; font-size: 13px; }
.l4a-block { margin: 16px 0 0; padding-top: 4px; border-top: 1px solid var(--torus-divider, var(--border)); }
.l4a-block > h3 { margin-top: 8px; }
.l4a-panel select { max-width: 100%; }
.l4a-panel button[aria-disabled="true"] { opacity: .6; cursor: progress; }
.l4a-state { margin: 8px 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.l4a-headline { margin: 8px 0; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.l4a-subhead { margin: 8px 0 4px; font-weight: 600; font-size: 13px; }
.l4a-statement, .l4a-detail { display: block; font-weight: 400; font-size: 12px; line-height: 1.45; }
.l4a-statement { color: var(--torus-muted, var(--text-2)); }
.l4a-detail { color: var(--error); }
.l4a-tableblock { margin: 8px 0; }
.l4a-caption { margin: 8px 0 4px; font-size: 12px; line-height: 1.45; color: var(--torus-muted, var(--text-2)); overflow-wrap: anywhere; }
.l4a-tablewrap { margin: 4px 0 8px; }
.l4a-tablewrap:focus-visible { outline: 2px solid var(--torus-focus, var(--accent)); outline-offset: 2px; }
.l4a-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.l4a-table th, .l4a-table td { padding: 4px 8px; border-bottom: 1px solid var(--torus-divider, var(--border)); text-align: right; vertical-align: top; text-transform: none; letter-spacing: normal; }
.l4a-table th[scope="colgroup"] { text-align: center; border-bottom: 2px solid var(--torus-divider, var(--border)); }
.l4a-table th:first-child, .l4a-table td:first-child { text-align: left; }
.l4a-table th small { display: block; font-weight: 400; }
.l4a-audit-table td:first-child, .l4a-audit-table th:first-child { min-width: 14rem; }
.l4a-audit-table td:last-child, .l4a-audit-table th:last-child, .l4a-cocos-table td:last-child, .l4a-cocos-table th:last-child { text-align: left; }
.l4a-audit-table tr[data-status="differs"] > *, .l4a-roundtrip-table tr[data-status="differs"] > * { background: var(--surface); }
.l4a-dl { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: 4px 12px; margin: 8px 0; font-size: 13px; line-height: 1.5; }
.l4a-dl dt { color: var(--torus-muted, var(--text-2)); font-weight: 600; overflow-wrap: anywhere; }
.l4a-dl dd { margin: 0; overflow-wrap: anywhere; }
.l4a-list { margin: 8px 0 8px 16px; padding: 0; font-size: 13px; line-height: 1.5; }
.l4a-list li { margin: 4px 0; overflow-wrap: anywhere; }
.l4a-more { margin: 8px 0; font-size: 13px; }
@media (max-width: 479px) { .l4a-dl { grid-template-columns: 1fr; } .l4a-panel { padding: 4px 8px 12px; } }
/* === end v754 L4A === */
/* === v754 L4B coil-verification === */
/* Coil-field panels of the Torus Lab (code verification and near-conductor reliability). Every selector is prefixed l4b-; chips, tables, lists and
   definition lists are built by profile-dom.mjs and styled by the l4a- block above. */
.l4b-verify { margin: 12px 0; }
.l4b-verify > summary, .l4b-panel > summary { cursor: pointer; font-weight: 600; }
.l4b-verify > summary:focus-visible, .l4b-panel > summary:focus-visible, .l4b-more > summary:focus-visible { outline: 2px solid var(--torus-focus, var(--accent)); outline-offset: 2px; }
.l4b-panel { margin: 8px 0; padding: 4px 12px 12px; border: 1px solid var(--torus-divider, var(--border)); border-radius: 8px; background: var(--torus-surface, var(--surface)); }
.l4b-panel h3 { margin: 16px 0 4px; font-size: 14px; }
.l4b-panel button[aria-disabled="true"] { opacity: .6; cursor: progress; }
.l4b-block { margin: 16px 0 0; padding-top: 4px; border-top: 1px solid var(--torus-divider, var(--border)); }
.l4b-block > h3 { margin-top: 8px; }
.l4b-state { margin: 8px 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.l4b-headline { margin: 8px 0; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.l4b-statement { display: block; font-weight: 400; font-size: 12px; line-height: 1.45; color: var(--torus-muted, var(--text-2)); }
.l4b-more { margin: 8px 0; font-size: 13px; }
.l4b-more > summary { cursor: pointer; font-weight: 600; }
.l4b-checks-table td:nth-child(2), .l4b-checks-table th:nth-child(2), .l4b-checks-table td:nth-child(3), .l4b-checks-table th:nth-child(3) { text-align: left; min-width: 11rem; }
.l4b-checks-table td:last-child, .l4b-checks-table th:last-child, .l4b-class-table td:last-child, .l4b-class-table th:last-child { text-align: left; }
.l4b-checks-table tr[data-status="fail"] > * { background: var(--surface); }
.l4b-indicator-table td:first-child, .l4b-indicator-table th:first-child { min-width: 12rem; }
.l4b-indicator-table td:last-child, .l4b-indicator-table th:last-child { text-align: left; }
.l4b-indicator-table tr[data-state="exceeds"] > * { background: var(--surface); }
.l4b-class-table tr[data-class="excluded"] > * { background: var(--surface); }
.l4b-class-table td:last-child { min-width: 16rem; }
/* Particle-orbit panels (TL-E): the verification tables, the completeness of the loaded run and the evidence of a time-step study. */
.l4b-panel h4 { margin: 16px 0 4px; font-size: 13px; }
.l4b-helix-table td, .l4b-helix-table th, .l4b-relativistic-table td, .l4b-relativistic-table th { white-space: nowrap; }
.l4b-event-table td, .l4b-event-table th { white-space: nowrap; }
.l4b-integrated-table td:not(:first-child), .l4b-integrated-table th:not(:first-child), .l4b-guard-table td:not(:first-child), .l4b-guard-table th:not(:first-child) { text-align: left; }
.l4b-counts-table td:last-child, .l4b-counts-table th:last-child { text-align: right; }
.l4b-fractions-table td:last-child, .l4b-fractions-table th:last-child { text-align: left; min-width: 14rem; }
.l4b-trajectory-table td:nth-child(2), .l4b-trajectory-table th:nth-child(2), .l4b-trajectory-table td:nth-child(4), .l4b-trajectory-table th:nth-child(4),
.l4b-trajectory-table td:nth-child(5), .l4b-trajectory-table th:nth-child(5), .l4b-trajectory-table td:nth-child(6), .l4b-trajectory-table th:nth-child(6) { text-align: left; min-width: 8rem; }
.l4b-trajectory-table tr[data-status="incomplete"] > * { background: var(--surface); }
.l4b-trajectory-table tr[data-status="unavailable"] > * { background: var(--surface); }
.l4b-radiation-table td:nth-child(7), .l4b-radiation-table th:nth-child(7), .l4b-radiation-table td:nth-child(4), .l4b-radiation-table th:nth-child(4) { text-align: left; min-width: 12rem; }
.l4b-radiation-table td:nth-child(6), .l4b-radiation-table th:nth-child(6) { min-width: 8rem; }
.l4b-study-rows-table td:nth-child(2), .l4b-study-rows-table th:nth-child(2), .l4b-study-rows-table td:nth-child(3), .l4b-study-rows-table th:nth-child(3),
.l4b-study-rows-table td:last-child, .l4b-study-rows-table th:last-child { text-align: left; }
.l4b-study-rows-table td:last-child, .l4b-study-rows-table th:last-child { min-width: 14rem; }
.l4b-study-rows-table tr[data-refinement-row="false"] > * { background: var(--surface); }
.l4b-metric-table tr[data-at-floor="true"] > * { background: var(--surface); }
@media (max-width: 479px) { .l4b-panel { padding: .3rem .55rem .7rem; } }
/* === end v754 L4B === */
/* === v754 L1 AlphaTrack units === */
/* Unit symbols keep their case. The table-header rule upper-cases text, and the micro sign of "µm" becomes the capital letter mu: "ΜM" reads as mm. */
.at-unit { text-transform: none; letter-spacing: normal; }
/* === end v754 L1 === */
/* === v754 L1 AlphaTrack evaluation === */
/* Custody summary sections (outcomes, denominators, grouping, checks): the label sits above its value on a phone, as in the image-set table. */
.custody-section { margin: .6rem 0; }
.custody-section-table th[scope="row"] { width: 34%; font-weight: 600; }
.custody-section-table code { overflow-wrap: anywhere; }
.custody-section-table th code { text-transform: none; letter-spacing: normal; font-weight: 400; }
@media (max-width: 640px) {
  .custody-section-table :is(tbody, tr, th, td) { display: block; }
  .custody-section-table th[scope="row"] { width: auto; padding-bottom: 0; border-bottom: 0; background: none; }
  .custody-section-table td { padding-top: .1rem; }
}
/* The evaluation accounting of the plate workbench. The step body is one column wide (half of the workbench) and a phone is narrower still, so each row of a
   table is a labelled block instead of a wide table that scrolls sideways; the header row stays available to assistive technology. */
.registry-evaluation { min-width: 0; max-width: 100%; }
.registry-evaluation h4 { margin: .9rem 0 .3rem; font-size: .95rem; }
.registry-evaluation :is(p, li, th, td) { overflow-wrap: anywhere; }
.accounting-table { min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.accounting-table :is(table, tbody, tr, th, td) { display: block; }
.accounting-table table { width: 100%; }
.accounting-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accounting-table tr { padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.accounting-table tr:last-child { border-bottom: 0; }
.accounting-table :is(th, td) { padding: .1rem 0; border: 0; text-align: left; }
.accounting-table th[scope="row"] { font-weight: 600; text-transform: none; letter-spacing: normal; }
.accounting-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
/* === end v754 L1 === */
/* === v754 L1 AlphaTrack uncertainty === */
/* The components of the uncertainty budget, one card each. The results panel is one column wide in the workbench and a phone is narrower still, so rows wrap,
   each table row is a labelled block (as in the evaluation accounting above) and nothing scrolls sideways. A negative blank-subtracted estimate is marked in
   its card; the number keeps its minus sign. */
.uncertainty-budget { min-width: 0; max-width: 100%; margin-top: 1rem; }
.uncertainty-budget h4 { margin: .2rem 0 .4rem; font-size: .95rem; }
.uncertainty-budget :is(p, li, dt, dd, th, td, summary, caption) { overflow-wrap: anywhere; }
.uncertainty-combination { margin: .2rem 0 .7rem; padding: .5rem .65rem; border-left: 3px solid var(--violet); background: var(--surface); }
.uncertainty-component { min-width: 0; margin: .65rem 0; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.uncertainty-component h5 { margin: 0 0 .3rem; font-size: .9rem; }
.uncertainty-component[data-negative="true"] { border-color: var(--error); box-shadow: inset 3px 0 0 var(--red); }
.uncertainty-component[data-negative="true"] .uncertainty-number[data-value^="-"] { color: var(--red); font-weight: 700; }
.uncertainty-kind { display: flex; flex-wrap: wrap; gap: .3rem; margin: .1rem 0 .4rem; }
.uncertainty-rows { margin: .3rem 0; }
.uncertainty-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .75rem; padding: .2rem 0; border-bottom: 1px solid var(--line); }
.uncertainty-row dt { flex: 1 1 11rem; min-width: 0; color: var(--muted); }
.uncertainty-row dd { flex: 0 1 auto; min-width: 0; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.uncertainty-number { font-family: var(--mono); font-size: .92em; }
.uncertainty-table { min-width: 0; max-width: 100%; margin: .45rem 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.uncertainty-table :is(table, tbody, tr, th, td) { display: block; }
.uncertainty-table table { width: 100%; }
.uncertainty-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.uncertainty-table caption { display: block; padding: .4rem .6rem; text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.uncertainty-table tr { padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.uncertainty-table tr:last-child { border-bottom: 0; }
.uncertainty-table :is(th, td) { padding: .1rem 0; border: 0; text-align: left; }
.uncertainty-table th[scope="row"] { font-weight: 600; text-transform: none; letter-spacing: normal; }
.uncertainty-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: normal; }
.uncertainty-notes { margin: .45rem 0 0 1.1rem; padding: 0; font-size: .86rem; line-height: 1.5; }
.uncertainty-notes li { margin: .2rem 0; }
.uncertainty-budget details { margin: .5rem 0; }
.uncertainty-budget details ul { margin: .35rem 0 0 1.1rem; padding: 0; font-size: .86rem; line-height: 1.5; }
.uncertainty-budget details li { margin: .25rem 0; }
#uncertaintyOutput[data-stale="true"] .uncertainty-budget { opacity: .6; }
#uncertaintyOutput > .result-association { margin: .8rem 0 0; }
@media (max-width: 640px) {
  .uncertainty-component { padding: .5rem .55rem; }
  .uncertainty-row { display: block; }
  .uncertainty-row dd { text-align: left; }
}
/* Where the block itself is wide enough (the measure is the block, not the screen: the workbench can show it in a narrow column on a wide screen)
   the labelled blocks of a table with up to five columns become an ordinary table. A table of six columns or more (images, calibration records, groups)
   carries long identifiers that an ordinary table would break in the middle of a word, so each of its rows stays a block and lays its labelled cells
   out in columns. A browser without container queries keeps the labelled blocks everywhere, which fit any width. */
.uncertainty-budget { container: uncertainty / inline-size; }
@container uncertainty (min-width: 34rem) {
  .uncertainty-table:not([data-wide]) table { display: table; border-collapse: collapse; }
  .uncertainty-table:not([data-wide]) caption { display: table-caption; border-bottom: 0; }
  .uncertainty-table:not([data-wide]) thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .uncertainty-table:not([data-wide]) tbody { display: table-row-group; }
  .uncertainty-table:not([data-wide]) tr { display: table-row; padding: 0; }
  .uncertainty-table:not([data-wide]) :is(th, td) { display: table-cell; padding: .3rem .65rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
  .uncertainty-table:not([data-wide]) :is(th[scope="row"], th[role="rowheader"], thead th:first-child) { text-align: left; }
  .uncertainty-table:not([data-wide]) thead th { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: none; letter-spacing: normal; }
  .uncertainty-table:not([data-wide]) td[data-label]::before { content: none; }
  .uncertainty-table:not([data-wide]) tbody tr:last-child :is(th, td) { border-bottom: 0; }
  .uncertainty-table[data-wide] tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); column-gap: 1rem; }
  .uncertainty-table[data-wide] th[scope="row"] { grid-column: 1 / -1; }
}
/* The pooled-analysis section: the settings form is the lab's shared one; the definition list of the settings wraps like the rest. */
.pooled-fields dl { margin: .4rem 0 0; font-size: .86rem; }
.pooled-fields dt { margin-top: .5rem; font-weight: 600; overflow-wrap: anywhere; }
.pooled-fields dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
#pooledPanel #pooledOutput { min-width: 0; }
/* The shared typed form shows one image as a column of fields; in this section it lays the fields of an image out in columns. */
#pooledForm .typed-study-form .study-array fieldset { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
#pooledForm .typed-study-form .study-array fieldset > :is(fieldset, button, p) { grid-column: 1 / -1; }
.pooled-settings > summary { cursor: pointer; }
.pooled-identity { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem; }
/* === end v754 L1 === */
/* === v754 L3 Isotope === */
/* Isotope Fusion Explorer: the sequential R-matrix source (controls, model record, event table, model checks) and the ensemble-acceptance panel.
   Tokens of the shared sheet only; no selector here reaches another lab. */
.seq-controls { min-width: 0; margin: .85rem 0; padding: .2rem .8rem .7rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--sunken); }
.seq-controls[hidden], #ensemblePanel [hidden] { display: none; }
.seq-controls legend { padding: 0 .35rem; font-weight: 600; }
.seq-controls select, .seq-controls input { max-width: 100%; }
.iso-seq-facts { display: grid; grid-template-columns: minmax(8.5rem, 14rem) minmax(0, 1fr); gap: .3rem 1rem; margin: .8rem 0; }
.iso-seq-facts dt { color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.iso-seq-facts dd { margin: 0; overflow-wrap: anywhere; }
#sequentialPanel h4, #ensemblePanel h4 { margin: 1.1rem 0 .4rem; font-size: 1rem; }
#sequentialPanel .tablewrap, #ensemblePanel .tablewrap, #eventVectorTable .tablewrap { max-width: 100%; margin: .6rem 0; }
#ensemblePanel .row { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
#runModelChecks:disabled, #runEnsemble:disabled, #exportEnsemble:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 640px) {
  .iso-seq-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .iso-seq-facts dt { margin-top: .55rem; }
  .iso-seq-facts dd { margin-bottom: .1rem; }
}
/* === end v754 L3 === */
/* === v754 L5 transfer === */
/* Virtual Lab transfer panel (audit VR-E): the controls, the budget, reason, tracer and re-check tables, and the notices. Selectors are .vtr-* or #virtualTransfer only. */
/* 7.7.0 (lane L72): the panel is a section of the application shell; it needs no rule above it, and its status lines are plain text. */
#virtualTransfer { min-width: 0; container-type: inline-size; container-name: vtr; }
/* 7.7.0 (lane L72): the panel is a section of the application shell (h2), so its parts are h3, spaced as the h4 parts were */
#virtualTransfer h3 { margin: 1.1rem 0 .4rem; }
#virtualTransfer h3:first-child { margin-top: 0; }
#virtualTransfer .status[data-kind="error"] { color: var(--error); }
#virtualTransfer .status[data-kind="stale"] { color: var(--text); }
.vtr-controls { min-width: 0; margin: .8rem 0; padding: .6rem .8rem .8rem; border: 1px solid var(--line-2); border-radius: 8px; }
.vtr-controls legend { padding: 0 .4rem; color: var(--ink-2); font-size: .9rem; }
/* One column where the panel is narrow (the workspace drawer is about 300 px wide at every window width), two or more where it is wide: no viewport query is needed. */
.vtr-controls .row { margin-top: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.vtr-controls input, .vtr-controls select { width: 100%; max-width: 100%; }
.vtr-collisions-note { margin: 0; align-self: end; }
.vtr-file-field { margin: .8rem 0; max-width: 32rem; }
.vtr-file-field input { width: 100%; max-width: 100%; }
/* No overflow-wrap here: it is inherited by the tables, and 'anywhere' lets their columns shrink until words break letter by letter (seen in the 330 px drawer). Running text breaks below. */
.vtr-output { margin-top: .8rem; min-width: 0; }
.vtr-output p, .vtr-output li, .vtr-output dd, .vtr-output dt, .vtr-output summary { overflow-wrap: anywhere; }
.vtr-output:empty { display: none; }
.vtr-lead { margin: .4rem 0; font-weight: 600; color: var(--ink); line-height: 1.5; }
.vtr-metrics { margin: .8rem 0; }
.vtr-dl { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 4px 12px; margin: .5rem 0; }
.vtr-dl dt { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.vtr-dl dd { margin: 0; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.vtr-meanings dt { color: var(--ink); font-weight: 600; font-size: .82rem; }
.vtr-meanings dd { font-size: .82rem; }
.vtr-tablewrap { margin: .5rem 0; max-width: 100%; }
.vtr-tablewrap:focus-visible { outline: 2px solid var(--cyan-2); outline-offset: 2px; }
.vtr-table th[scope="row"] { text-align: left; font-weight: 600; min-width: 7rem; }
.vtr-table { overflow-wrap: normal; word-break: normal; }
/* A caption as wide as the panel and pinned to the left edge stays readable while a wide table scrolls under it. */
.vtr-table caption { position: sticky; left: 0; box-sizing: border-box; width: 100cqw; max-width: 100cqw; }
.vtr-table th, .vtr-table td { padding: .5rem .6rem; }
.vtr-table th[scope="col"] { }
.vtr-table td { vertical-align: top; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vtr-table td[data-vtr-cell="detail"], .vtr-table td[data-vtr-cell="ends"] { min-width: 14rem; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.vtr-table tr[data-vtr-fate="incident"] > th:first-child, .vtr-tracers tr[data-fate="incident"] > th:first-child { box-shadow: inset 4px 0 0 var(--green); }
.vtr-table tr[data-vtr-fate="intercepted"] > th:first-child, .vtr-tracers tr[data-fate="intercepted"] > th:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.vtr-table tr[data-vtr-fate="unobserved"] > th:first-child, .vtr-tracers tr[data-fate="unobserved"] > th:first-child { box-shadow: inset 4px 0 0 var(--violet); }
.vtr-table tr[data-vtr-fate="all"] > * { border-top: 2px solid var(--line-2); font-weight: 600; }
.vtr-table tr[data-ok="false"] > * { background: var(--surface); }
.vtr-bounds { display: grid; gap: .25rem; margin: .5rem 0; padding: 0; list-style: none; }
.vtr-bounds li { padding-left: .6rem; border-left: 3px solid var(--line-2); }
.vtr-bounds li[data-ok="true"] { border-left-color: var(--green); }
.vtr-bounds li[data-ok="false"] { border-left-color: var(--red); }
.vtr-word { font-weight: 700; font-size: .78rem; }
.vtr-units { margin: .8rem 0; }
.vtr-units > summary { cursor: pointer; font-weight: 600; }
.vtr-identity { overflow-wrap: anywhere; word-break: break-all; }
.vtr-unavailable { overflow-wrap: anywhere; }
.vtr-verification { margin-top: 1rem; }
.vtr-verification[data-vtr-verification="fail"] .vtr-lead { color: var(--red); }
.vtr-file { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line-2); }
@container vtr (max-width: 34rem) {
  .vtr-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .vtr-dl dd { margin-bottom: .45rem; }
}
@media (max-width: 479px) {
  #virtualTransfer { padding-top: .8rem; }
  .vtr-controls { padding: .5rem .55rem .7rem; }
  .vtr-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .vtr-dl dd { margin-bottom: .45rem; }
}
/* === end v754 L5 === */
/* == L78a: YieldProof == */
/* YieldProof (7.7.0, WP7-09, lanes L78a and L78b; the markup contract is in yieldproof/shell.mjs): the tool strip above the toolbar of every
   YieldProof page and the YieldProof components. Tokens of docs/V770-PLAN.md section 2 only. */
/* The tool strip: the nine tools of YieldProof as application tabs; the current tool's tab joins the toolbar below it. */
.yp-pages { display: flex; align-items: flex-end; gap: 2px; min-width: 0; margin: 0; padding: 6px 12px 0; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface-2); scrollbar-width: thin; }
.yp-pages a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 30px; margin-bottom: -1px; padding: 4px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; color: var(--text-2); font-size: 13px; line-height: 20px; text-decoration: none; white-space: nowrap; }
.yp-pages a:hover { background: var(--surface); color: var(--text); }
.yp-pages a[aria-current="page"] { border-color: var(--border); background: var(--surface); color: var(--text); font-weight: 600; }
.yp-pages a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The shell of a YieldProof page has the strip as its first row; the Help panel opens below strip and toolbar. */
.app-shell.yp-shell { --tools-h: 37px; grid-template-rows: var(--tools-h) var(--toolbar-h) minmax(0, 1fr) var(--statusbar-h); grid-template-areas: "tools tools tools" "toolbar toolbar toolbar" "tree settings results" "status status status"; }
.app-shell.yp-shell > .yp-pages { grid-area: tools; }
.app-shell.yp-shell > .app-help { top: calc(var(--tools-h) + var(--toolbar-h)); }
/* The toolbar names the tool (h1) and, beside it, the module. */
.yp-module { flex: 0 0 auto; padding-left: 8px; border-left: 1px solid var(--border); color: var(--text-2); font-size: 13px; line-height: 20px; white-space: nowrap; }
@media (max-width: 1023px) {
  .app-shell.yp-shell { grid-template-rows: auto auto auto auto auto auto; grid-template-areas: "tools" "toolbar" "tree" "settings" "results" "status"; }
  .yp-pages { flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; overflow: visible; }
  .yp-pages a { min-height: 28px; margin: 0; padding: 2px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--page); }
  .yp-pages a[aria-current="page"] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-hover); }
}
/* Results in words (yieldproof/shell.mjs): a result is a plain line in the message style, the outcome word in bold; a 7.6.0 label is a plain word. */
.yp-verdict { margin: 8px 0; color: var(--text-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.yp-verdict[data-result="fail"] { color: var(--error); }
.yp-verdict > strong:first-child { color: var(--text); }
.yp-verdict[data-result="fail"] > strong:first-child { color: var(--error); }
.yp-verdict ul { margin: 4px 0 0; padding-left: 18px; }
.app-section .yp-verdict { font-size: 13px; }
.yp-word { font-weight: 600; }
.yp-word[data-result="fail"] { color: var(--error); }
/* Drop zones, progress, definition lists, monospaced command text */
.yp-drop { display: grid; gap: 6px; margin: 8px 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--page); }
.yp-drop[data-over="true"] { border-color: var(--accent); background: var(--accent-tint); }
.yp-drop label { color: var(--text); font-size: 13px; }
.yp-drop input[type="file"] { max-width: 100%; font-size: 13px; }
.yp-progress { width: 100%; max-width: 32rem; height: 8px; accent-color: var(--accent); }
.yp-dl { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: 4px 16px; margin: 8px 0; font-size: 13px; line-height: 20px; }
.yp-dl dt { color: var(--text-2); }
.yp-dl dd { margin: 0; overflow-wrap: anywhere; }
.yp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
pre.yp-mono { max-width: 100%; margin: 8px 0; padding: 8px 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); white-space: pre-wrap; }
/* Charts (yieldproof/plot.mjs: light plots, legend beside them) */
.yp-chart { margin: 8px 0; }
.yp-chart svg { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.yp-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 12px; }
.yp-legend li { display: inline-flex; align-items: center; gap: 6px; }
.yp-swatch { width: 22px; height: 8px; flex: 0 0 22px; }
.tablewrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* units and symbols in YieldProof table headers keep their case (upper case would turn µm into MM, σ into Σ, χ into X) */
.yp-table th, .yp-keepcase { text-transform: none; }
.yp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px; margin: 8px 0; }
.yp-tiles figure { margin: 0; }
.yp-tiles canvas { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); image-rendering: pixelated; }
.yp-tiles figcaption { margin-top: 4px; color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
/* Long words in the text of the YieldProof pages break instead of widening the page at 320 px */
:is(main:has(> .yp-pages), .yp-shell) :is(p, h3, li, dd, dt) { overflow-wrap: break-word; }
/* Yield Card viewer: the QR figure, the definitions */
.yp-qr { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 8px 0; }
.yp-qr svg { width: 168px; height: 168px; flex: 0 0 168px; background: #fff; }
.yp-qr figcaption { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.yp-def { margin: 2px 0 8px; color: var(--text-2); font-size: 13px; max-width: 80ch; }
.yp-card h3 { margin-top: 20px; }
/* ShotPilot: the three acquisition modes side by side, their candidates, the explanation sentences */
.yp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 12px; margin: 8px 0; }
.yp-mode { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.yp-mode h3 { margin: 0 0 4px; font-size: 14px; }
.yp-cands { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.yp-cands li { font-size: 13px; overflow-wrap: anywhere; }
.yp-cands label { display: block; cursor: pointer; }
.yp-modes-pick { min-width: 0; margin: 0; padding: 0; border: 0; }
.yp-modes-pick > legend { padding: 0; color: var(--text-2); font-size: 13px; }
.yp-sentences { display: grid; gap: 8px; padding-left: 22px; }
.yp-sentences li { overflow-wrap: anywhere; }
/* the unit hints of the ShotPilot forms (limits, steps) wrap under their label at narrow widths instead of widening the page */
:is(main:has(> .yp-pages), .yp-shell) :is(#campaign, #decision) .field label { flex-wrap: wrap; }
:is(main:has(> .yp-pages), .yp-shell) :is(#campaign, #decision) .field label > span { flex-shrink: 1; min-width: 0; }
@media (max-width: 640px) {
  .yp-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .yp-dl dd { margin-bottom: 6px; }
}
/* Print (the Yield Card prints to PDF): the controls and the chrome are not printed */
@media print {
  .yp-pages, .lab-startup, #downloadReceipt, #open, .yp-drop, #footer, .labhead .lede { display: none !important; }
  .yp-verdict { color: var(--text); }
  .yp-card table, .yp-qr { break-inside: avoid; }
  .yp-card h3 { break-after: avoid; }
  .yp-def { color: var(--text); }
  .tablewrap { overflow: visible; }
  /* a YieldProof page prints its results column only: no site header, tool strip, toolbar, tree, settings or status bar */
  body:has(.yp-shell) :is(.sitebar, .skip-link) { display: none !important; }
  .app-shell.yp-shell { display: block; height: auto; min-height: 0; background: #fff; }
  .yp-shell > :is(.app-toolbar, .app-tree, .app-settings, .app-status, .app-help) { display: none !important; }
  .yp-shell > .app-results { overflow: visible; padding: 0; background: #fff; }
  .yp-shell .app-results > .app-section { margin: 0; padding: 0; border: 0; }
}
/* Settings forms of the YieldProof tools: radio and check rows inside a wide fieldset keep their check layout */
.yp-shell .app-settings fieldset.field > label.check, .yp-shell .app-settings .field.wide > label.check { display: flex; justify-content: flex-start; gap: 8px; margin: 0; }
.yp-shell .app-settings .buttonrow { flex-wrap: wrap; }
.yp-run { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
/* == end L78a: YieldProof == */
/* == S71: studies and compare runs == */
/* Studies (WP7-08): each study a section with typed settings aligned like a settings window; plain status lines, no boxes. */
.study-section > h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 22px; }
.study-section .study-summary { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 20px; max-width: 72ch; }
.research-panel > .study-section, .research-panel > div > .study-section { margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); }
.typed-study-form { display: block; margin: 8px 0; max-width: 640px; }
.typed-study-form .field, .study-section > .typed-study-form .field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 168px) 56px; align-items: center; gap: 4px 8px; margin: 8px 0; }
.typed-study-form .field > label { display: contents; color: var(--text); font-size: 13px; font-weight: 400; }
.typed-study-form .field > label > span:not(.label-text) { grid-column: 3; grid-row: 1; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A label whose text holds markup keeps it in span.label-text (MODULE-LANES.md §1 item 9): one grid item in column 1, the unit in column 3. */
.typed-study-form .field > label > .label-text { grid-column: 1; grid-row: 1; }
.typed-study-form .field > :is(input, select) { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; min-height: 28px; padding: 4px 8px; font-size: 13px; line-height: 20px; }
.typed-study-form .field > select { grid-column: 2 / 4; }
/* the matrix and note boxes use the platform font of the application, not the browser's monospace default (R71-F21) */
.typed-study-form .field > textarea { grid-column: 1 / -1; width: 100%; min-width: 0; padding: 4px 8px; font-family: inherit; font-size: 13px; line-height: 20px; }
.typed-study-form .field.wide > label { display: flex; grid-column: 1 / -1; }
.typed-study-form .field > :is(small, .field-error, .field-hint) { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 18px; }
.typed-study-form .field.check-field { display: block; }
.typed-study-form .check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.typed-study-form input[type=checkbox] { width: 16px; height: 16px; }
.typed-study-form :is(input, textarea):invalid { border-color: var(--error); }
/* 7.7.0 (WP7-11, R71-F21): one grid. A group is a titled rule across the form, as in a settings window; it adds no side border or padding,
   so the input column of every field, inside a group or not, starts at the same place. */
.typed-study-form :is(.study-group, .study-rows, .study-choices) { margin: 12px 0; padding: 4px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; min-width: 0; }
.typed-study-form legend { padding: 0 8px 0 0; color: var(--text); font-size: 13px; font-weight: 600; }
.typed-study-form .study-group .study-group { margin: 8px 0; }
.typed-study-form fieldset { display: block; }
.typed-study-form fieldset > button, .study-rows .study-row > button { display: inline-block; width: auto; }
.study-rows .study-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.study-rows .study-row:last-of-type { border-bottom: 0; }
.study-rows .study-row-title { margin: 0; color: var(--text-2); font-size: 12px; font-weight: 600; }
.study-rows button, .study-choices button { min-height: 28px; margin-top: 8px; padding: 4px 12px; font-size: 12px; line-height: 18px; }
.study-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 12px; }
.study-choices legend { grid-column: 1 / -1; }
.study-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; margin: 8px 0; max-width: 640px; }
.study-file .study-file-label { font-size: 13px; }
.study-file button { min-height: 28px; padding: 4px 12px; font-size: 13px; line-height: 18px; }
.study-file .study-file-name, .study-file .study-file-summary { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.study-file .study-file-name { color: var(--text); }
.study-section .study-form-status:empty, .study-section .study-status:empty { display: none; }
.study-section .study-actions, .study-section .study-export { margin: 12px 0 0; }
.study-section .study-export:empty { display: none; }
.study-section .study-actions button[data-study-compute] { font-weight: 600; }
.study-output:empty { display: none; }
.study-output { margin-top: 8px; }
.study-output .metrics { margin: 8px 0; }
.study-all-values { margin: 12px 0 0; }
.study-all-values > summary { cursor: pointer; font-size: 13px; font-weight: 500; }
.study-all-values table, .study-results-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.study-all-values :is(th, td), .study-results-table :is(th, td) { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.study-all-values td.num, .study-results-table td.num, .study-results-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.study-results-table caption { padding: 8px; text-align: left; font-size: 13px; font-weight: 600; }
.study-results-table th { color: var(--text-2); font-size: 12px; font-weight: 600; }
/* the freshness line of a study: one plain sentence, no box */
.study-freshness { margin: 8px 0 0; padding: 0; border: 0; background: none; }
.study-freshness .study-freshness-text { margin: 0; color: var(--text-2); font-size: 13px; }
.study-freshness[data-state="previous"] .study-freshness-text { color: var(--text); }
.study-freshness .study-freshness-action { min-height: 28px; margin-top: 8px; padding: 4px 12px; font-size: 13px; line-height: 18px; }
.study-freshness .study-freshness-reason { margin: 4px 0 0; font-size: 12px; }
.study-freshness-line:empty { display: none; }
.research-panel > .research-exports { margin: 8px 0 0; }
.study-file-preview table { width: 100%; font-size: 13px; }
@media (max-width: 599px) {
  .typed-study-form .field, .study-section > .typed-study-form .field { grid-template-columns: minmax(0, 1fr); }
  .typed-study-form .field > label { display: flex; justify-content: space-between; gap: 8px; grid-column: 1; }
  .typed-study-form .field > :is(input, select, textarea) { grid-column: 1; grid-row: auto; }
  .study-file { grid-template-columns: minmax(0, 1fr); }
}
/* the experiment bar of the settings column (Open experiment…; the export is in the toolbar's Export menu) */
/* 7.7.0 (WP7-11, R71-F31): the experiment bar on the 4 px grid */
.live-input-bar .experiment-opened { margin: 8px 0 0; }
.live-input-bar .experiment-opened .message { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.live-input-bar .experiment-diff { margin: 8px 0 0; padding-left: 20px; font-size: 12px; }
.live-input-bar .experiment-title { margin: 8px 0 0; }
.live-input-bar .experiment-title input { min-height: 28px; padding: 4px 8px; font-size: 12px; line-height: 18px; }
/* Compare runs: the result column stays in view while a wide table scrolls sideways (phone width). */
.compare-runs .cmp-table th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--border); }
/* == end S71: studies and compare runs == */
/* == L73: DirectConvert == */
/* The plant ledger of the settings column: heat sinks and origins in disclosures, each sink a small group of fields. */
.dc-app .dc-plant-ledger { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.dc-app .dc-ledger-group { margin: 10px 0 0; }
.dc-app .dc-ledger-group > summary { cursor: pointer; font-weight: 600; color: var(--text); }
.dc-app .dc-sink { min-width: 0; margin: 10px 0 0; padding: 8px 10px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.dc-app .dc-sink legend { padding: 0 4px; color: var(--text); font-weight: 600; font-size: 13px; }
.dc-app .dc-source[hidden] { display: none; }
.dc-app .dc-qualification .check { font-weight: 600; }
/* Results: the tables scroll sideways inside their section; the captions read as plain lines above them. */
.dc-app .tablewrap { display: block; max-width: 100%; overflow-x: auto; }
.dc-app .dc-origin-table caption, .dc-app .dc-sink-table caption, .dc-app #stageTable caption { caption-side: top; text-align: left; color: var(--text-2); font-size: 12px; padding: 4px 0; }
.dc-app .dc-withheld-note p { color: var(--text-2); }
/* Collector gap, particle in cell: the decision of the numerical checks is a word, coloured by its state. */
.dc-rail-decision { font-weight: 650; color: var(--text); }
.dc-pic-rail[data-decision="numerically-converged"] .dc-rail-decision { color: var(--green); }
.dc-pic-rail[data-decision="not-converged"] .dc-rail-decision, .dc-pic-rail[data-decision="no-steady-state"] .dc-rail-decision { color: var(--error); }
/* Collector measurements: the data origin, shown at every step. */
.dc-evidence-word { font-size: 12px; font-weight: 700; color: var(--text); }
/* == end L73: DirectConvert == */
/* == L71: FusionSim == */
/* 7.7.0 (WP7-02): the result blocks of FusionSim are parts of their sections in the application window: no box, no coloured edge and
   no coloured row marker (docs/V770-PLAN.md section 4, rule 6); the definition lists of the comparison data align like a settings window. */
.app-shell :is(.fusion-deposition, .frt-panel, .frt-net, .frt-optical, .fdl-integrity, .fdl-answer, .radiation-comparison, .fusion-source-selected) { margin: 0 0 16px; padding: 0; border: 0; border-radius: 0; background: none; }
.app-shell .fdl-answer[data-state="stale"] { opacity: .85; }
.app-shell .fdl-benchmarks tr > th:first-child { box-shadow: none; }
.app-shell .fdl-table tr[data-excluded="true"] > td, .app-shell .fdl-table tr[data-excluded="true"] > td:last-child { color: var(--text-2); text-decoration: none; }
.app-shell .fusion-headline { display: block; margin: 0 0 12px; }
.app-shell .fusion-source-dl { grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr); gap: 4px 12px; }
.app-shell .fusion-source-dl dt, .app-shell .frt-table .frt-role, .app-shell .frt-table .frt-bound, .app-shell .frt-table .frt-note { color: var(--text-2); }
.app-shell .fusion-source-dl dd { color: var(--text); overflow-wrap: anywhere; }
.app-shell .frt-net-value strong { color: var(--text); }
/* == end L71: FusionSim == */
/* == L71: AlphaTrack == */
/* 7.7.0 (WP7-05): the detector image is a graphics window of the shell, scaled to the width of the dark view; the result
   blocks (blank subtraction, uncertainty components, pooled density) are parts of their sections: no box, no coloured edge, no badge row. */
.app-shell .at-image-viewer { margin: 0; }
.app-shell .at-image-frame { display: flex; justify-content: center; align-items: flex-start; max-height: clamp(320px, 62vh, 760px); padding: 12px; overflow: auto; background: var(--graphics); }
.app-shell .at-image-frame #viewer { position: relative; flex: 0 1 auto; max-width: 100%; overflow: visible; cursor: crosshair; }
.app-shell .at-image-frame .imagecanvas { max-width: 100%; height: auto; border-radius: 0; background: var(--page); }
.app-shell #imageView .app-graphics-footer .field { display: flex; align-items: center; gap: 8px; }
.app-shell #imageView .app-graphics-footer .field > label { font-size: 12px; font-weight: 600; }
.app-shell #imageView .app-graphics-footer .field > select { width: auto; min-height: 28px; padding: 3px 8px; font-size: 13px; }
.app-shell #imageView .app-graphics-footer .layer-grid .check { min-height: 28px; font-size: 13px; }
.app-shell :is(.control-record, .control-record.negative) { margin: 0 0 16px; padding: 0; border: 0; border-radius: 0; background: none; }
.app-shell .control-record .formula { font-family: inherit; }
.app-shell .at-checks { margin: 0 0 12px 1.1rem; padding: 0; font-size: 13px; line-height: 1.5; }
.app-shell .at-checks li { margin: 4px 0; }
.app-shell .uncertainty-budget { margin-top: 0; }
.app-shell .uncertainty-budget h3 { margin: 0 0 6px; font-size: 14px; }
.app-shell .uncertainty-combination { margin: 0 0 12px; padding: 0; border: 0; background: none; color: var(--text-2); }
.app-shell .uncertainty-component, .app-shell .uncertainty-component[data-negative="true"] { margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; box-shadow: none; }
.app-shell .uncertainty-component h4 { margin: 0 0 4px; font-size: 13px; }
.app-shell .uncertainty-kind { display: block; margin: 0 0 6px; color: var(--text-2); font-size: 12px; }
.app-shell .uncertainty-component[data-negative="true"] .uncertainty-number[data-value^="-"] { color: inherit; font-weight: 600; }
.app-shell .uncertainty-number { font-family: inherit; font-size: inherit; }
.app-shell .uncertainty-table { border-radius: 0; background: none; }
.app-shell .pooled-identity { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 12px; }
.app-shell .pooled-identity .field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 6px 0; }
.app-shell .pooled-settings { margin: 8px 0; }
.app-shell .pooled-settings > summary { cursor: pointer; font-weight: 600; }
.app-shell .review-decisions .field.wide > label > span { display: block; color: var(--text-2); font-size: 12px; text-align: left; }
.app-shell .review-decisions .field.wide { display: block; margin: 6px 0; }
.app-shell .review-decisions .field.wide > :is(input, select) { width: 100%; }
/* A step of Validation plates holds its body in one wrapper (lazy mount), which a two-column step grid puts in the first column
   only (half the width, 84 px cells at phone width): the open step is laid out as a block. At phone width a long action name
   wraps inside its button. */
.app-shell .detector-validation-workbench > details[open] { display: block; }
@media (max-width: 480px) { .app-shell .detector-validation-workbench button { max-width: 100%; white-space: normal; } }
/* == end L71: AlphaTrack == */
/* == L72: Virtual Reactor Lab, Mirror model and Reactor 3D == */
/* A tool page of the module, linked from the toolbar like a button (Virtual Reactor Lab to Mirror model and back). */
.app-actions .app-tool-link { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--page); color: var(--text); font-size: 13px; line-height: 20px; text-decoration: none; white-space: nowrap; }
.app-actions .app-tool-link:hover { background: var(--surface); }
.app-actions .app-tool-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The reactor hall: playback, the recorded time against the bounce period, machine presentation and component inspector, tracer inspector. */
.app-graphics-footer .observation-ratio { flex: 1 1 100%; gap: 4px 8px; font-size: 12px; line-height: 18px; color: var(--text-2); }
.app-graphics-footer .observation-ratio .label { font: inherit; color: var(--text-2); }
.app-graphics-footer .observation-ratio strong { color: var(--text); font-variant-numeric: tabular-nums; }
.app-graphics-footer .observation-ratio[data-stale="true"] strong { color: var(--text-2); }
.app-graphics-footer .scene-tools { flex: 1 1 100%; margin: 0; padding: 8px 0 0; }
.app-graphics-footer .scene-tools .buttonrow { margin: 0; gap: 4px; }
.app-graphics-footer .scene-tools button { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.app-graphics-footer .scene-inspector { padding: 8px 0 0; font-size: 13px; }
.app-graphics-footer .scene-inspector .row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.app-graphics-footer .scene-inspector [data-component-note] { margin: 6px 0 0; color: var(--text); font-size: 13px; }
.tracer-inspector { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; }
.tracer-inspector .field { display: flex; align-items: center; gap: 8px; margin: 0; }
.tracer-inspector .field label { font-size: 13px; }
.tracer-inspector button { min-height: 28px; padding: 2px 10px; font-size: 12px; }
.tracer-inspector .message { flex: 1 1 100%; margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
/* Settings: layers, examples and display options in the settings column. */
.app-settings .layer-grid { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 2px 12px; margin: 4px 0 8px; padding: 8px 12px; }
.app-settings .layer-grid legend { padding: 0 4px; font-size: 13px; font-weight: 600; }
.app-settings .preset-buttons { margin: 4px 0 8px; }
.app-settings .preset-button { min-height: 30px; padding: 4px 12px; font-size: 13px; font-weight: 400; }
.app-settings .observation-derived { display: block; margin: 8px 0; }
.app-settings > .app-section > .check { display: flex; width: 100%; }
.app-graphics-footer .observation-ratio strong { font-family: var(--font); font-size: 13px; font-weight: 600; }
.app-graphics-footer .observation-ratio small { font-size: 12px; color: var(--text-2); }
.app-graphics-footer .observation-ratio[data-stale="true"] strong::after { content: none; }
/* Result tables: the check results and the power flow. */
.check-table th[scope="row"], .ledger-table th[scope="row"] { font-weight: 400; text-align: left; }
.check-table td:nth-child(2) { white-space: nowrap; }
.ledger-table td.num, .particle-table td.num, .origin-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-results .result-headline .metric .value { font-size: 18px; }
/* The visually hidden caption of the component checks is positioned absolutely; without a containing block inside the scrolling results
   column it escaped the column and extended the page below the footer. */
#qualification { position: relative; }
/* == end L72: Virtual Reactor Lab, Mirror model and Reactor 3D == */

/* == F71c: selects == */
/* 7.7.0 (R71-F14, lane F71c): a select reads its whole option. In the settings column a select without a unit takes the width of its
   longest option (up to the column) and its label the rest; the columns of the validation forms hold their longest option; a study
   select whose options are sentences sits on its own row (field select-wide). */
.app-settings .field:has(> select):not(:has(> label > span:not(.label-text))) { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); }
.app-settings .field:has(> select):not(:has(> label > span:not(.label-text))) > select { grid-column: 2; max-width: 100%; }
.validation-form, .dc-acq-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.typed-study-form .field.select-wide { grid-template-columns: minmax(0, 1fr); }
.typed-study-form .field.select-wide > label { display: block; margin-bottom: 4px; }
.typed-study-form .field.select-wide > select { grid-column: 1; grid-row: auto; }
#playbackSpeed { min-width: 88px; }
/* == end F71c: selects == */

/* == C81: HBF Assistant == */
/* 7.8.0 WP8-03 (lane C81, docs/V780-PLAN.md section 4.3): the "Assistant" item of the site header, "Ask the assistant" in a module's Help
   panel, the side panel (a modal dialog on the right) and the assistant page. A control that opens the assistant is shown only once
   assets/lab-core/assistant.mjs runs (it sets data-hbf-assistant on the root element), so a page without the script offers none. */
[data-assistant-open] { display: none; }
:root[data-hbf-assistant="on"] [data-assistant-open] { display: inline-flex; }
.site-nav > .site-assistant {
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
}
.site-nav > .site-assistant:hover { background: var(--surface); color: var(--text); }
.site-nav > .site-assistant[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.app-help-foot { flex: 0 0 auto; padding: 8px 16px; border-top: 1px solid var(--border); }

dialog.assistant-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--page);
  color: var(--text);
  box-shadow: var(--shadow-menu);
  overflow: hidden;
}
dialog.assistant-panel[open] { display: block; }
dialog.assistant-panel::backdrop { background: rgba(24, 33, 43, .32); }
.assistant-frame { display: flex; flex-direction: column; height: 100%; }
.assistant-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 6px 8px 6px 20px; border-bottom: 1px solid var(--border); }
dialog.assistant-panel .assistant-head h2 { margin: 0; font-size: 18px; line-height: 26px; }
.assistant-view { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.assistant-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 20px; }
.assistant-disclosure { margin: 0 0 12px; color: var(--text-2); font-size: 14px; line-height: 22px; }
.assistant-welcome { margin: 0 0 12px; color: var(--text); font-size: 15px; line-height: 24px; }
.assistant-log { display: grid; gap: 16px; }
/* 7.9.0 (D43 (4)): what a question about an open run sends, below the conversation */
.assistant-run-data { margin: 12px 0 0; color: var(--text-2); font-size: 13px; line-height: 20px; }
.assistant-turn { min-width: 0; font-size: 15px; line-height: 24px; overflow-wrap: anywhere; }
.assistant-turn[data-role="user"] { padding: 8px 12px; border-radius: var(--radius-card); background: var(--surface); }
.assistant-who { margin: 0 0 2px; color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 18px; }
.assistant-asked { margin: 0; white-space: pre-wrap; }
.assistant-answer p, .assistant-answer ul, .assistant-answer ol { margin: 0 0 8px; }
.assistant-answer > :last-child { margin-bottom: 0; }
.assistant-cite { font-size: 13px; font-variant-numeric: tabular-nums; text-decoration: none; }
.assistant-cite:hover { text-decoration: underline; }
.assistant-sources { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; line-height: 20px; }
.assistant-sources-title { margin: 0 0 2px; color: var(--text-2); font-weight: 600; }
.assistant-sources ol { margin: 0; padding-left: 20px; }
.assistant-form { display: grid; flex: 0 0 auto; gap: 6px; padding: 12px 20px 16px; border-top: 1px solid var(--border); background: var(--page); }
.assistant-form label { color: var(--text); font-size: 14px; font-weight: 600; }
.assistant-form textarea { min-height: 72px; max-height: 40vh; font-family: var(--font); font-size: 15px; line-height: 22px; }
.assistant-form-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 12px; line-height: 16px; }
.assistant-hint, .assistant-count { margin: 0; }
.assistant-count { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.assistant-status { min-height: 20px; margin: 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.assistant-status[data-kind="error"] { color: var(--error); }
.assistant-form .buttonrow { margin: 2px 0 0; }
/* The assistant page: the same conversation in the page, beside the notice. */
.assistant-page { max-width: 860px; }
.assistant-page .assistant-view { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--page); }
.assistant-page .assistant-scroll { min-height: 240px; max-height: min(64vh, 720px); }
.assistant-page .assistant-form { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.assistant-contact { margin: 16px 0 0; color: var(--text-2); font-size: 14px; line-height: 22px; }
@media (max-width: 760px) {
  .site-nav > .site-assistant { min-height: 44px; padding: 8px; font-size: 16px; }
  .assistant-head { padding-left: 16px; }
  .assistant-scroll, .assistant-form { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 599px) {
  dialog.assistant-panel { width: 100vw; border-left: 0; box-shadow: none; }
}
/* With Assistant the navigation has five items; at 440 px and less they take 14 px text and 6 px side padding, so that all five fit a
   390 px phone (at 360 px the row still scrolls sideways, as the 7.7.0 header does when its items do not fit). */
@media (max-width: 440px) {
  .site-nav > a, .nav-menu > summary, .site-nav > .site-assistant { padding: 8px 6px; font-size: 14px; }
}
@media print {
  dialog.assistant-panel, .app-help-foot { display: none !important; }
}
/* == end C81: HBF Assistant == */
