@import url("https://fonts.googleapis.com/css2?family=Anek+Malayalam:wdth,wght@75..125,100..800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

/* Singleton Brand Systems: component styles. Every value comes from a token. */

body { margin: 0; font-family: var(--font-sans); background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
.bc-stage { padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.bc-stack { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }

/* Eyebrow: the mono system voice */
.bc-eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bc-eyebrow b { font-weight: 500; color: var(--ink); }
.bc-eyebrow .bc-num { color: var(--accent-ink); }

/* Buttons */
.bc-btn { font-family: var(--font-sans); font-size: 16px; line-height: 1.2; font-weight: 600; height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-sm); border: 1px solid transparent; display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; text-decoration: none; }
.bc-btn-primary { background: var(--action); color: var(--on-action); }
.bc-btn-secondary { background: transparent; color: var(--ink); border-color: var(--control-border); }
.bc-btn-text { background: transparent; color: var(--ink); padding: 0; height: auto; border-radius: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.bc-btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bc-btn .ph { font-size: 20px; }

/* Dot grid: dots on a grid, never a scatter */
.bc-dots { background-image: radial-gradient(circle, var(--dot) calc(var(--dot-size) / 2), transparent calc(var(--dot-size) / 2 + 0.5px)); background-size: var(--dot-pitch) var(--dot-pitch); background-position: calc(var(--dot-pitch) / 2) calc(var(--dot-pitch) / 2); }

/* Frame: how work is shown */
.bc-frame { border: 1px solid var(--rule); border-radius: var(--radius-0); background: var(--surface); }
.bc-frame-bar { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--rule); background: var(--surface-raised); }
.bc-frame-body { padding: var(--space-12); }
.bc-frame-shot { border-radius: var(--radius-md); border: 1px solid var(--rule); background: var(--surface-raised); }

/* Feature list: icon, line, hairline */
.bc-features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.bc-features li { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.5; }
.bc-features .ph { font-size: 24px; color: var(--ink); flex: none; }

/* Band: the one green section */
.bc-band { background: var(--action); color: var(--on-action); padding: var(--space-12); }
.bc-band .bc-eyebrow, .bc-band .bc-eyebrow b, .bc-band .bc-eyebrow .bc-num { color: var(--on-action); }
.bc-band h2 { font-family: var(--font-display); font-size: 48px; line-height: 1.1; font-weight: 300; margin: var(--space-3) 0 0; letter-spacing: -0.01em; }
.bc-band h2 strong { font-weight: 800; }

/* Stat: a research number */
.bc-stat { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); border: 1px solid var(--rule); min-width: 200px; }
.bc-stat-num { font-family: var(--font-display); font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.bc-stat-num em { font-style: normal; color: var(--accent-ink); }
.bc-stat-fill { height: var(--space-6); }

/* Headline helpers */
.bc-display { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; }
.bc-muted { color: var(--ink-muted); }

/* Icons: Phosphor Regular, inline SVG via SingletonBrandSystems.icon() or data-bc-icon */
.bc-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; }
[data-bc-icon] { display: inline-flex; line-height: 0; }
.bc-btn [data-bc-icon] { font-size: 20px; }
.bc-features [data-bc-icon] { font-size: 24px; color: var(--ink); }

/* Logo: single/ton, inline so it follows the theme (data-bc-logo or SingletonBrandSystems.logo). Letters take ink; the slash takes logo-slash. */
.bc-logo { display: block; fill: currentColor; }
.bc-logo-slash { fill: var(--logo-slash, var(--accent-ink)); }
[data-bc-logo] { display: inline-flex; line-height: 0; }
.bc-wordmark { display: inline-flex; align-items: center; line-height: 0; color: var(--ink); text-decoration: none; }
.bc-wordmark .bc-logo-wordmark { width: 151px; height: 26px; }
.bc-wordmark .bc-logo-mark { width: 40px; height: 40px; }

/* Lockup: the wordmark over the tagline as live JetBrains Mono, scaled from one width (never below 200px) */
.bc-lockup { --bc-lockup-w: 220px; flex-direction: column; align-items: flex-start; line-height: 1; color: var(--ink); text-decoration: none; }
.bc-lockup .bc-logo-wordmark { width: var(--bc-lockup-w); height: calc(var(--bc-lockup-w) * 122 / 692); }
.bc-tagline { font-family: var(--font-mono); font-weight: 400; font-size: calc(var(--bc-lockup-w, 220px) * 0.0688); line-height: 1; letter-spacing: 0; text-transform: none; color: var(--ink); white-space: nowrap; }
.bc-lockup .bc-tagline { margin-top: calc(var(--bc-lockup-w) * 0.017); }
.bc-lockup:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

/* Bobby's personal site: his name typed in the display face, no logo */
.bc-wordmark-name { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }

/* Screen-reader text */
.bc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Nav */
.bc-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); height: 72px; padding: 0 var(--space-12); border-bottom: 1px solid var(--rule); background: var(--surface); }
.bc-nav-links { display: flex; gap: var(--space-8); list-style: none; margin: 0; padding: 0; }
.bc-nav-links a { font-size: 16px; line-height: 1.2; font-weight: 500; color: var(--ink-muted); text-decoration: none; }
.bc-nav-links a[aria-current="page"] { color: var(--ink); }
.bc-nav-links a:hover { color: var(--ink); }
.bc-nav-links a:focus-visible, .bc-nav-menu:focus-visible, .bc-wordmark:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bc-nav-right { display: flex; align-items: center; gap: var(--space-4); }
.bc-nav-menu { display: none; background: transparent; border: 1px solid var(--control-border); border-radius: var(--radius-sm); color: var(--ink); width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; }
.bc-nav-compact .bc-nav-links, .bc-nav-compact .bc-nav-right .bc-btn { display: none; }
.bc-nav-compact .bc-nav-menu { display: inline-flex; }
.bc-nav-compact { padding: 0 var(--space-6); }

/* Footer */
.bc-footer { border-top: 1px solid var(--rule); padding: var(--space-16) var(--space-12) var(--space-8); background: var(--surface); }
.bc-footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-12); }
.bc-footer-tag { margin: var(--space-3) 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-muted); max-width: 32ch; }
.bc-footer h4 { margin: 0 0 var(--space-4); }
.bc-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.bc-footer ul a { color: var(--ink); text-decoration: none; font-size: 16px; display: inline-flex; align-items: center; gap: var(--space-2); }
.bc-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bc-footer-base { display: flex; justify-content: space-between; margin-top: var(--space-16); padding-top: var(--space-6); border-top: 1px solid var(--rule); }

/* Field */
.bc-field { display: flex; flex-direction: column; gap: var(--space-2); max-width: 420px; }
.bc-field label { font-size: 14px; line-height: 1.2; font-weight: 600; color: var(--ink); }
.bc-field input, .bc-field textarea, .bc-field select { font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); appearance: none; }
.bc-field textarea { min-height: 96px; resize: vertical; }
.bc-field input::placeholder, .bc-field textarea::placeholder { color: var(--ink-muted); }
.bc-field input:focus-visible, .bc-field textarea:focus-visible, .bc-field select:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-color: var(--ink); }
.bc-field-hint { font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.bc-field-select { position: relative; display: flex; }
.bc-field-select select { width: 100%; padding-right: var(--space-12); }
.bc-field-select [data-bc-icon] { position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; color: var(--ink-muted); }
.bc-field-error input { border-color: var(--danger); }
.bc-field-error .bc-field-hint { color: var(--danger); display: flex; gap: var(--space-1); align-items: center; }

/* Case study card */
.bc-case { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); max-width: 420px; }
.bc-case-media { aspect-ratio: 4 / 3; border: 1px solid var(--rule); position: relative; overflow: hidden; }
.bc-case-body { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding-top: var(--space-4); }
.bc-case h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; font-weight: 600; margin: var(--space-2) 0 0; }
.bc-case-arrow { font-size: 24px; color: var(--ink); margin-top: var(--space-6); }
.bc-case:hover .bc-case-arrow { color: var(--accent-ink); }
.bc-case:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

