/* BetterSpan component styles, v1 (Direction A, "Datum").
   Loads after tokens.css. Colours, spacing, radii and strokes are tokens.
   Wrap content in .bs; wrap anything responsive in .bs-site or .bs-cq (container queries, not media queries).
   Web headings that change size (.bs-display, .bs-h1, .bs-h2) mirror the web-* and web-*-compact type tokens. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.bs { font: 400 17px/27px var(--font-body); color: var(--ink); }
.bs :where(h1, h2, h3, h4, h5, p, figure, ul, ol, dl, dd, blockquote) { margin: 0; }
.bs :where(ul, ol)[class] { padding: 0; list-style: none; }
.bs :where(img, svg) { display: block; max-width: 100%; }
.bs :where(img) { height: auto; }
.bs :where(b, strong) { font-weight: 600; }
:where(.bs) [data-theme], :where(.bs)[data-theme] { color: var(--ink); }
.bs-cq, .bs-site { container-type: inline-size; }

/* Focus, motion */
.bs :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: var(--stroke-focus) solid var(--focus); outline-offset: 2px; }
.bs .bs-on-brand :where(a, button, summary):focus-visible { outline-color: var(--on-brand); }
@media (prefers-reduced-motion: reduce) {
  .bs *, .bs *::before, .bs *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Text helpers ---------- */
.bs-display, .bs-h1, .bs-h2 { font-family: var(--font-heading); font-weight: 500; text-wrap: balance; }
.bs-display { font-size: 36px; line-height: 40px; letter-spacing: -0.015em; }
.bs-h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }
.bs-h2 { font-size: 24px; line-height: 30px; letter-spacing: -0.005em; }
@container (min-width: 768px) {
  .bs-display { font-size: 56px; line-height: 60px; letter-spacing: -0.02em; }
  .bs-h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.015em; }
  .bs-h2 { font-size: 30px; line-height: 36px; letter-spacing: -0.01em; }
}
.bs-muted { color: var(--ink-muted); }
.bs-subtle { color: var(--ink-subtle); }
.bs-measure { max-width: var(--measure); }
.bs-num { font-variant-numeric: tabular-nums; }
.bs-label { font: 600 13px/18px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bs-label--accent { color: var(--accent-text); }
.bs-span { display: block; width: 48px; height: var(--stroke-span); margin: 0 0 var(--space-5); border: 0; background: var(--accent); }
.bs-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: butt; stroke-linejoin: miter; }
.bs-key { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius-round); background: var(--action); color: var(--on-action); font: 500 15px/1 var(--font-heading); font-variant-numeric: tabular-nums; }
.bs-key--lg { width: 40px; height: 40px; font-size: 20px; }
.bs-key--outline { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.bs-list { display: grid; gap: 6px; font-size: 15px; line-height: 23px; }
.bs-list > li { position: relative; padding-left: 18px; }
.bs-list > li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 2px; background: var(--accent); }

/* ---------- Logo ---------- */
.bs-logo { display: block; width: auto; height: var(--logo-h, 44px); max-width: none; }
.bs-logo-plate { --logo-h: 44px; display: inline-block; padding: calc(var(--logo-h) * 0.2); border-radius: var(--radius-xs); background: var(--white); line-height: 0; }
.bs-logo-plate--ruled { box-shadow: inset 0 0 0 1px var(--border); }
.bs-logo-plate--flush { padding: 0; }
.bs-signature { font: 400 13px/18px var(--font-body); color: var(--ink-muted); }
.bs-signature b { color: var(--ink); }

