/* BetterSpan website, version 2: site-level patterns built on the BetterSpan design system.
   Loads after ds/betterspan/tokens.css and ds/betterspan/components/bundle.css. Tokens only.
   Responsive rules are container queries on .bs-site, as in the system.
   Proposed extensions to the system are marked EXT. */

/* ---------- Helpers ---------- */
.bs [hidden] { display: none !important; }
.bs img { max-width: 100%; }
.bx-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bx-lead { max-width: var(--measure); font: 400 18px/28px var(--font-body); color: var(--ink-muted); text-wrap: pretty; }
@container (min-width: 768px) { .bx-lead { font-size: 20px; line-height: 30px; } }
.bx-h3 { font: 500 22px/28px var(--font-heading); letter-spacing: -0.005em; text-wrap: balance; }
.bx-h4 { font: 500 18px/24px var(--font-heading); }
.bx-sm { font-size: 15px; line-height: 23px; }
.bx-stack { display: grid; gap: var(--space-4); align-content: start; justify-items: start; }
.bx-stack--tight { gap: var(--space-2); }
.bx-stack--loose { gap: var(--space-6); }
.bx-stack--fill { justify-items: stretch; }
.bx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-6); }
.bx-block { margin-top: var(--space-7); }
.bx-block--sm { margin-top: var(--space-6); }
.bs-on-brand .bx-lead, .bs-on-brand .bs-muted { color: var(--on-brand); }
.bs-tag { white-space: normal; }
.bx-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.bx-arrow .bs-icon { width: 18px; height: 18px; }

/* EXT: charcoal band. The system's dark theme, used for an occasional web section. */
.bs-section[data-theme="dark"] { background: var(--surface); color: var(--ink); }
.bs-section[data-theme="dark"] .bx-lead { color: var(--ink-muted); }
.bs-section[data-theme="dark"] .bs-btn--secondary:hover { background: var(--surface-raised); }

/* EXT: larger display size for a page's opening headline on wide containers. */
.bx-display-xl { font: 500 40px/44px var(--font-heading); letter-spacing: -0.02em; text-wrap: balance; }
@container (min-width: 768px) { .bx-display-xl { font-size: 56px; line-height: 60px; } }
@container (min-width: 1200px) { .bx-display-xl { font-size: 72px; line-height: 74px; letter-spacing: -0.025em; } }

/* ---------- Header: utility strip, full nav labels, sticky on wide screens ---------- */
.bx-util { display: none; justify-content: flex-end; align-items: center; gap: var(--space-5); min-height: 36px; padding: 0 var(--page-margin-wide); background: var(--charcoal-900); color: var(--neutral-50); font: 400 13px/18px var(--font-body); }
.bx-util a { display: inline-flex; align-items: center; min-height: 36px; color: var(--neutral-50); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.bx-util a:hover { color: var(--green-300); }
.bs .bx-util a:focus-visible { outline-color: var(--neutral-50); }
.bx-util span { color: var(--sage-300); }
@container (max-width: 1239px) {
  .bs-header .bs-header__nav, .bs-header .bs-header__cta { display: none; }
  .bs-header .bs-header__menu { display: inline-flex; }
  .bs-header__panel { display: grid; }
}
@container (min-width: 1240px) {
  .bx-util { display: flex; }
  .bx-top { position: sticky; top: 0; z-index: 20; }
}

/* ---------- Page openings ---------- */
.bs-section.bx-pagehead { padding-block: var(--space-8); border-bottom: 1px solid var(--border); }
.bx-pagehead .bs-section__head { margin-bottom: 0; }
.bx-subnav { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.bx-subnav a { display: inline-flex; align-items: center; min-height: var(--target-min); font-weight: 600; font-size: 15px; }
.bs-section.bx-hero { padding-block: var(--space-7) var(--space-7); overflow: hidden; }
.hero { display: grid; gap: var(--space-6); align-items: center; }
.hero__copy { display: grid; gap: var(--space-4); justify-items: start; }
.hero__lead { max-width: 560px; font: 400 18px/28px var(--font-body); color: var(--ink-muted); }
.hero__art img { display: block; width: 100%; height: auto; }
@container (min-width: 1000px) {
  .bs-section.bx-hero { padding-block: var(--space-8); }
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-6); }
  .hero__lead { font-size: 20px; line-height: 30px; }
}