/* Keep the wordmark and actions on one line */
.bc-wordmark, .bc-btn, .bc-nav-links a { white-space: nowrap; }
.bc-nav-links { gap: var(--space-6); }

/* Charts (SingletonBrandSystems.chart.*): marks take chart tokens only; text takes ink tokens, never a series color */
.bc-chart { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); color: var(--ink); font-family: var(--font-sans); }
.bc-chart-head { display: flex; flex-direction: column; gap: var(--space-1); }
.bc-chart-title { font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.bc-chart-sub { font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.bc-chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 13px; line-height: 1.2; color: var(--ink-muted); }
.bc-chart-legend:empty { display: none; }
.bc-legend-item { display: inline-flex; align-items: center; gap: var(--space-2); }
.bc-legend-key { flex: none; width: 12px; height: 12px; border-radius: 2px; }
.bc-legend-key.line { width: 16px; height: 2px; border-radius: 1px; }
.bc-chart-plot { position: relative; }
.bc-chart-plot svg { display: block; overflow: visible; }
.bc-chart-plot svg:focus { outline: none; }
.bc-chart-plot svg:focus-visible { box-shadow: var(--focus-ring); }
.bc-chart text { font-family: var(--font-sans); }
.bc-chart .bc-tick { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-muted); }
.bc-chart .bc-label { font-size: 13px; fill: var(--ink-muted); }
.bc-chart .bc-value { font-size: 13px; font-weight: 600; fill: var(--ink-muted); }
.bc-chart .is-strong { fill: var(--ink); font-weight: 600; }
.bc-chart .bc-inlabel { font-size: 12px; font-weight: 600; pointer-events: none; }
.bc-grid { stroke: var(--chart-grid); stroke-width: 1; }
.bc-axis-line, .bc-cross { stroke: var(--chart-axis); stroke-width: 1; }
.bc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bc-dot { stroke: var(--surface); stroke-width: 2; }
.bc-hit { fill: transparent; }
.bc-mark { outline: none; }
.bc-mark:hover .bc-bar, .bc-mark:focus .bc-bar { opacity: 0.8; }
.bc-mark:focus-visible .bc-bar, .bc-cell.is-active { stroke: var(--focus); stroke-width: 2; }
.bc-tip { position: absolute; z-index: 2; pointer-events: none; padding: var(--space-2) var(--space-3); background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; color: var(--ink); white-space: nowrap; }
.bc-tip[hidden] { display: none; }
.bc-tip-head { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-1); }
.bc-tip-row { display: flex; align-items: center; gap: var(--space-2); }
.bc-tip-key { flex: none; width: 12px; height: 2px; border-radius: 1px; }
.bc-tip-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-tip-name { color: var(--ink-muted); }
.bc-chart-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.bc-chart-foot .bc-btn-text { font-size: 14px; }
.bc-chart-table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.4; }
.bc-chart-table[hidden] { display: none; }
.bc-chart-table th, .bc-chart-table td { text-align: left; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.bc-chart-table td { font-variant-numeric: tabular-nums; }
.bc-chart-table thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bc-scale { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.bc-scale-steps { display: inline-flex; gap: 2px; }
.bc-scale-steps span { width: 20px; height: 10px; }

/* Charts, research layer: question, base, notes, actions, reference lines, new forms */
.bc-chart-q { display: flex; gap: var(--space-2); font-size: 14px; line-height: 1.4; color: var(--ink-muted); }
.bc-chart-qlabel { flex: none; font-family: var(--font-mono); font-size: 11px; line-height: 20px; letter-spacing: 0.08em; text-transform: uppercase; }
.bc-chart-foot { align-items: flex-start; }
.bc-chart-meta { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.bc-chart-actions { display: flex; gap: var(--space-4); flex: none; }
.bc-chart-actions .bc-btn-text { font-size: 14px; }
.bc-chart-note { font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.bc-chart-warn { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 1.4; color: var(--ink); }
.bc-chart-warn-icon { display: inline-flex; color: var(--status-warning); font-size: 16px; }
.bc-legend-key.dot { width: 10px; height: 10px; border-radius: 50%; }
.bc-legend-key.ring { width: 10px; height: 10px; border-radius: 50%; background: transparent; border: 1.5px solid; box-sizing: border-box; }
.bc-ref { stroke: var(--ink-muted); stroke-width: 1; }
.bc-ref.is-target { stroke-dasharray: 1 5; stroke-linecap: round; stroke-width: 2; }
.bc-chart .bc-ref-label { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
.bc-connector { stroke: var(--chart-axis); stroke-width: 2; }
.bc-hitline { stroke: transparent; stroke-width: 14; }
.bc-chart .bc-axis-title { font-size: 12px; fill: var(--ink-muted); }
.bc-chart .bc-quad { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-muted); }
.bc-dot.is-active { stroke: var(--focus); stroke-width: 2; }
.bc-dot-off { fill: none; stroke: var(--dot); stroke-width: 1.5; }
.bc-dot-off.is-active { stroke: var(--focus); stroke-width: 2; }
.bc-chart .bc-annot { font-size: 12px; font-weight: 600; fill: var(--ink); }
.bc-annot-line { stroke: var(--ink-muted); stroke-width: 1; }
.bc-annot-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
/* Unit chart: the 24px dot grid made data */
.bc-units { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.bc-units-fig { flex: 1 1 200px; display: flex; flex-direction: column; gap: var(--space-2); }
.bc-units-num { font-family: var(--font-display); font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.bc-units-label { font-size: 16px; line-height: 1.5; color: var(--ink-muted); max-width: 32ch; }
.bc-units svg { flex: none; }
.bc-unit-on { fill: var(--chart-focus); }
.bc-unit-off { fill: var(--dot); }
/* Meter */
.bc-meters { display: flex; flex-direction: column; gap: var(--space-4); }
.bc-meter { display: flex; flex-direction: column; gap: var(--space-2); }
.bc-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); font-size: 14px; line-height: 1.3; }
.bc-meter-label { color: var(--ink); font-weight: 600; }
.bc-meter-right { display: inline-flex; align-items: center; gap: var(--space-3); flex: none; }
.bc-meter-value { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bc-meter-status { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); font-size: 13px; }
.bc-meter-status-icon { display: inline-flex; font-size: 16px; }
.bc-meter-track { position: relative; height: 8px; border-radius: 4px; background: var(--chart-track); }
.bc-meter-fill { height: 100%; border-radius: 4px; }
.bc-meter-target { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
/* Stat tiles */
.bc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.bc-kpi { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); border: 1px solid var(--rule); }
.bc-kpi-value { font-family: var(--font-display); font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.bc-kpi-delta { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.bc-kpi-delta-icon { display: inline-flex; font-size: 16px; }
.bc-kpi-delta.is-good .bc-kpi-delta-icon { color: var(--status-good); }
.bc-kpi-delta.is-bad .bc-kpi-delta-icon { color: var(--status-critical); }
.bc-kpi-unit { font-size: 24px; font-weight: 700; letter-spacing: 0; }
.bc-kpi-spark { display: block; overflow: visible; }
.bc-kpi-base { font-size: 13px; color: var(--ink-muted); }
.bc-kpis-source { margin-top: var(--space-3); }
/* Small multiples */
.bc-multiples-wrap { display: flex; flex-direction: column; gap: var(--space-4); }
.bc-multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-8) var(--space-6); }
.bc-multiple .bc-chart-title { font-size: 14px; }
/* Pull quote: interview evidence */
.bc-quote { margin: 0; padding: var(--space-8); background: var(--surface-tint); display: flex; flex-direction: column; gap: var(--space-4); max-width: 640px; }
.bc-quote-text { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.2; font-weight: 300; letter-spacing: -0.01em; color: var(--ink); }
.bc-quote-text strong { font-weight: 800; }
.bc-quote-by { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bc-quote-by b { font-weight: 500; color: var(--ink); }
.bc-quote-theme { align-self: flex-start; font-size: 13px; line-height: 1.2; color: var(--ink); border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); }
.bc-quote-plain { background: transparent; padding: 0 0 0 var(--space-6); border-left: 2px solid var(--accent-ink); }
/* Data table for published results */
.bc-table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.4; color: var(--ink); }
.bc-table caption { caption-side: top; text-align: left; padding-bottom: var(--space-3); font-size: 16px; font-weight: 600; }
.bc-table th, .bc-table td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; font-weight: 400; }
.bc-table thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); border-bottom-color: var(--chart-axis); }
.bc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-table tbody th { font-weight: 600; }
.bc-table tr.is-focus td, .bc-table tr.is-focus th { background: var(--surface-tint); }
.bc-table .bc-cellbar { display: inline-block; vertical-align: middle; height: 8px; width: calc(var(--v) * 0.8px); max-width: 80px; margin-right: var(--space-2); border-radius: 0 2px 2px 0; background: var(--chart-context); }
.bc-table tr.is-focus .bc-cellbar { background: var(--chart-focus); }
.bc-table tfoot td { border-bottom: 0; font-size: 13px; color: var(--ink-muted); padding-top: var(--space-3); }
/* Halos keep labels readable where they cross marks */
.bc-chart .bc-quad, .bc-chart .bc-annot, .bc-chart .has-halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
/* Small multiples share one legend and one footer */
.bc-multiple .bc-chart-legend, .bc-multiple .bc-chart-foot { display: none; }