/* ---------- Actions ---------- */
.bs-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--target-min); padding: 10px 20px; border: 2px solid transparent; border-radius: var(--radius-sm); background: none; font: 600 16px/20px var(--font-body); text-decoration: none; cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.bs-btn--primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.bs-btn--primary:hover, .bs-btn--primary.is-hover { background: var(--action-hover); border-color: var(--action-hover); }
.bs-btn--secondary { border-color: var(--ink); color: var(--ink); }
.bs-btn--secondary:hover, .bs-btn--secondary.is-hover { background: var(--surface-sunken); }
.bs-btn--quiet { padding-inline: 4px; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.bs-btn--quiet:hover, .bs-btn--quiet.is-hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.bs-btn--lg { min-height: 52px; padding: 14px 26px; font-size: 17px; }
.bs-btn.is-focus { outline: var(--stroke-focus) solid var(--focus); outline-offset: 2px; }
.bs-btn[disabled], .bs-btn[aria-disabled="true"] { background: var(--surface-sunken); border-color: var(--border); color: var(--ink-subtle); cursor: not-allowed; }
.bs-on-brand .bs-btn--primary { background: var(--white); border-color: var(--white); color: var(--green-800); }
.bs-on-brand .bs-btn--primary:hover { background: var(--green-100); border-color: var(--green-100); }
.bs-on-brand .bs-btn--secondary { border-color: var(--on-brand); color: var(--on-brand); }
.bs-on-brand .bs-btn--secondary:hover { background: var(--green-800); }
.bs-link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.bs-link:hover, .bs-link.is-hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.bs-link--icon { display: inline-flex; align-items: center; gap: 6px; }
.bs-on-brand .bs-link { color: var(--on-brand); }

/* ---------- Labels that qualify content ---------- */
.bs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-raised); color: var(--ink); font: 600 12px/16px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.bs-tag .bs-icon { width: 14px; height: 14px; }
.bs-tag--concept { border-style: dashed; }
.bs-tag--preliminary { border-color: var(--caution); background: var(--caution-surface); color: var(--caution); }
.bs-tag--confirm { border: 1px dashed var(--caution); background: var(--caution-surface); color: var(--caution); }
.bs-tag--quoted { border-color: var(--surface-inverse); background: var(--surface-inverse); color: var(--ink-inverse); }
.bs-tag--verified { border-color: var(--success); background: var(--success-surface); color: var(--success); }
.bs-placeholder { padding: 0 4px; border: 1px dashed var(--caution); border-radius: var(--radius-xs); background: var(--caution-surface); color: var(--caution); font-style: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bs-note { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-xs); background: var(--info-surface); color: var(--ink); font-size: 15px; line-height: 23px; }
.bs-note > .bs-icon { width: 20px; height: 20px; margin-top: 1px; color: var(--info); }
.bs-note--caution { background: var(--caution-surface); }
.bs-note--caution > .bs-icon { color: var(--caution); }
.bs-note__title { display: block; font-weight: 600; }

/* ---------- Figures, captions, sources ---------- */
.bs-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-xs); background: var(--surface-sunken); }
.bs-figure--wide img { aspect-ratio: 16 / 9; }
.bs-figure--photo32 img { aspect-ratio: 3 / 2; }
.bs-caption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); font: 400 13px/19px var(--font-body); color: var(--ink-subtle); }
.bs-source { padding-top: var(--space-3); border-top: 1px solid var(--border); font: 400 13px/19px var(--font-body); color: var(--ink-subtle); }
.bs-source b { color: var(--ink-muted); }