/* ---------- Layout patterns ---------- */
.bx-split { display: grid; gap: var(--space-6); align-items: start; }
@container (min-width: 740px) {
  .bx-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-6); }
  .bx-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-split--wide-first { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .bx-split--center { align-items: center; }
}
.bx-cols { display: grid; gap: 0 var(--gutter); }
@container (min-width: 700px) {
  .bx-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bx-col { display: grid; gap: var(--space-3); align-content: start; justify-items: start; padding: var(--space-5) 0 var(--space-6); border-top: 2px solid var(--ink); }
.bx-col > .bs-list { justify-self: stretch; }
.bx-card { display: grid; gap: var(--space-4); align-content: start; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
@container (min-width: 768px) { .bx-card--roomy { padding: var(--space-6); } }

/* Large figures with their label and source */
.bx-facts { display: grid; gap: var(--space-6) var(--gutter); }
@container (min-width: 700px) { .bx-facts, .bx-facts--lead { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bx-facts--lead > :first-child { grid-column: 1 / -1; } }
@container (min-width: 1000px) { .bx-facts--lead { grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); } .bx-facts--lead > :first-child { grid-column: auto; } }
.bx-fact { display: grid; gap: var(--space-2); align-content: start; justify-items: start; padding-top: var(--space-4); border-top: 2px solid var(--ink); }
.bx-fact__fig { font: 500 48px/52px var(--font-heading); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@container (min-width: 1100px) { .bx-fact__fig { font-size: 64px; line-height: 66px; } }
.bx-fact__fig small { font: 500 22px/28px var(--font-heading); letter-spacing: 0; }
.bx-fact__qual { font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* Benefits with a drawing */
.ben { display: grid; gap: var(--space-6) var(--gutter); }
@container (min-width: 640px) { .ben { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1100px) { .ben { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ben__item { display: grid; gap: var(--space-3); align-content: start; }
.ben__art { display: grid; place-items: center; height: 168px; padding: var(--space-4); border-radius: var(--radius-xs); background: var(--surface-raised); border: 1px solid var(--border); }
.ben__art img { max-height: 132px; width: auto; }
.ben__item p { font-size: 16px; line-height: 25px; color: var(--ink-muted); }

/* Step flows: a method and its wall construction stages */
.flow { display: grid; gap: var(--space-4); }
.flow__row { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.flow__row--ours { border: 2px solid var(--ink); }
.flow__name { font: 500 18px/24px var(--font-heading); }
.flow__steps { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 0; margin: 0; padding: 0; list-style: none; }
.flow__steps li { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); font: 600 15px/20px var(--font-body); background: var(--surface); }
.flow__steps li.is-factory { border-color: var(--success); background: var(--success-surface); color: var(--success); }
.flow__steps li:not(:last-child) { margin-right: 34px; position: relative; }
.flow__steps li:not(:last-child)::after { content: ""; position: absolute; right: -24px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-right: 2px solid var(--ink); border-top: 2px solid var(--ink); transform: rotate(45deg); }
.flow__note { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Method cards: three ways to build a wall */
.methods { display: grid; gap: var(--gutter); }
@container (min-width: 700px) { .methods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mcard { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.mcard--ours { border: 2px solid var(--ink); }
.mcard__art { display: grid; place-items: center; height: 150px; }
.mcard__art img { max-height: 140px; width: auto; }
.mcard ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.mcard ol li { display: grid; grid-template-columns: 26px 1fr; gap: var(--space-2); align-items: start; font-size: 15px; line-height: 23px; counter-increment: st; }
.mcard ol li::before { content: counter(st); display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: var(--radius-round); font: 600 12px/1 var(--font-body); }
.mcard ol li.is-factory::before { border-color: var(--action); background: var(--action); color: var(--on-action); }
.mcard__marks { display: grid; gap: 6px; padding-top: var(--space-3); border-top: 1px solid var(--border); }

/* Image tiles */
.tile { display: grid; gap: var(--space-3); align-content: start; }
.tile__img { display: grid; place-items: center; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.tile__img img { width: 100%; height: auto; }
.bx-art-cap { font: 400 13px/19px var(--font-body); color: var(--ink-subtle); }

/* Equation: what adds up to a cost */
.eq { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.eq span { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-raised); font: 600 15px/20px var(--font-body); }
.eq i { font: 500 20px/1 var(--font-heading); font-style: normal; color: var(--ink-muted); }

/* Checklist */
.bx-check { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.bx-check li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-3); align-items: start; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.bx-check li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border: 2px solid var(--ink); border-radius: var(--radius-xs); }
.bx-check small { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Entry links: three ways into a long page */
.entries { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
@container (min-width: 700px) { .entries { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entry { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface); color: var(--ink); text-decoration: none; transition: background-color 0.12s ease, border-color 0.12s ease; }
.entry:hover { border-color: var(--ink); background: var(--surface-sunken); }
.entry b { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font: 500 20px/26px var(--font-heading); }
.entry span { font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* Project plates: a reference project led by its fact */
.plates { display: grid; gap: var(--gutter); }
@container (min-width: 760px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plate { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.plate__fig { font: 500 48px/52px var(--font-heading); letter-spacing: -0.02em; }
.plate__fig small { font: 500 20px/26px var(--font-heading); letter-spacing: 0; }

/* Stage strip: the project in four drawings */
.stages { display: grid; gap: var(--space-6) var(--gutter); margin: 0; padding: 0; list-style: none; }
@container (min-width: 640px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 1100px) { .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stages li { display: grid; gap: var(--space-3); align-content: start; }
.stages__art { display: grid; place-items: center; height: 190px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-raised); }
.stages__art img { max-height: 164px; width: auto; }
.stages h3 { display: flex; align-items: center; gap: var(--space-3); font: 500 18px/24px var(--font-heading); }
.stages p { font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* ---------- Diagram helpers (extend the system's .bs-dg classes) ---------- */
.bs-dg .ol { stroke: var(--diagram-line); stroke-width: 1.5; stroke-linejoin: round; }
.bs-dg .il-thin { fill: none; stroke: var(--diagram-line); stroke-width: 1; }
.bs-dg .il-lab { fill: var(--ink-muted); font: 600 15px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; }

/* Panel section: pick a layer */
.xs-g { transition: opacity 0.12s ease; }
.xs-g.is-dim { opacity: 0.25; }
.xs-pick { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; width: 100%; min-height: var(--target-min); padding: 6px 8px 6px 6px; margin-left: -6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease; }
.xs-pick:hover { background: var(--surface-sunken); }
.xs-pick[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-raised); }
.xs-item { display: grid; gap: 2px; }
.xs-item p { padding-left: 46px; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.bx-details { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bx-details + .bx-details { border-top: 0; }
.bx-details summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 52px; font: 600 16px/22px var(--font-body); color: var(--link); cursor: pointer; list-style: none; }
.bx-details summary::-webkit-details-marker { display: none; }
.bx-details summary .bs-icon { transition: transform 0.15s ease; }
.bx-details[open] summary .bs-icon { transform: rotate(180deg); }
.bx-details__body { display: grid; gap: var(--space-4); padding: var(--space-2) 0 var(--space-5); font-size: 15px; line-height: 23px; }

/* ---------- Comparison matrix ---------- */
.cmp { border-top: 2px solid var(--ink); }
.cmp__head, .cmp__row > summary { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) 24px; gap: var(--space-4); align-items: center; }
.cmp__head { padding: var(--space-3) var(--space-4); background: var(--surface-sunken); font: 600 13px/18px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.cmp__head .is-ours { color: var(--accent-text); }
.cmp__group { padding: var(--space-5) var(--space-4) var(--space-2); border-bottom: 1px solid var(--border-strong); font: 500 18px/24px var(--font-heading); }
.cmp__row { border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.cmp__row > summary { min-height: 64px; padding: var(--space-3) var(--space-4); list-style: none; cursor: pointer; }
.cmp__row > summary::-webkit-details-marker { display: none; }
.cmp__row > summary:hover .cmp__q { color: var(--link-hover); }
.cmp__row > summary > .bs-icon { width: 22px; height: 22px; transition: transform 0.15s ease; }
.cmp__row[open] > summary > .bs-icon { transform: rotate(180deg); }
.cmp__q { font: 500 17px/23px var(--font-heading); }
.cmp__cell { font-size: 15px; line-height: 21px; }
.cmp__cell.is-ours { font-weight: 600; }
.cmp__mark { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 15px/20px var(--font-body); }
.cmp__mark .bs-icon { width: 22px; height: 22px; stroke-width: 2.5; }
.cmp__mark--yes { color: var(--success); }
.cmp__mark--no { color: var(--danger); }
.cmp__mark--dep { color: var(--ink-muted); }
.cmp__body { display: grid; gap: var(--space-2); max-width: 820px; padding: 0 var(--space-4) var(--space-5); font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.cmp__key { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-4); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
@container (max-width: 699px) {
  .cmp__head { display: none; }
  .cmp__row > summary { grid-template-columns: minmax(0, 1fr) 24px; gap: var(--space-2) var(--space-3); }
  .cmp__q { grid-column: 1; padding-bottom: var(--space-1); }
  .cmp__row > summary > .bs-icon { grid-column: 2; grid-row: 1; }
  .cmp__cell { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--border); text-align: right; }
  .cmp__cell::before { content: attr(data-col); flex: none; font: 600 12px/18px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); text-align: left; }
}

/* ---------- Cost ledger ---------- */
.ledger { display: grid; gap: var(--space-6) var(--gutter); }
@container (min-width: 740px) { .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ledger__col { display: grid; gap: 0; align-content: start; }
.ledger__head { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-3); border-bottom: 2px solid var(--ink); font: 500 20px/26px var(--font-heading); }
.ledger__dir { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border: 2px solid var(--ink); border-radius: var(--radius-xs); }
.ledger__dir .bs-icon { width: 20px; height: 20px; stroke-width: 2.25; }
.ledger__col--down .ledger__dir { border-color: var(--success); background: var(--success-surface); color: var(--success); }
.ledger__col--up .ledger__dir { border-color: var(--caution); background: var(--caution-surface); color: var(--caution); }
.ledger__item { display: grid; gap: var(--space-1); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.ledger__item b { font: 500 17px/23px var(--font-heading); color: var(--ink); }

/* Who-does-what cells */
.bx-who { display: inline-flex; align-items: flex-start; gap: var(--space-2); }
.bx-who .bs-role { flex: none; }

/* Document library */
.lib { display: grid; gap: var(--space-7); }
.lib h3 { margin-bottom: var(--space-3); }
.lib .bs-doc__meta dl { display: flex; flex-wrap: wrap; gap: 2px var(--space-5); margin: 4px 0 0; }
.lib .bs-doc__meta dl div { display: flex; gap: 6px; }
.lib .bs-doc__meta dt { font-weight: 600; color: var(--ink); }
.lib .bs-doc__meta dd { margin: 0; }

/* Narrow containers: stack flow steps, trim drawing frames */
@container (max-width: 560px) {
  .ben__art { height: 132px; }
  .ben__art img { max-height: 104px; }
  .mcard__art { height: 110px; }
  .mcard__art img { max-height: 100px; }
}
.tile__img img { aspect-ratio: 3 / 2; object-fit: contain; }
@container (min-width: 1000px) { .hero { grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); } }
@container (min-width: 1000px) { .bx-split { gap: var(--space-8); } .bx-split--even { gap: var(--space-7); } }
@container (max-width: 999px) { .mcard { padding: var(--space-4); } .bx-fact__fig { font-size: 40px; line-height: 44px; } }
@container (min-width: 1300px) { .hero__art { margin-right: calc(-1 * var(--space-7)); } }
/* The flow measures its own width, so its steps stack whenever they would wrap */
.flow { container-type: inline-size; }
@container (max-width: 440px) {
  .flow__steps { flex-direction: column; align-items: flex-start; gap: 0; }
  .flow__steps li:not(:last-child) { margin: 0 0 24px; }
  .flow__steps li:not(:last-child)::after { right: auto; left: 18px; top: auto; bottom: -17px; margin: 0; transform: rotate(135deg); }
}

/* ---------------------------------------------------------------------------
   PRODUCTION ADDITIONS
   Everything above this line is the approved design stylesheet, unchanged.
   The rules below exist only because the page is no longer inside the Claude
   Design viewer: page reset, skip link, anchor offset under the sticky header,
   and the form's spam honeypot (never shown). The last rule keeps document
   numbers whole (issue I-14).
   --------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #F6F7F3; }
.bx-skip { position: absolute; left: 8px; top: -64px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 4px; background: #2F373F; color: #F6F7F3; font: 600 15px/20px "Public Sans", "Segoe UI", Arial, sans-serif; text-decoration: none; }
.bx-skip:focus { top: 8px; outline: 3px solid #9CC46A; outline-offset: 2px; }
/* The header (utility strip + bar, 112px) is sticky from 1240px up; keep anchor targets clear of it. */
@media (min-width: 1240px) { html { scroll-padding-top: 112px; } }
/* Spam honeypot in the project review form: hidden from everyone; Formspree discards submissions that fill it. */
.bx-hp { display: none !important; }
/* Document numbers such as ESR-5346: the generator wraps them so no browser breaks them at the hyphen ("ESR-" / "5346"). */
.bx-nowrap { white-space: nowrap; }

/* Privacy policy page (added for launch, 1 December 2026): one readable column of text. */
.bx-policy { max-width: var(--measure); display: grid; gap: var(--space-4); }
.bx-policy h2 { margin-top: var(--space-6); }
.bx-policy h2:first-child { margin-top: 0; }