/* Charts, wave 1: part to whole, distribution, time, relationship */
.bc-slice, .bc-tile { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; }
.bc-layer { stroke: var(--surface); stroke-width: 1.5; stroke-linejoin: round; }
.bc-area { stroke: none; }
.bc-dim { opacity: 0.3; }
.bc-pie-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-6) var(--space-8); }
.bc-pie-wrap svg { flex: none; }
.bc-partlist { flex: 1 1 220px; display: flex; flex-direction: column; gap: var(--space-2); font-size: 14px; line-height: 1.3; }
.bc-part { display: grid; grid-template-columns: 12px 1fr auto 3.5em; align-items: center; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--rule); }
.bc-part-key { width: 12px; height: 12px; border-radius: 2px; }
.bc-part-label { color: var(--ink); }
.bc-part-value { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.bc-part-share { color: var(--ink-muted); font-variant-numeric: tabular-nums; text-align: right; }
.bc-chart .bc-center-num { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.01em; fill: var(--ink); }
.bc-chart .bc-center-label { font-size: 12px; fill: var(--ink-muted); }
.bc-chart .bc-grouplabel { font-size: 12px; font-weight: 600; fill: var(--ink); }
.bc-conn { fill: var(--chart-track); }
.bc-conn.is-focus { fill: var(--chart-focus); fill-opacity: 0.35; }
.bc-whisker { stroke-width: 1.5; }
.bc-median { stroke: var(--surface); stroke-width: 2; }
.bc-pt { fill: var(--ink-muted); fill-opacity: 0.45; }
.bc-bubble { stroke-width: 1.5; }
.bc-size-ring { fill: none; stroke: var(--ink-muted); stroke-width: 1; }
.bc-size-key svg { display: block; }
.bc-legend-key.dotted { width: 16px; height: 0; border-radius: 0; border-top: 2px dotted currentColor; background: none; }
.bc-legend-key.tick { width: 2px; height: 14px; border-radius: 0; }
/* Charts, wave 2: flows and text */
.bc-flow { fill: none; stroke-opacity: 0.42; }
.bc-mark:hover .bc-flow { stroke-opacity: 0.7; }
.bc-ribbon { fill-opacity: 0.55; stroke: var(--surface); stroke-width: 0.75; }
.bc-mark:hover .bc-ribbon { fill-opacity: 0.8; }
.bc-chart .bc-eyebrow-svg { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-muted); }
.bc-chart .bc-word { font-weight: 500; fill: var(--ink); }
.bc-chart .bc-word.is-strong { font-weight: 700; fill: var(--ink); }
.bc-chart .bc-word.is-muted { fill: var(--ink-muted); }
/* Diagrams: flow chart, swimlane, PERT, systems */
.bc-edge { fill: none; stroke: var(--chart-axis); stroke-width: 1.5; }
.bc-edge.is-focus { stroke: var(--chart-focus); stroke-width: 2; }
.bc-node-shape { fill: var(--surface-raised); stroke: var(--chart-axis); stroke-width: 1; }
.bc-node-shape.is-focus { fill: var(--chart-focus); stroke: var(--chart-focus); }
.bc-node-rule { stroke: var(--chart-axis); stroke-width: 1; }
.bc-node-rule.is-focus { stroke: var(--surface); stroke-opacity: 0.35; }
.bc-chart .bc-node-text { font-size: 13px; font-weight: 500; fill: var(--ink); }
.bc-chart .bc-edge-label { font-size: 12px; font-weight: 600; fill: var(--ink-muted); }
.bc-lane { fill: var(--surface); }
.bc-lane.is-alt { fill: var(--surface-raised); }
.bc-chart .bc-lane-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-muted); }
.bc-chart .bc-pert-num { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-muted); }
.bc-sys-edge { stroke: var(--ink-muted); }
.bc-chart .bc-sys-label { font-size: 14px; font-weight: 600; fill: var(--ink); }
.bc-chart .bc-polarity { font-size: 16px; font-weight: 700; fill: var(--ink); }
.bc-delay { stroke: var(--ink-muted); stroke-width: 1.5; }
.bc-delay.is-focus { stroke: var(--chart-focus); }
.bc-loop-arc { fill: none; stroke: var(--ink-muted); stroke-width: 1.5; }
.bc-loop.is-focus .bc-loop-arc { stroke: var(--chart-focus); stroke-width: 2; }
.bc-chart .bc-loop-id { font-size: 13px; font-weight: 700; fill: var(--ink); }
.bc-chart .bc-loop-label { font-size: 12px; fill: var(--ink-muted); }
.bc-hitline { fill: none; }
.bc-legend-key.box { background: var(--surface-raised) !important; border: 1px solid var(--chart-axis); box-sizing: border-box; }
/* Maps */
.bc-region { fill: var(--map-land); stroke: var(--surface); stroke-width: 0.75; stroke-linejoin: round; }
.bc-region-focus { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.bc-mapdot { stroke-width: 1; }
.bc-flowline { fill: none; stroke: var(--chart-focus); stroke-opacity: 0.7; stroke-linecap: round; }
.bc-flowline.is-context { stroke: var(--chart-context); stroke-opacity: 0.35; }
.bc-mark:hover .bc-flowline { stroke-opacity: 1; }
.bc-origin { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.bc-isoband { stroke: none; }
.bc-isoline { fill: none; stroke: var(--surface); stroke-width: 0.75; stroke-opacity: 0.8; }
.bc-samplept { fill: var(--ink); stroke: var(--surface); stroke-width: 1; }
.bc-border-only { fill: none; stroke: var(--surface); stroke-width: 0.75; pointer-events: none; }
.bc-steplegend { position: relative; display: inline-flex; flex-direction: column; padding-bottom: 14px; }
.bc-steplegend-row { display: inline-flex; gap: 2px; }
.bc-steplegend-row span { width: 28px; height: 10px; }
.bc-steplegend-lab { position: absolute; bottom: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; line-height: 1; color: var(--ink-muted); white-space: nowrap; }
.bc-flowhead { fill: var(--chart-focus); }
.bc-chart .bc-isolabel { font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
.bc-basemap .bc-region { fill: var(--map-land); }
.bc-chart-plot svg.bc-map { overflow: hidden; }
/* Forms (SingletonBrandSystems.form.*): research and intake. Selected states use accent-ink: green on black, black on white. */
.bf-q, .bf-survey, .bf-interview { color-scheme: dark; }
[data-theme="light"] .bf-q, [data-theme="light"] .bf-survey, [data-theme="light"] .bf-interview { color-scheme: light; }
.bf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bf-q { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); container-type: inline-size; color: var(--ink); font-family: var(--font-sans); }
.bf-q[hidden] { display: none; }
.bf-q-head { display: flex; flex-direction: column; gap: var(--space-1); padding: 0; margin: 0 0 var(--space-1); }
legend.bf-q-head { margin-bottom: var(--space-3); }
.bf-label { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.bf-label.bf-sub { font-size: 14px; }
.bf-optional { font-weight: 400; color: var(--ink-muted); }
.bf-hint { font-size: 14px; line-height: 1.4; color: var(--ink-muted); margin: 0; }
.bf-error { display: flex; gap: var(--space-2); align-items: center; margin: 0; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--danger); }
.bf-error[hidden] { display: none; }
.bf-error-icon { display: inline-flex; font-size: 18px; }
.bf-q.is-invalid { padding-left: var(--space-4); border-left: 2px solid var(--danger); }
.bf-input { width: 100%; max-width: 560px; box-sizing: border-box; min-height: 48px; font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); appearance: none; }
textarea.bf-input { min-height: 120px; resize: vertical; }
.bf-input::placeholder { color: var(--ink-muted); }
.bf-input:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-color: var(--ink); }
.is-invalid .bf-input { border-color: var(--danger); }
.bf-input-wrap { display: flex; align-items: stretch; max-width: 560px; }
.bf-input-wrap .bf-input { flex: 1; min-width: 0; }
.bf-input-wrap.has-affix .bf-input, .bf-q-number .bf-input { max-width: 200px; }
.bf-q-number .bf-input-wrap, .bf-q-date .bf-input, .bf-q-time .bf-input { max-width: 240px; }
.bf-affix { display: flex; align-items: center; padding: 0 var(--space-3); font-size: 16px; color: var(--ink-muted); background: var(--surface-raised); border: 1px solid var(--control-border); }
.bf-affix:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.bf-affix:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.bf-count { font-size: 13px; color: var(--ink-muted); }
.bf-select { position: relative; max-width: 560px; display: flex; }
.bf-select .bf-input { padding-right: var(--space-12); }
.bf-select-icon { position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); display: inline-flex; font-size: 16px; color: var(--ink-muted); pointer-events: none; }
.bf-small { height: 40px; padding: 0 var(--space-4); font-size: 14px; }
/* choices */
.bf-options { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; }
.bf-options.is-inline { flex-direction: row; flex-wrap: wrap; }
.bf-options.is-inline .bf-option { flex: 1 1 140px; }
.bf-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
.bf-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
.bf-option { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); min-height: 48px; box-sizing: border-box; padding: var(--space-3) var(--space-4); font-size: 16px; line-height: 1.4; color: var(--ink); border: 1px solid var(--control-border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.bf-option input, .bf-seg-opt input, .bf-matrix-cell input, .bf-sem-cell input, .bf-md-cell input, .bf-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bf-option:hover { border-color: var(--ink); }
.bf-option:has(input:focus-visible), .bf-seg-opt:has(input:focus-visible), .bf-matrix-cell:has(input:focus-visible), .bf-sem-cell:has(input:focus-visible), .bf-md-cell:has(input:focus-visible), .bf-toggle:has(input:focus-visible) .bf-toggle-track, .bf-drop:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.bf-option.is-checked { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); background: var(--surface-tint); }
.bf-mark { flex: none; box-sizing: border-box; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--control-border); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--surface); background: var(--surface); }
.bf-mark.is-box { border-radius: 4px; }
.bf-mark .bc-icon { opacity: 0; }
.is-checked > .bf-mark, .is-checked .bf-mark { border-color: var(--accent-ink); background: var(--accent-ink); }
.is-checked .bf-mark .bc-icon { opacity: 1; }
.is-checked .bf-mark:not(.is-box)::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); }
.bf-option-text { display: flex; flex-direction: column; gap: 2px; }
.bf-option-desc { font-size: 14px; color: var(--ink-muted); }
.bf-other { margin-top: calc(-1 * var(--space-1)); }
.bf-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); max-width: none; }
.bf-option.has-image { flex-direction: column; padding: var(--space-2) var(--space-2) var(--space-3); gap: var(--space-2); }
.bf-option-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.bf-q-preference .bf-images { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 760px; }
.bf-q .bc-btn:disabled { opacity: 0.4; cursor: default; }
.has-image .bf-mark { position: absolute; top: var(--space-3); right: var(--space-3); margin: 0; }
.has-image .bf-option-text { padding: 0 var(--space-2); }
/* scales */
.bf-seg { position: relative; display: flex; flex-wrap: wrap; gap: 4px; max-width: 760px; }
.bf-seg-opt { position: relative; flex: 1 1 0; min-width: 40px; min-height: 48px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: var(--space-2); font-size: 14px; line-height: 1.25; text-align: center; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); cursor: pointer; }
.bf-seg-opt:hover { border-color: var(--ink); }
.bf-seg-opt.is-checked { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--surface); font-weight: 600; }
.bf-numbers .bf-seg-opt { font-family: var(--font-mono); font-size: 15px; }
.bf-seg-ends { display: flex; justify-content: space-between; gap: var(--space-4); max-width: 760px; font-size: 13px; line-height: 1.3; color: var(--ink-muted); }
@container (max-width: 520px) { .bf-likert { flex-direction: column; } .bf-likert .bf-seg-opt { justify-content: flex-start; text-align: left; padding: var(--space-3) var(--space-4); } .bf-nps .bf-seg-opt { flex: 1 1 calc(16.66% - 4px); } }
.bf-slider { display: flex; align-items: center; gap: var(--space-4); max-width: 760px; }
.bf-slider input { flex: 1; min-width: 0; height: 32px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.bf-slider input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--control-border); }
.bf-slider input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--control-border); }
.bf-slider input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: var(--accent-ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent-ink); }
.bf-slider input::-moz-range-thumb { box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent-ink); }
.bf-slider.is-untouched input::-webkit-slider-thumb { opacity: 0; }
.bf-slider.is-untouched input::-moz-range-thumb { opacity: 0; }
.bf-slider input:focus-visible { outline: 2px solid transparent; }
.bf-slider input:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.bf-slider input:focus-visible::-moz-range-thumb { box-shadow: var(--focus-ring); }
.bf-slider.is-untouched input:focus-visible { box-shadow: var(--focus-ring); border-radius: 4px; }
.bf-slider-out { min-width: 9em; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-slider.is-untouched .bf-slider-out { font-weight: 400; color: var(--ink-muted); }
/* matrix */
.bf-matrix { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(var(--n), minmax(0, 1fr)); max-width: 900px; }
.bf-matrix-head, .bf-matrix-row, .bf-matrix-opts { display: contents; }
.bf-matrix-head span { padding: 0 var(--space-1) var(--space-2); font-size: 12px; line-height: 1.25; text-align: center; color: var(--ink-muted); border-bottom: 1px solid var(--chart-axis); display: flex; align-items: flex-end; justify-content: center; }
.bf-matrix-label { padding: var(--space-3) var(--space-3) var(--space-3) 0; font-size: 15px; line-height: 1.35; border-bottom: 1px solid var(--rule); }
.bf-matrix-cell { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.bf-matrix-cell::before { content: ""; flex: none; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--control-border); background: var(--surface); }
.bf-matrix-cell:hover::before { border-color: var(--ink); }
.bf-matrix-cell.is-checked::before { border: 6px solid var(--accent-ink); }
.bf-matrix-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@container (max-width: 560px) {
  .bf-matrix { display: flex; flex-direction: column; gap: var(--space-5, 20px); }
  .bf-matrix-head { display: none; }
  .bf-matrix-row { display: flex; flex-direction: column; gap: var(--space-2); }
  .bf-matrix-label { border: 0; padding: 0; font-weight: 600; }
  .bf-matrix-opts { display: flex; flex-direction: column; gap: 4px; }
  .bf-matrix-cell { justify-content: flex-start; gap: var(--space-3); padding: 0 var(--space-4); border: 1px solid var(--control-border); border-radius: var(--radius-sm); }
  .bf-matrix-cell.is-checked { border-color: var(--accent-ink); background: var(--surface-tint); }
  .bf-matrix-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 15px; }
}
/* semantic differential */
.bf-semantic { display: flex; flex-direction: column; gap: var(--space-3); max-width: 760px; }
.bf-sem-row { display: grid; grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr); align-items: center; gap: var(--space-3); font-size: 15px; }
.bf-sem-l { text-align: right; }
.bf-sem-opts { display: flex; gap: 4px; }
.bf-sem-cell { position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; }
.bf-sem-dot { box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--control-border); background: var(--surface); }
.bf-sem-cell:hover .bf-sem-dot { border-color: var(--ink); }
.bf-sem-cell.is-checked .bf-sem-dot { width: 22px; height: 22px; border-color: var(--accent-ink); background: var(--accent-ink); }
@container (max-width: 480px) { .bf-sem-row { grid-template-columns: 1fr 1fr; } .bf-sem-l { text-align: left; grid-row: 1; } .bf-sem-r { text-align: right; grid-row: 1; grid-column: 2; } .bf-sem-opts { grid-column: 1 / 3; grid-row: 2; justify-content: space-between; } }
/* allocation and dot voting */
.bf-allocate { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; }
.bf-alloc-row { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: var(--space-3); }
.bf-allocate.is-dots .bf-alloc-row { grid-template-columns: minmax(120px, 1fr) 36px 28px 36px minmax(80px, 1.2fr); }
.bf-alloc-label { font-size: 15px; }
.bf-alloc-count { text-align: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bf-alloc-total { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.bf-alloc-total.is-over { color: var(--danger); }
.bf-step { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); cursor: pointer; }
.bf-step:disabled { opacity: 0.35; cursor: default; }
.bf-step:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.bf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink); }
/* ranking */
.bf-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.bf-rank-item { display: grid; grid-template-columns: 28px 1fr 36px 36px; align-items: center; gap: var(--space-2); padding: 6px 6px 6px var(--space-3); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--radius-sm); cursor: grab; font-size: 15px; }
.bf-rank-item.is-dragging { opacity: 0.4; }
.bf-rank-n { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.bf-rank-confirm { display: flex; gap: var(--space-2); align-items: center; font-size: 14px; color: var(--ink-muted); cursor: pointer; }
.bf-rank-confirm input { accent-color: var(--accent-ink); width: 16px; height: 16px; }
/* MaxDiff */
.bf-maxdiff { display: grid; grid-template-columns: auto 1fr auto; max-width: 600px; }
.bf-md-head, .bf-md-row { display: contents; }
.bf-md-head span { padding: 0 var(--space-3) var(--space-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); border-bottom: 1px solid var(--chart-axis); text-align: center; }
.bf-md-item { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); font-size: 15px; }
.bf-md-cell { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-4); border-bottom: 1px solid var(--rule); cursor: pointer; }
.bf-md-cell .bf-mark { margin: 0; }
.bf-md-nav { display: flex; align-items: center; gap: var(--space-4); }
.bf-md-pos { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
/* card sort */
.bf-cardsort { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: var(--space-4); max-width: 900px; }
@container (max-width: 600px) { .bf-cardsort { grid-template-columns: 1fr; } }
.bf-cs-tray, .bf-cs-group { display: flex; flex-direction: column; gap: var(--space-2); min-height: 96px; padding: var(--space-3); border: 1px dashed var(--control-border); border-radius: var(--radius-sm); }
.bf-cs-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-3); align-content: start; }
.bf-cs-group.is-over { border-color: var(--accent-ink); background: var(--surface-tint); }
.bf-cs-gname { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bf-cs-list { display: flex; flex-direction: column; gap: 6px; }
.bf-cs-card { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); font-size: 14px; background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: grab; }
.bf-cs-move { align-self: flex-start; max-width: 100%; padding: 0; font-family: var(--font-sans); font-size: 12px; color: var(--ink-muted); background: transparent; border: 0; cursor: pointer; }
.bf-cs-move:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-cs-add { grid-column: 1 / -1; display: flex; gap: var(--space-2); align-items: center; }
.bf-cs-add .bf-input { max-width: 260px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
/* price and Kano */
.bf-price { display: flex; flex-direction: column; gap: var(--space-4); max-width: 640px; }
.bf-price-row { display: flex; flex-direction: column; gap: var(--space-2); }
.bf-price-label { font-size: 15px; line-height: 1.4; }
.bf-kano { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; }
.bf-kano-feature { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.bf-kano-name { font-weight: 700; font-size: 16px; }
.bf-kano-q { display: flex; flex-direction: column; gap: var(--space-2); }
.bf-kano-prompt { font-size: 14px; color: var(--ink-muted); }
/* click heatmap and pins */
.bf-heat { position: relative; max-width: 760px; line-height: 0; border: 1px solid var(--rule); cursor: crosshair; user-select: none; -webkit-user-select: none; }
.bf-heat:focus { outline: none; }
.bf-heat:focus-visible { box-shadow: var(--focus-ring); }
.bf-heat-img { display: block; width: 100%; height: auto; }
.bf-heat-layer { position: absolute; inset: 0; }
.bf-heat-pin { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--font-sans); color: var(--surface); background: var(--accent-ink); border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); cursor: pointer; }
.bf-heat-cursor { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 2px solid var(--focus); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.bf-heat:not(:focus-visible) .bf-heat-cursor { display: none; }
.bf-heat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); max-width: 560px; }
.bf-heat-item { display: flex; flex-direction: column; gap: var(--space-1); }
/* text highlighter */
.bf-hl-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); font-size: 14px; }
.bf-hl-keyitem { display: inline-flex; align-items: center; gap: var(--space-2); }
.bf-hl-swatch { width: 16px; height: 4px; border-radius: 2px; }
.bf-hl-swatch.is-positive { background: var(--div-pos-3); }
.bf-hl-swatch.is-negative { background: var(--div-neg-3); }
.bf-hl-text { max-width: 680px; font-size: 18px; line-height: 1.9; }
.bf-hl-seg { font: inherit; line-height: 1.5; color: var(--ink); background: none; border: 0; border-bottom: 2px dashed var(--control-border); padding: 1px 0; margin: 0; text-align: left; cursor: pointer; }
.bf-hl-seg:hover { border-bottom-color: var(--ink); }
.bf-hl-seg:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-hl-seg.is-positive { background: color-mix(in srgb, var(--div-pos-1) 45%, transparent); border-bottom: 3px solid var(--div-pos-3); }
.bf-hl-seg.is-negative { background: color-mix(in srgb, var(--div-neg-1) 45%, transparent); border-bottom: 3px solid var(--div-neg-3); }
/* 2x2 placement */
.bf-quad-wrap { max-width: 520px; padding: 24px 0; }
.bf-quad { position: relative; aspect-ratio: 1; border: 1px solid var(--chart-axis); background: linear-gradient(var(--chart-grid), var(--chart-grid)) center / 1px 100% no-repeat, linear-gradient(var(--chart-grid), var(--chart-grid)) center / 100% 1px no-repeat; }
.bf-quad-ax { position: absolute; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.bf-quad-ax.is-top { top: -20px; left: 50%; transform: translateX(-50%); }
.bf-quad-ax.is-bottom { bottom: -20px; left: 50%; transform: translateX(-50%); }
.bf-quad-ax.is-left { left: 6px; top: 50%; transform: translateY(-140%); }
.bf-quad-ax.is-right { right: 6px; top: 50%; transform: translateY(-140%); }
.bf-quad-label { position: absolute; font-size: 12px; color: var(--ink-muted); }
.bf-quad-label.q0 { top: 8px; left: 8px; } .bf-quad-label.q1 { top: 8px; right: 8px; } .bf-quad-label.q2 { bottom: 8px; left: 8px; } .bf-quad-label.q3 { bottom: 8px; right: 8px; }
.bf-quad-tray { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; max-width: 520px; }
.bf-quad-tray .bf-hint { flex-basis: 100%; }
.bf-chip { padding: 6px 12px; font: 600 13px/1.2 var(--font-sans); color: var(--ink); background: var(--surface-raised); border: 1px solid var(--control-border); border-radius: 999px; cursor: grab; touch-action: none; white-space: nowrap; }
.bf-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-chip.is-placed { position: absolute; transform: translate(-50%, -50%); color: var(--surface); background: var(--accent-ink); border-color: var(--accent-ink); z-index: 1; }
/* upload, record, signature */
.bf-drop { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); max-width: 560px; box-sizing: border-box; padding: var(--space-8) var(--space-6); text-align: center; border: 1.5px dashed var(--control-border); border-radius: var(--radius-sm); cursor: pointer; }
.bf-drop:hover, .bf-drop.is-over { border-color: var(--accent-ink); background: var(--surface-tint); }
.bf-drop-icon { display: inline-flex; font-size: 24px; transform: rotate(-45deg); }
.bf-drop-title { font-weight: 600; font-size: 16px; }
.bf-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; }
.bf-file { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.bf-file-thumb, .bf-file-ext { flex: none; width: 40px; height: 40px; border-radius: 2px; object-fit: cover; }
.bf-file-ext { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); background: var(--surface-raised); }
.bf-file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bf-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.bf-record { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-3); max-width: 560px; padding: var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.bf-rec-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.bf-rec-time { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.is-recording .bf-rec-time { color: var(--ink); }
.is-recording .bf-rec-time::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--status-critical); }
.bf-rec-media { display: block; width: 100%; }
.bf-rec-alt { align-self: flex-start; cursor: pointer; }
.bf-sign { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; }
.bf-sign-pad { display: block; width: 100%; height: 140px; box-sizing: border-box; background: var(--surface) linear-gradient(var(--rule), var(--rule)) 16px 75% / calc(100% - 32px) 1px no-repeat; border: 1px solid var(--control-border); border-radius: var(--radius-sm); touch-action: none; cursor: crosshair; }
.bf-sign-row { display: flex; justify-content: flex-end; }
/* availability */
.bf-avail { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(40px, 1fr)); gap: 3px; max-width: 640px; user-select: none; -webkit-user-select: none; }
.bf-avail-day { display: flex; flex-direction: column; align-items: center; padding-bottom: 4px; font-size: 13px; font-weight: 600; }
.bf-avail-date { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.bf-avail-time { display: flex; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.bf-avail-cell { height: 32px; padding: 0; background: var(--surface); border: 1px solid var(--control-border); border-radius: 2px; cursor: pointer; }
.bf-avail-cell:hover { border-color: var(--ink); }
.bf-avail-cell:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-avail-cell.is-on { background: var(--accent-ink); border-color: var(--accent-ink); }
/* consent, groups, composites, toggle */
.bf-consent-text { box-sizing: border-box; max-width: 560px; padding: var(--space-4); font-size: 15px; line-height: 1.5; background: var(--surface-raised); border-left: 2px solid var(--chart-axis); }
.bf-consent-text p { margin: 0 0 var(--space-2); } .bf-consent-text p:last-child { margin: 0; }
.bf-link { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; font-size: 15px; align-self: flex-start; }
.bf-group { display: flex; flex-direction: column; gap: var(--space-3); max-width: 640px; }
.bf-q > .bc-btn, .bf-group > .bc-btn { align-self: flex-start; }
.bf-group-row { box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.bf-group-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.bf-group-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bf-group-field, .bf-composite-field { display: flex; flex-direction: column; gap: var(--space-1); }
.bf-composite { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); max-width: 560px; }
.bf-composite-field { flex: 1 1 200px; }
.bf-composite-field.is-wide { flex-basis: 100%; }
.bf-toggle { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); font-size: 16px; cursor: pointer; }
.bf-toggle-track { position: relative; width: 44px; height: 24px; box-sizing: border-box; border-radius: 12px; background: var(--chart-track); border: 1px solid var(--control-border); }
.bf-toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-muted); transition: transform 0.15s; }
.bf-toggle input:checked + .bf-toggle-track { background: var(--accent-ink); border-color: var(--accent-ink); }
.bf-toggle input:checked + .bf-toggle-track::after { transform: translateX(20px); background: var(--surface); }
.bf-info { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--ink); }
/* survey shell */
.bf-survey { display: flex; flex-direction: column; gap: var(--space-6); max-width: 760px; color: var(--ink); font-family: var(--font-sans); }
.bf-survey-head { display: flex; flex-direction: column; gap: var(--space-3); }
.bf-progress[hidden] { display: none; }
.bf-progress { display: flex; align-items: center; gap: var(--space-4); }
.bf-progress-bar { flex: 1; height: 4px; border-radius: 2px; overflow: hidden; background: var(--chart-track); }
.bf-progress-bar span { display: block; height: 100%; width: 0; background: var(--accent-ink); transition: width 0.3s; }
.bf-progress-text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.bf-page { display: flex; flex-direction: column; gap: var(--space-8); margin: 0; }
.bf-page-title { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.bf-page-title:focus { outline: none; }
.bf-page-desc { margin: calc(-1 * var(--space-6)) 0 0; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--ink-muted); }
.bf-nav { display: flex; gap: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--rule); }
.bf-nav[hidden], .bf-nav .bc-btn[hidden] { display: none; }
.bf-nav .bc-btn-primary { margin-left: auto; }
.bf-banner { padding: var(--space-4); font-size: 15px; line-height: 1.5; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.bf-banner[hidden] { display: none; }
.bf-banner:focus { outline: none; }
.bf-errsum { border: 2px solid var(--danger); }
.bf-errsum-title { margin: 0 0 var(--space-2); font-weight: 700; }
.bf-errsum ul { margin: 0; padding-left: var(--space-6); }
.bf-errsum a { color: var(--danger); font-weight: 600; }
.bf-resume { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); background: var(--surface-tint); border-color: transparent; }
.bf-review { margin: 0; display: flex; flex-direction: column; }
.bf-review-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.bf-review dt { font-weight: 600; }
.bf-review dd { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.bf-done { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-6) 0; }
.bf-done .bf-page-desc { margin: 0; }
.bf-done-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--surface); background: var(--accent-ink); border-radius: 50%; }
.bf-survey-foot { margin: 0; }
/* interview console */
.bf-interview { display: flex; flex-direction: column; gap: var(--space-6); max-width: 880px; color: var(--ink); font-family: var(--font-sans); }
.bf-iv-head { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-4); padding: var(--space-3) 0; background: var(--surface); border-bottom: 1px solid var(--rule); }
.bf-iv-title { display: flex; flex-direction: column; gap: var(--space-1); }
.bf-iv-title .bf-page-title { font-size: 28px; }
.bf-iv-clock { display: flex; align-items: center; gap: var(--space-3); }
.bf-iv-time { min-width: 4ch; font-family: var(--font-mono); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-iv-participant { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); }
.bf-iv-participant .bf-composite-field { flex: 1 1 180px; }
.bf-iv-consent { max-width: 560px; }
.bf-iv-section { display: flex; flex-direction: column; gap: var(--space-3); }
.bf-iv-shead { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--chart-axis); }
.bf-iv-stitle { margin: 0; font-size: 18px; font-weight: 700; }
.bf-iv-q { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--surface-raised); border-radius: var(--radius-sm); }
.bf-iv-qhead { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.bf-iv-prompt { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.bf-iv-probes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bf-iv-probe { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; color: var(--ink-muted); cursor: pointer; }
.bf-iv-probe input { width: 16px; height: 16px; accent-color: var(--accent-ink); }
.bf-iv-notes { min-height: 72px; max-width: none; }
.bf-iv-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-chip-toggle, .bf-iv-star { flex: none; padding: 4px 10px; font: 500 13px/1.3 var(--font-sans); color: var(--ink); background: transparent; border: 1px solid var(--control-border); border-radius: 999px; cursor: pointer; }
.bf-chip-toggle[aria-pressed="true"], .bf-iv-star[aria-pressed="true"] { color: var(--surface); background: var(--accent-ink); border-color: var(--accent-ink); }
.bf-chip-toggle:focus-visible, .bf-iv-star:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bf-iv-quote { display: flex; gap: var(--space-2); align-items: center; }
.bf-iv-quote .bf-input { max-width: none; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.bf-iv-quotes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bf-iv-quotes li { display: flex; align-items: baseline; gap: var(--space-3); font-size: 14px; }
.bf-iv-qt { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.bf-iv-qtext { flex: 1; }
.bf-iv-export { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
/* click heatmap results (chart) */
.bc-clickscrim { fill: var(--surface); fill-opacity: 0.5; pointer-events: none; }
.bc-clickband { fill-opacity: 0.8; stroke: none; pointer-events: none; }
.bc-clickpt { fill: var(--ink); fill-opacity: 0.55; pointer-events: none; }
.bc-aoi { fill: transparent; stroke: var(--ink); stroke-width: 1.5; }
.bc-aoi-tag { fill: var(--ink); pointer-events: none; }
.bc-aoi-tagtext { font-family: var(--font-mono); font-size: 12px; font-weight: 600; fill: var(--surface); pointer-events: none; }
.bc-aoi-key { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-size: 14px; color: var(--ink); }
.bc-aoi-key li { display: flex; align-items: center; gap: var(--space-2); }
.bc-aoi-n { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; font: 600 12px/1 var(--font-mono); color: var(--surface); background: var(--ink); }
.bc-aoi-share { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Phones and narrow columns. Charts add .bc-chart-narrow when their box is under 520px; forms answer to their own width through container queries; layout pieces follow the viewport. */
.bc-chart-narrow .bc-chart-foot { flex-direction: column; align-items: stretch; gap: var(--space-1); }
.bc-chart-narrow .bc-chart-actions { gap: var(--space-6); }
.bc-chart-narrow .bc-chart-q { flex-direction: column; gap: 2px; }
.bc-chart-narrow .bc-chart-qlabel { line-height: 16px; }
.bc-chart-narrow .bc-legend-item { min-height: 24px; }

/* Wide diagrams keep readable text and scroll sideways instead of shrinking */
.bc-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.bc-scroll:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bc-scroll.is-scroll-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.bc-scroll.is-scroll-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.bc-scroll.is-scroll-l.is-scroll-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.bc-scroll-hint { display: flex; align-items: center; gap: var(--space-2); margin-top: calc(var(--space-2) * -1); font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bc-scroll-hint[hidden] { display: none; }
.bc-scroll-hint .bc-icon { font-size: 16px; }

/* Touch targets: 44px tall on phones and touch screens */
@media (max-width: 600px), (pointer: coarse) {
  .bc-btn-text { min-height: 44px; }
  .bf-chip-toggle, .bf-iv-star { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .bf-iv-codes { gap: var(--space-2); }
  .bf-iv-probe, .bf-rank-confirm { min-height: 44px; }
  .bf-iv-probe input, .bf-rank-confirm input { width: 20px; height: 20px; }
  .bf-iv-probes { gap: 0; }
  .bf-cs-move { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 36px; margin-top: var(--space-1); padding: 0 var(--space-3); font-size: 14px; color: var(--ink); border: 1px solid var(--control-border); border-radius: var(--radius-sm); }
  .bf-step { width: 44px; height: 44px; }
  .bf-avail-cell { height: 40px; }
  .bf-toggle { min-height: 44px; }
  .bf-link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Dot voting: the spent dots drop under the row when the question is narrow */
@container (max-width: 480px) {
  .bf-allocate.is-dots .bf-alloc-row { grid-template-columns: 1fr 44px 28px 44px; row-gap: var(--space-2); }
  .bf-allocate.is-dots .bf-dots { grid-column: 1 / -1; }
  .bf-allocate.is-dots .bf-dots:empty { display: none; }
  .bf-alloc-row { grid-template-columns: 1fr 104px; }
  .bf-avail { grid-template-columns: 44px repeat(var(--n), minmax(36px, 1fr)); }
}

/* Nav: links fold into a menu button; the open menu pushes the page down */
@media (max-width: 720px) {
  .bc-nav { padding: 0 var(--space-6); gap: var(--space-4); }
  .bc-nav .bc-nav-links, .bc-nav .bc-nav-right .bc-btn { display: none; }
  .bc-nav .bc-nav-menu { display: inline-flex; }
  .bc-nav.is-open { flex-wrap: wrap; height: auto; padding-bottom: var(--space-6); }
  .bc-nav.is-open .bc-nav-right { display: contents; }
  .bc-nav.is-open .bc-wordmark { order: 1; height: 72px; }
  .bc-nav.is-open .bc-nav-menu { order: 2; }
  .bc-nav.is-open .bc-nav-links { order: 3; display: flex; flex-direction: column; flex-basis: 100%; gap: 0; border-top: 1px solid var(--rule); }
  .bc-nav.is-open .bc-nav-links a { display: flex; align-items: center; min-height: 52px; font-size: 18px; border-bottom: 1px solid var(--rule); }
  .bc-nav.is-open .bc-nav-right .bc-btn { order: 4; display: inline-flex; flex-basis: 100%; justify-content: center; margin-top: var(--space-6); }
}

/* Footer: two columns, then one */
@media (max-width: 720px) {
  .bc-footer { padding: var(--space-12) var(--space-6) var(--space-8); }
  .bc-footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-6); }
  .bc-footer-top > :first-child { grid-column: 1 / -1; }
  .bc-footer ul { gap: 0; }
  .bc-footer ul a { min-height: 44px; }
  .bc-footer-base { flex-direction: column; gap: var(--space-2); margin-top: var(--space-12); }
}
@media (max-width: 360px) { .bc-footer-top { grid-template-columns: 1fr; } }

/* Case card */
@media (max-width: 600px) {
  .bc-case { max-width: none; }
  .bc-case h3 { font-size: 22px; }
  .bc-case-arrow { margin-top: var(--space-2); }
}

/* Touch: tap a mark to show its details and focus it, tap it again (or anywhere else) to clear. Drag sideways across line-type charts to scrub. */
.bc-chart-plot { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bc-chart-plot svg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.bc-chart-plot svg.bc-scrub { touch-action: pan-y; }
.bc-mark { transition: opacity 120ms ease-out; }
.bc-picking .bc-mark:not(.is-picked) { opacity: 0.3; }
.bc-picking .bc-mark.is-picked .bc-dot { stroke: var(--focus); stroke-width: 2; }
.bc-mark.is-picked .bc-bar { opacity: 1; }
.bc-mark.is-picked .bc-flow { stroke-opacity: 0.7; }
.bc-mark.is-picked .bc-ribbon { fill-opacity: 0.8; }
.bc-mark.is-picked .bc-flowline { stroke-opacity: 1; }
.bc-picking-cells .bc-cell:not(.is-active), .bc-picking-cells .bc-dot:not(.is-active), .bc-picking-cells .bc-dot-off:not(.is-active) { opacity: 0.4; }
.bc-tap-hint { display: none; align-items: center; gap: var(--space-2); margin-top: calc(var(--space-2) * -1); font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.bc-multiple .bc-tap-hint { display: none !important; }
@media (hover: none) {
  .bc-tap-hint { display: flex; }
  .bc-mark:hover .bc-bar { opacity: 1; }
  .bc-mark:hover .bc-flow { stroke-opacity: 0.42; }
  .bc-mark:hover .bc-ribbon { fill-opacity: 0.55; }
  .bc-mark:hover .bc-flowline { stroke-opacity: 0.7; }
  .bc-mark.is-picked .bc-flow { stroke-opacity: 0.7; }
  .bc-mark.is-picked .bc-ribbon { fill-opacity: 0.8; }
  .bc-mark.is-picked .bc-flowline { stroke-opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .bc-mark { transition: none; } }

/* Tables: tap or click a row to pick it out, again to let it go. Wide tables scroll sideways with the row names held in place. */
.bc-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.bc-table-scroll[hidden] { display: none; }
.bc-table tbody tr, .bc-chart-table tbody tr { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bc-table tbody tr.is-picked > *, .bc-table tbody tr.is-focus.is-picked > *, .bc-chart-table tbody tr.is-picked > * { background: var(--surface-raised); }
.bc-table tbody tr.is-picked .bc-cellbar { background: var(--chart-focus); }
@media (max-width: 600px) {
  .bc-table-scroll > table > * > tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .bc-table-scroll > .bc-chart-table > * > tr > :first-child { min-width: 132px; }
  .bc-table-scroll > .bc-table > tbody > tr.is-focus > :first-child { background: var(--surface-tint); }
  .bc-table-scroll > table > tbody > tr.is-picked.is-picked > :first-child { background: var(--surface-raised); }
  .bc-table-scroll > table > tfoot > tr > :first-child { position: static; }
}

/* ---- Textures (2026-11-21): dot field, hairline grid, dot screen. One per surface. ---- */
.bc-screen { background-image: radial-gradient(circle, var(--dot) calc(var(--dot-size) / 2), transparent calc(var(--dot-size) / 2 + 0.5px)); background-size: var(--screen-pitch) var(--screen-pitch); }
.bc-grid, .bc-grid-24, .bc-grid-12 { background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px), linear-gradient(to bottom, var(--rule) 1px, transparent 1px); background-size: var(--grid-cell) var(--grid-cell); }
.bc-grid-24 { background-size: var(--dot-pitch) var(--dot-pitch); }
.bc-grid-12 { background-size: calc(var(--dot-pitch) / 2) calc(var(--dot-pitch) / 2); }
.bc-grid-dots { background-image: radial-gradient(circle, var(--dot) calc(var(--dot-size) / 2), transparent calc(var(--dot-size) / 2 + 0.5px)), linear-gradient(to right, var(--rule) 1px, transparent 1px), linear-gradient(to bottom, var(--rule) 1px, transparent 1px); background-size: var(--dot-pitch) var(--dot-pitch), var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell); background-position: calc(var(--dot-pitch) / -2 + 0.5px) calc(var(--dot-pitch) / -2 + 0.5px), 0 0, 0 0; }
.bc-raised { background-color: var(--surface-raised); }

/* ---- Interface ---- */
.bc-tab { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-bottom-color: var(--surface); padding: var(--space-2) var(--space-3); position: relative; z-index: 1; margin-bottom: -1px; }
.bc-tab .bc-num { color: var(--accent-ink); }
.bc-tabbed { border-top: 1px solid var(--rule); padding-top: var(--space-6); }
.bc-highlight { padding: 0 0.12em; background-image: radial-gradient(circle, var(--green-64) 1px, transparent 1.5px); background-size: var(--screen-pitch) var(--screen-pitch); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-theme="light"] .bc-highlight { background-image: radial-gradient(circle, var(--green-32) 1.5px, transparent 2px); }
.bc-btn-crop { background: var(--ink); color: var(--surface); border-radius: var(--radius-0); position: relative; }
.bc-btn-crop::before { content: ""; position: absolute; inset: -6px; pointer-events: none; --c: var(--accent-ink); background:
  linear-gradient(var(--c), var(--c)) left top / 10px 1px no-repeat, linear-gradient(var(--c), var(--c)) left top / 1px 10px no-repeat,
  linear-gradient(var(--c), var(--c)) right top / 10px 1px no-repeat, linear-gradient(var(--c), var(--c)) right top / 1px 10px no-repeat,
  linear-gradient(var(--c), var(--c)) left bottom / 10px 1px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 1px 10px no-repeat,
  linear-gradient(var(--c), var(--c)) right bottom / 10px 1px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 1px 10px no-repeat; }
.bc-btn-pill { background: transparent; color: var(--ink); border-color: var(--control-border); border-radius: var(--radius-full); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; height: 44px; padding: 0 var(--space-4); }
.bc-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bc-chip { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 13px; line-height: 1.2; color: var(--ink-muted); background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); white-space: nowrap; text-decoration: none; }
.bc-chip b { font-weight: 500; color: var(--ink); }
a.bc-chip:hover { border-color: var(--control-border); }
.bc-chip:focus-visible, .bc-sticky-nav a:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.bc-sticky { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-12); }
.bc-sticky-nav { position: sticky; top: var(--space-6); align-self: start; display: flex; flex-direction: column; border-left: 1px solid var(--rule); }
.bc-sticky-nav a { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; padding: var(--space-2) var(--space-4); margin-left: -1px; border-left: 1px solid transparent; }
.bc-sticky-nav a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent-ink); }
.bc-status { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-full); padding: var(--space-1) var(--space-3); }
.bc-status::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent-ink); }
.bc-annotate { position: relative; margin: 0; }
.bc-annotate > img { display: block; width: 100%; height: auto; }
.bc-annotate-layer { position: absolute; inset: 0; pointer-events: none; }
.bc-note { position: absolute; display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 11px; line-height: 1.4; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); background: var(--black); padding: var(--space-1) var(--space-2); white-space: nowrap; }
.bc-note::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-full); border: 1px solid var(--white); }
.bc-tint { position: absolute; background: var(--green); opacity: 0.32; }
.bc-construct { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bc-construct * { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.bc-construct .a { stroke: var(--construct-magenta); }
.bc-construct .b { stroke: var(--construct-blue); }
.bc-construct text { fill: var(--construct-blue); stroke: none; font-family: var(--font-mono); font-size: 10px; }
.bc-shot-stack { position: relative; padding: var(--space-12); }
.bc-shot-float { position: absolute; right: var(--space-6); bottom: var(--space-6); width: min(44%, 320px); background: var(--surface-raised); border: 1px solid var(--control-border); border-radius: var(--radius-md); }
.bc-footer-slim .bc-footer-top { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 720px) {
  .bc-sticky { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .bc-sticky-nav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--rule); }
  .bc-sticky-nav a { margin: 0; border-left: 0; border-bottom: 1px solid transparent; white-space: nowrap; min-height: 44px; display: flex; align-items: center; }
  .bc-sticky-nav a[aria-current="true"] { border-bottom-color: var(--accent-ink); }
  .bc-shot-stack { padding: var(--space-6); }
  .bc-shot-float { position: relative; right: auto; bottom: auto; width: auto; margin: calc(var(--space-6) * -1) var(--space-4) 0; }
  .bc-footer-slim .bc-footer-top { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) { .bc-sticky-nav a { transition: color 150ms ease-out, border-color 150ms ease-out; } }