/* ---------- Title block ---------- */
.bs-titleblock { display: grid; grid-template-columns: var(--tb-cols, repeat(4, auto)); justify-content: start; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border); }
.bs-titleblock--fill { justify-content: stretch; }
.bs-titleblock__cell { display: grid; align-content: center; gap: 2px; min-width: 0; padding: 10px var(--space-4); border-left: 1px solid var(--border); }
.bs-titleblock__cell:first-child { padding-left: 0; border-left: 0; }
.bs-titleblock__k { font: 600 12px/16px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.bs-titleblock__v { font: 400 13px/18px var(--font-body); color: var(--ink); }

/* ---------- Page scaffolding (web) ---------- */
.bs-site { background: var(--surface); color: var(--ink); }
.bs-section { padding: var(--space-8) var(--page-margin-narrow); }
.bs-section--raised { background: var(--surface-raised); }
.bs-section--sunken { background: var(--surface-sunken); }
.bs-section--brand { background: var(--surface-brand); color: var(--on-brand); }
.bs-section--brand .bs-label { color: var(--on-brand); }
.bs-wrap { max-width: var(--content-max); margin-inline: auto; }
.bs-section__head { display: grid; gap: var(--space-3); align-content: start; max-width: 780px; margin-bottom: var(--space-6); }
.bs-grid { display: grid; gap: var(--gutter); }
@container (min-width: 768px) {
  .bs-grid--2, .bs-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bs-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bs-grid--split { grid-template-columns: 5fr 7fr; gap: var(--space-8); }
  .bs-section__head { margin-bottom: var(--space-7); }
}
@container (min-width: 1024px) {
  .bs-section { padding: var(--space-9) var(--page-margin-wide); }
  .bs-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Header */
.bs-header { display: flex; align-items: center; gap: var(--space-5); min-height: 76px; padding: var(--space-2) var(--page-margin-narrow); border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.bs-header .bs-logo-plate { --logo-h: 40px; margin-left: -8px; }
.bs-header__nav { display: none; gap: var(--space-5); margin-left: auto; }
.bs-header__nav a { display: inline-flex; white-space: nowrap; align-items: center; min-height: var(--target-min); border-bottom: 2px solid transparent; color: var(--ink); font: 500 15px/20px var(--font-body); text-decoration: none; }
.bs-header__nav a:hover, .bs-header__nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.bs-header__cta { display: none; white-space: nowrap; }
.bs-header__menu { display: inline-flex; align-items: center; gap: var(--space-2); min-width: var(--target-min); min-height: var(--target-min); margin-left: auto; padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: 600 15px/20px var(--font-body); cursor: pointer; }
.bs-header__menu .bs-icon { width: 22px; height: 22px; }
.bs-header__panel { display: grid; padding: var(--space-2) var(--page-margin-narrow) var(--space-5); border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.bs-header__panel a:not(.bs-btn) { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); color: var(--ink); font: 500 17px/24px var(--font-body); text-decoration: none; }
.bs-header__panel .bs-btn { margin-top: var(--space-4); }
@container (min-width: 1100px) {
  .bs-header { padding-inline: var(--space-6); }
  .bs-header__nav { display: flex; }
  .bs-header__cta { display: inline-flex; }
  .bs-header__menu, .bs-header__panel { display: none; }
}
@container (min-width: 1280px) { .bs-header { padding-inline: var(--page-margin-wide); } }

/* Footer */
.bs-footer { padding: var(--space-8) var(--page-margin-narrow) var(--space-5); background: var(--surface-sunken); font-size: 15px; line-height: 23px; }
.bs-footer__grid { display: grid; gap: var(--space-6); max-width: var(--content-max); margin-inline: auto; }
.bs-footer__col { display: grid; gap: var(--space-2); align-content: start; justify-items: start; }
.bs-footer__col a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.bs-footer__col a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.bs-footer__base { max-width: var(--content-max); margin: var(--space-7) auto 0; }
@container (min-width: 768px) { .bs-footer__grid { grid-template-columns: 2.2fr 1fr 1fr 1.6fr; } }
@container (min-width: 1024px) { .bs-footer { padding-inline: var(--page-margin-wide); } }

/* Hero */
.bs-hero { display: grid; gap: var(--space-6); align-items: center; }
.bs-hero__copy { display: grid; gap: var(--space-4); justify-items: start; }
.bs-hero__copy .bs-span { margin-bottom: var(--space-2); }
.bs-hero__lead { max-width: 560px; font: 400 18px/28px var(--font-body); color: var(--ink-muted); }
.bs-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
@container (min-width: 900px) {
  .bs-hero { grid-template-columns: 6fr 5fr; gap: var(--space-8); }
  .bs-hero__lead { font-size: 20px; line-height: 30px; }
}

/* Audience columns */
.bs-audience { display: grid; gap: 0 var(--gutter); }
.bs-audience__item { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5) 0 var(--space-6); border-top: 2px solid var(--ink); }
.bs-audience__item > .bs-icon { width: 28px; height: 28px; color: var(--accent); }
.bs-audience__item h3 { font: 500 18px/24px var(--font-heading); }
@container (min-width: 640px) { .bs-audience { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1024px) { .bs-audience { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Benefit + mechanism + evidence */
.bs-claims { border-top: 2px solid var(--ink); }
.bs-claim { display: grid; gap: var(--space-4) var(--gutter); padding: var(--space-5) 0; border-bottom: 1px solid var(--border); }
.bs-claim__title { font: 500 22px/28px var(--font-heading); letter-spacing: -0.005em; text-wrap: balance; }
.bs-claim__part { display: grid; gap: var(--space-1); align-content: start; font-size: 15px; line-height: 23px; }
.bs-claim__part--evidence { color: var(--ink-muted); }
@container (min-width: 820px) { .bs-claim { grid-template-columns: 4fr 5fr 3.4fr; } }

/* Project reference */
.bs-ref { display: grid; align-content: start; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); overflow: hidden; }
.bs-ref__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.bs-ref__body { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); }
.bs-ref__title { font: 500 22px/28px var(--font-heading); letter-spacing: -0.005em; }
.bs-ref__meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px var(--space-4); font-size: 15px; line-height: 22px; }
.bs-ref__meta dt { font: 600 12px/22px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.bs-ref__result { padding-top: var(--space-3); border-top: 1px solid var(--border); font-size: 15px; line-height: 23px; }
.bs-ref__result .bs-label { display: block; margin-bottom: var(--space-1); }
.bs-ref .bs-source { margin-top: 0; }
.bs-ref--text { background: var(--surface-sunken); }

/* Document entry */
.bs-docs { border-top: 2px solid var(--ink); }
.bs-doc { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); align-items: start; padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.bs-doc > .bs-icon { width: 24px; height: 24px; margin-top: 1px; color: var(--ink-muted); }
.bs-doc__title { font: 500 18px/24px var(--font-heading); }
.bs-doc__meta { margin-top: 2px; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.bs-doc__meta > span { display: block; }
.bs-doc__meta i { font-style: normal; }
.bs-doc__meta i + i::before { content: "\00B7"; margin: 0 var(--space-2); }
.bs-doc__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); grid-column: 2; }
.bs-doc__status .bs-link { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; font-weight: 600; }
@container (min-width: 760px) {
  .bs-doc { grid-template-columns: auto 1fr auto; align-items: center; }
  .bs-doc__status { grid-column: 3; justify-content: flex-end; }
}

/* Tables */
.bs-table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.bs-table { width: 100%; border-collapse: collapse; text-align: left; font: 400 15px/22px var(--font-body); }
.bs-table caption { caption-side: top; padding: var(--space-3) 0; text-align: left; font: 500 18px/24px var(--font-heading); color: var(--ink); }
.bs-table th, .bs-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); vertical-align: top; }
.bs-table thead th { background: var(--surface-sunken); font: 600 13px/18px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bs-table tbody th { font-weight: 600; color: var(--ink); }
.bs-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bs-table .ctr { text-align: center; }
.bs-table tfoot td, .bs-table tfoot th { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; }
.bs-table .bs-placeholder { white-space: nowrap; }
.bs-table--dense th, .bs-table--dense td { padding: var(--space-2) var(--space-3); font-size: 14px; line-height: 20px; }
@container (max-width: 599px) {
  .bs-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bs-table--stack tr { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
  .bs-table--stack th, .bs-table--stack td { display: block; padding: 2px 0; border: 0; }
  .bs-table--stack td[data-label]::before { content: attr(data-label); display: block; margin-top: var(--space-2); font: 600 12px/18px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
}

/* Accordion */
.bs-accordion { border-top: 2px solid var(--ink); }
.bs-accordion details { border-bottom: 1px solid var(--border); }
.bs-accordion summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-4) 0; font: 500 18px/24px var(--font-heading); list-style: none; cursor: pointer; }
.bs-accordion summary::-webkit-details-marker { display: none; }
.bs-accordion summary:hover { color: var(--link-hover); }
.bs-accordion summary .bs-icon { width: 22px; height: 22px; transition: transform 0.15s ease; }
.bs-accordion details[open] summary .bs-icon { transform: rotate(180deg); }
.bs-accordion__body { display: grid; gap: var(--space-3); max-width: var(--measure); padding: 0 var(--space-6) var(--space-5) 0; font-size: 16px; line-height: 25px; }

/* Forms */
.bs-form { display: grid; gap: var(--space-5); }
.bs-form__row { display: grid; gap: var(--space-5); }
@container (min-width: 560px) { .bs-form__row { grid-template-columns: 1fr 1fr; } }
.bs-fieldset { display: grid; gap: var(--space-1); min-width: 0; margin: 0; padding: 0; border: 0; }
.bs-fieldset legend { padding: 0; font: 600 15px/20px var(--font-body); }
.bs-field { display: grid; gap: 6px; align-content: start; }
.bs-field__label { font: 600 15px/20px var(--font-body); color: var(--ink); }
.bs-field__opt { font-weight: 400; color: var(--ink-subtle); }
.bs-field__hint { font: 400 14px/20px var(--font-body); color: var(--ink-subtle); }
.bs-input, .bs-select, .bs-textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: 400 16px/24px var(--font-body); }
.bs-input:hover, .bs-select:hover, .bs-textarea:hover { border-color: var(--ink); }
.bs-input::placeholder, .bs-textarea::placeholder { color: var(--ink-subtle); opacity: 1; }
.bs-textarea { min-height: 120px; resize: vertical; }
.bs-select { appearance: none; padding-right: 44px; }
.bs-select-wrap { position: relative; display: block; }
.bs-select-wrap > .bs-icon { position: absolute; right: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--ink); pointer-events: none; }
.bs-field.is-invalid :where(.bs-input, .bs-select, .bs-textarea) { padding: 10px 11px; border: var(--stroke-rule) solid var(--danger); }
.bs-field__error { display: flex; gap: 6px; align-items: flex-start; font: 600 14px/20px var(--font-body); color: var(--danger); }
.bs-field__error .bs-icon { width: 18px; height: 18px; margin-top: 1px; }
.bs-choice { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--target-min); padding: 10px 0; font: 400 16px/24px var(--font-body); cursor: pointer; }
.bs-choice input { appearance: none; display: grid; place-content: center; width: 24px; height: 24px; flex: none; margin: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-raised); cursor: pointer; }
.bs-choice input[type="radio"] { border-radius: var(--radius-round); }
.bs-choice input:checked { border: 2px solid var(--action); }
.bs-choice input[type="checkbox"]:checked { background: var(--action); }
.bs-choice input[type="checkbox"]:checked::after { content: ""; width: 12px; height: 7px; margin-top: -3px; border-left: 2.5px solid var(--on-action); border-bottom: 2.5px solid var(--on-action); transform: rotate(-45deg); }
.bs-choice input[type="radio"]:checked::after { content: ""; width: 12px; height: 12px; border-radius: var(--radius-round); background: var(--action); }
.bs-status { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3); padding: var(--space-4); border-radius: var(--radius-xs); font-size: 15px; line-height: 23px; }
.bs-status > .bs-icon { width: 24px; height: 24px; }
.bs-status__title { font: 500 18px/24px var(--font-heading); }
.bs-status__body { display: grid; gap: var(--space-2); grid-column: 2; }
.bs-status--success { background: var(--success-surface); }
.bs-status--success > .bs-icon { color: var(--success); }
.bs-status--error { background: var(--danger-surface); }
.bs-status--error > .bs-icon { color: var(--danger); }

/* ---------- Diagrams ---------- */
.bs-dg { width: 100%; height: auto; overflow: visible; }
.bs-dg--strip { max-width: 760px; margin-inline: auto; }
.bs-dg .dg-sheathing { fill: var(--diagram-sheathing); }
.bs-dg .dg-core { fill: var(--diagram-core); }
.bs-dg .dg-frame { fill: var(--diagram-frame); }
.bs-dg .dg-ground { fill: var(--surface-raised); }
.bs-dg .dg-shade { fill: var(--charcoal-900); opacity: 0.16; }
.bs-dg .dg-shade2 { fill: var(--charcoal-900); opacity: 0.3; }
.bs-dg .dg-line { fill: none; stroke: var(--diagram-line); stroke-width: 1.5; stroke-linejoin: round; }
.bs-dg .dg-other { fill: none; stroke: var(--diagram-other); stroke-width: 1.5; stroke-dasharray: 6 5; }
.bs-dg .dg-leader { fill: none; stroke: var(--ink-muted); stroke-width: 1.25; }
.bs-dg .dg-key circle { fill: var(--action); }
.bs-dg .dg-key text { fill: var(--on-action); font: 500 16px var(--font-heading); text-anchor: middle; dominant-baseline: central; }
.bs-dg .dg-text { fill: var(--ink); font: 400 14px var(--font-body); }
.bs-dg .dg-text--muted { fill: var(--ink-muted); }
.bs-dg .dg-text--label { fill: var(--ink-muted); font: 600 12px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.bs-diagram { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.bs-legend { display: grid; gap: var(--space-4); }
.bs-legend__item { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-3); }
.bs-legend__title { align-self: center; font: 500 18px/24px var(--font-heading); }
.bs-legend__item p { grid-column: 2; font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* Process steps along a datum line */
.bs-steps { display: grid; gap: var(--space-5); }
.bs-step { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-4); align-items: start; }
.bs-step .bs-key { position: relative; z-index: 1; grid-row: span 2; }
.bs-step__title { align-self: center; font: 500 18px/24px var(--font-heading); }
.bs-step__text { grid-column: 2; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.bs-step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: calc(-1 * var(--space-5)); width: 2px; background: var(--border-strong); }
@container (min-width: 900px) {
  .bs-steps--row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gutter); }
  .bs-steps--row .bs-step { grid-template-columns: 1fr; gap: var(--space-3); align-content: start; }
  .bs-steps--row .bs-step .bs-key { grid-row: auto; }
  .bs-steps--row .bs-step__text { grid-column: 1; }
  .bs-steps--row .bs-step:not(:last-child)::before { left: 28px; right: calc(-1 * var(--gutter)); top: 13px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- Proposal patterns ---------- */
.bs-estimate { display: grid; gap: var(--space-3); }
.bs-estimate__scale { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); overflow: hidden; }
.bs-estimate__state { display: grid; gap: 2px; align-content: start; padding: var(--space-3) var(--space-4); background: var(--surface-sunken); color: var(--ink-subtle); font-size: 14px; line-height: 20px; }
.bs-estimate__state + .bs-estimate__state { border-left: 1px solid var(--border-strong); }
.bs-estimate__name { display: flex; align-items: center; gap: var(--space-2); font: 500 18px/24px var(--font-heading); }
.bs-estimate__state.is-current { background: var(--caution-surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--caution); }
.bs-estimate__state.is-current .bs-estimate__name { color: var(--caution); }
.bs-estimate__state--quoted.is-current { background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: none; }
.bs-estimate__state--quoted.is-current .bs-estimate__name { color: var(--ink-inverse); }
.bs-estimate__flag { font: 600 12px/16px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.bs-scope { display: grid; gap: var(--space-5) var(--gutter); }
@container (min-width: 600px) { .bs-scope { grid-template-columns: 1fr 1fr; } }
.bs-scope__col { display: grid; gap: var(--space-2); align-content: start; }
.bs-scope__head { display: flex; align-items: center; gap: var(--space-2); padding-bottom: var(--space-2); border-bottom: 2px solid var(--ink); font: 500 18px/24px var(--font-heading); }
.bs-scope__list > li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 22px; }
.bs-scope__list .bs-icon { width: 18px; height: 18px; margin-top: 2px; }
.bs-scope__col--in .bs-scope__list .bs-icon { color: var(--success); }
.bs-scope__col--out .bs-scope__list .bs-icon { color: var(--ink-muted); }
.bs-role { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-xs); font: 600 12px/1 var(--font-body); }
.bs-role--lead { background: var(--ink); color: var(--surface-raised); }
.bs-role--support { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.bs-role--review { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--ink-muted); }
.bs-role-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bs-role-legend > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.bs-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Slides: fixed 1920 x 1080 canvas ---------- */
.bs-slide { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) var(--slide-titleblock); width: var(--slide-width); height: var(--slide-height); overflow: hidden; background: var(--surface); color: var(--ink); font: 400 48px/64px var(--font-body); }
.bs-slide__main { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--space-7); min-height: 0; padding: var(--slide-margin) var(--slide-margin) var(--space-7); }
.bs-slide__head { display: grid; gap: var(--space-4); align-content: start; }
.bs-slide :where(h1, h2, h3) { text-wrap: balance; }
.bs-slide__body { min-height: 0; }
.bs-slide .bs-span { width: 96px; height: 8px; margin-bottom: var(--space-3); }
.bs-slide .bs-label { font-size: 30px; line-height: 36px; }
.bs-slide .bs-key { width: 64px; height: 64px; font-size: 34px; }
.bs-slide .bs-tag { gap: 12px; padding: 6px 16px 6px 12px; font-size: 28px; line-height: 34px; }
.bs-slide .bs-tag .bs-icon { width: 26px; height: 26px; stroke-width: 2; }
.bs-slide .bs-placeholder { border-width: 2px; padding: 0 10px; }
.bs-slide .bs-logo-plate { --logo-h: 72px; }
.bs-slide .bs-figure img { border-radius: var(--radius-xs); }
.bs-slide .bs-caption { gap: var(--space-3) var(--space-4); margin-top: var(--space-4); font-size: 30px; line-height: 40px; }
.bs-slide__tb { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-7); padding: 0 var(--slide-margin); border-top: 2px solid var(--border); background: var(--surface-sunken); font: 400 28px/36px var(--font-body); color: var(--ink-muted); }
.bs-slide__tb b { color: var(--ink); }
.bs-slide__tb > :nth-child(2) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 28px; line-height: 34px; }
.bs-slide__tb .bs-num { color: var(--ink); font-weight: 600; }
.bs-slide--brand { background: var(--surface-brand); color: var(--on-brand); }
.bs-slide--brand .bs-label, .bs-slide--brand .bs-slide__tb, .bs-slide--brand .bs-slide__tb b, .bs-slide--brand .bs-slide__tb .bs-num { color: var(--on-brand); }
.bs-slide--brand .bs-slide__tb { border-top-color: var(--on-brand); background: var(--green-800); }
.bs-slide--brand .bs-span { background: var(--on-brand); }
.bs-slide .bs-table { font-size: 36px; line-height: 48px; }
.bs-slide .bs-table th, .bs-slide .bs-table td { padding: 20px 28px; border-bottom-width: 2px; }
.bs-slide .bs-table thead th { font-size: 28px; line-height: 36px; }
.bs-slide .bs-table-wrap { border-top-width: 4px; }

/* ---------- Printed sheets: US Letter at 96px per inch ---------- */
.bs-sheet { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--space-5); width: var(--sheet-width); height: var(--sheet-height); padding: var(--sheet-margin); overflow: hidden; background: var(--white); color: var(--ink); box-shadow: var(--shadow-paper); font: 400 12.67px/18px var(--font-body); }
.bs-sheet--a4 { width: 794px; height: 1123px; }
.bs-sheet .bs-label { font-size: 10px; line-height: 13px; }
.bs-sheet .bs-span { width: 36px; margin-bottom: var(--space-3); }
.bs-sheet .bs-key { width: 20px; height: 20px; font-size: 11.5px; }
.bs-sheet .bs-tag { gap: 4px; padding: 2px 6px 2px 5px; font-size: 10px; line-height: 13px; letter-spacing: 0.05em; }
.bs-sheet .bs-tag .bs-icon { width: 11px; height: 11px; stroke-width: 2; }
.bs-sheet .bs-list { gap: 3px; font-size: 12.67px; line-height: 18px; }
.bs-sheet .bs-list > li { padding-left: 13px; }
.bs-sheet .bs-list > li::before { top: 8px; width: 6px; height: 1.5px; }
.bs-sheet .bs-logo-plate { --logo-h: 46px; padding: 0; }
.bs-sheet .bs-table { font-size: 11.33px; line-height: 15px; }
.bs-sheet .bs-table th, .bs-sheet .bs-table td { padding: 5px 8px; }
.bs-sheet .bs-table--dense th, .bs-sheet .bs-table--dense td { font-size: 11.33px; line-height: 15px; }
.bs-sheet .bs-table thead th { font-size: 10px; line-height: 13px; }
.bs-sheet .bs-table caption { padding: 0 0 6px; font-size: 14px; line-height: 18px; }
.bs-sheet .bs-caption, .bs-sheet .bs-source { font-size: 10.67px; line-height: 14px; }
.bs-sheet .bs-caption { gap: 4px 8px; margin-top: 6px; }
.bs-sheet .bs-source { padding-top: 6px; }
.bs-sheet .bs-note { gap: 8px; padding: 10px 12px; font-size: 11.33px; line-height: 16px; }
.bs-sheet .bs-note > .bs-icon { width: 14px; height: 14px; }
.bs-sheet .bs-titleblock__cell { padding: 6px 12px; }
.bs-sheet .bs-titleblock__cell:first-child { padding-left: 0; }
.bs-sheet .bs-titleblock__k { font-size: 10px; line-height: 13px; }
.bs-sheet .bs-titleblock__v { font-size: 10.67px; line-height: 14px; }
.bs-sheet .bs-step__title, .bs-sheet .bs-legend__title { font-size: 14px; line-height: 18px; }
.bs-sheet .bs-step__text, .bs-sheet .bs-legend__item p { font-size: 11.33px; line-height: 15px; }
.bs-sheet .bs-legend { gap: var(--space-3); }
.bs-sheet .bs-steps { gap: var(--space-3); }
.bs-sheet .bs-step { gap: 1px var(--space-3); }
.bs-sheet .bs-step:not(:last-child)::before { left: 9px; top: 20px; bottom: calc(-1 * var(--space-3)); width: 1.5px; }
.bs-sheet .bs-scope__head { font-size: 14px; line-height: 18px; padding-bottom: 5px; }
.bs-sheet .bs-scope__list > li { gap: 8px; padding: 4px 0; font-size: 11.33px; line-height: 15px; }
.bs-sheet .bs-scope__list .bs-icon { width: 13px; height: 13px; margin-top: 1px; stroke-width: 2; }
.bs-sheet .bs-role { width: 18px; height: 18px; font-size: 10px; }
.bs-sheet .bs-role-legend { gap: 4px 14px; font-size: 10.67px; line-height: 14px; }
.bs-sheet .bs-estimate__state { padding: 8px 10px; font-size: 10.67px; line-height: 14px; }
.bs-sheet .bs-estimate__name { font-size: 14px; line-height: 18px; }
.bs-sheet .bs-estimate__flag { font-size: 10px; line-height: 13px; }
.bs-sheet .bs-placeholder { padding: 0 3px; }
.bs-sheet .bs-dg .dg-key text { font-size: 16px; }

/* ---------- Scaffolding for the previews in this system ---------- */
.bs-preview { padding: var(--space-5); }
.bs-preview--row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.bs-preview--stack { display: grid; gap: var(--space-6); }
.bs-preview__cap { font: 600 12px/16px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-subtle); }
.bs-rule-ok, .bs-rule-no { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/20px var(--font-body); }
.bs-rule-ok { color: var(--success); }
.bs-rule-no { color: var(--danger); }
.bs-rule-ok .bs-icon, .bs-rule-no .bs-icon { width: 18px; height: 18px; }
.bs-stage { display: grid; justify-content: center; padding: var(--space-6); background: var(--surface-sunken); }
