Files
CatoandClaude cf92d01fdc feat(share): ShareRow is a grid of equal icon tiles, every target in view (#69)
On a 390px phone the sideways strip of text pills showed two and a half
choices, cut off at both edges; X, Bluesky, Hacker News, WhatsApp, Telegram
and Email were found only by scrolling. ShareRow now lays out every target
as one tile shape (icon over a short name, 44px+, equal height per row,
four to a row on a phone), the cross-post first and still the one primary.

- `text` on ShareRow/shareLinks: the words beside the link on X, Bluesky,
  WhatsApp, Telegram and the device sheet (defaults to title)
- ShareLink.name + defaultShareLinkNames; `linkNames` / `names` to translate
- crossPost.icon overrides the cross-post glyph
- 0.10.0, changelog and README updated


Claude-Session: https://claude.ai/code/session_019MDtmvT2nQyPBK4EfWf3Rn

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 02:04:42 +01:00

1590 lines
36 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @bitbaum/bip-kit/styles.css — complete neutral default theme for @bitbaum/bip-kit/react.
*
* Contract: every color, font, radius and measure is a CSS custom property.
* Consumers retheme var-by-var (light AND dark) without touching a single
* rule; the rules below never hardcode a color outside the token blocks.
*
* Dark mode: explicit `data-theme="dark"|"light"` on <html> wins; with no
* attribute, the OS preference applies. Same convention the fleet uses.
*/
/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
--bp-development-padding: clamp(1.25rem, 4vw, 3rem);
--bp-development-title: clamp(2rem, 5vw, 3.5rem);
/* Typography */
--bp-font-sans:
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--bp-font-mono:
ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
--bp-size: 1.0625rem; /* 17px mobile; bumped at 720px */
--bp-leading: 1.7;
--bp-measure: 70ch;
--bp-flow: 1.5rem; /* vertical rhythm unit */
/* The least space between the text and the edge of the SCREEN. A host column
that already pads itself by this much gets none added (see .bp-article). */
--bp-gutter: clamp(1rem, 4vw, 1.5rem);
/* Diagram labels, relative to the body text they sit in, and the smallest a
wide diagram may shrink them to before it scrolls sideways instead. */
--bp-diagram-text: 0.875em;
--bp-diagram-min-text: max(12px, 0.75em);
/* Shape */
--bp-radius: 12px;
--bp-radius-sm: 6px;
/* Core colors (light) */
--bp-bg: #fdfdfc;
--bp-surface: #f4f4f2;
--bp-fg: #1c1c1a;
/* Ink on a --bp-fg fill. Not --bp-bg: a host may set that transparent to let
its own page show through, which would erase the text. */
--bp-on-fg: #fdfdfc;
--bp-fg-muted: #5c5c58;
--bp-fg-faint: #92928c;
--bp-border: #e4e4e0;
--bp-accent: #2456d6;
--bp-accent-contrast: #ffffff;
/* Callouts */
--bp-note: #2456d6;
--bp-note-bg: #eef2fd;
--bp-tip: #157347;
--bp-tip-bg: #e9f6ef;
--bp-warn: #9a6700;
--bp-warn-bg: #fdf5e2;
--bp-danger: #c0332b;
--bp-danger-bg: #fdeeec;
/* Categorical chart palette (color-blind aware, Tableau-derived) */
--bp-chart-1: #4e79a7;
--bp-chart-2: #f28e2b;
--bp-chart-3: #59a14f;
--bp-chart-4: #e15759;
--bp-chart-5: #b07aa1;
--bp-chart-6: #76b7b2;
}
/* Public records: one responsive renderer, with all identity supplied as data. */
.bp-development {
box-sizing: border-box;
width: 100%;
max-width: calc(var(--bp-measure) + 2 * var(--bp-development-padding));
margin-inline: auto;
padding: var(--bp-development-padding);
background: var(--bp-bg);
color: var(--bp-fg);
font: var(--bp-size) / var(--bp-leading) var(--bp-font-sans);
overflow-wrap: anywhere;
}
.bp-development h1 {
font-size: var(--bp-development-title);
line-height: 1.15;
margin-block: var(--bp-flow);
}
.bp-development h2 {
font-size: 1.25em;
line-height: 1.4;
margin-block: 0 0.5em;
}
.bp-development p {
margin-block: 0.75em;
}
.bp-development a {
color: var(--bp-accent);
text-decoration: underline;
text-underline-offset: 0.2em;
}
.bp-development a:focus-visible {
outline: 2px solid var(--bp-accent);
outline-offset: 4px;
}
.bp-development nav {
display: flex;
flex-wrap: wrap;
gap: 0.5em 1.5em;
margin-block: var(--bp-flow);
}
.bp-development nav a {
display: inline-flex;
align-items: center;
min-height: 44px;
}
.bp-development nav a[aria-current="page"] {
color: var(--bp-fg);
font-weight: 700;
}
.bp-development-name {
font-weight: 700;
}
.bp-development-meta {
color: var(--bp-fg-muted);
font-size: 0.875em;
}
.bp-development-records {
list-style: none;
padding: 0;
margin-block: calc(2 * var(--bp-flow));
}
.bp-development-records > li {
border-block-start: 1px solid var(--bp-border);
padding-block: var(--bp-flow);
}
/* Typed, locally-authored roadmap and changelog documents. */
.bp-roadmap,
.bp-changelog {
color: var(--bp-fg);
font: var(--bp-size) / var(--bp-leading) var(--bp-font-sans);
overflow-wrap: anywhere;
}
.bp-roadmap-header {
margin-block-end: calc(2 * var(--bp-flow));
}
.bp-roadmap-header h2,
.bp-roadmap-header h3,
.bp-roadmap-header h4,
.bp-roadmap-bucket h3,
.bp-roadmap-bucket h4,
.bp-changelog-entry h2 {
color: var(--bp-fg);
line-height: 1.25;
margin-block: 0.5em;
}
.bp-roadmap-header h2 {
font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.bp-roadmap-header h3 {
font-size: 1.4rem;
}
.bp-roadmap-header h4 {
font-size: 1.2rem;
}
.bp-record-eyebrow,
.bp-changelog-meta {
color: var(--bp-fg-muted);
font: 0.75rem / 1.5 var(--bp-font-mono);
letter-spacing: 0.08em;
text-transform: uppercase;
}
.bp-record-lede {
max-width: var(--bp-measure);
color: var(--bp-fg-muted);
}
.bp-roadmap-bucket,
.bp-changelog-entry {
border-block-start: 1px solid var(--bp-border);
padding-block: var(--bp-flow);
}
.bp-roadmap-summary {
color: var(--bp-fg-muted);
}
.bp-roadmap-items,
.bp-roadmap-details,
.bp-changelog-items {
display: grid;
gap: 0.75em;
list-style: none;
padding: 0;
}
.bp-roadmap-items {
margin-block: 1.5em 0;
list-style: none;
}
.bp-roadmap-item {
border-inline-start: 2px solid var(--bp-border);
padding-inline-start: 1em;
}
.bp-roadmap-item h4 {
font-size: 1.1em;
}
.bp-roadmap-item p,
.bp-changelog-entry p {
margin-block: 0.5em;
}
.bp-roadmap-details {
color: var(--bp-fg-muted);
font-size: 0.9em;
list-style: none;
}
.bp-roadmap-details li::before,
.bp-changelog-items li::before {
content: "—";
margin-inline-end: 0.5em;
color: var(--bp-fg-faint);
}
.bp-record-link {
display: inline-flex;
min-height: 44px;
align-items: center;
color: var(--bp-accent);
text-underline-offset: 0.2em;
}
.bp-record-link:focus-visible {
outline: 2px solid var(--bp-accent);
outline-offset: 3px;
}
.bp-changelog {
margin: 0;
padding: 0;
}
.bp-changelog-meta {
display: flex;
flex-wrap: wrap;
gap: 0.5em 1.25em;
}
.bp-changelog-entry h2 {
font-size: clamp(1.25rem, 2vw, 1.65rem);
}
.bp-changelog-tag {
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
padding: 0.15em 0.5em;
}
.bp-changelog-items {
color: var(--bp-fg-muted);
font-size: 0.9em;
list-style: none;
}
.bp-development-records ul {
list-style: disc;
padding-inline-start: 1.25em;
}
.bp-development-records ul li + li {
margin-block-start: 0.5em;
}
.bp-development-entry {
white-space: pre-wrap;
}
.bp-development footer {
border-block-start: 1px solid var(--bp-border);
padding-block-start: var(--bp-flow);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bp-bg: #141416;
--bp-surface: #1f1f23;
--bp-fg: #ececea;
--bp-on-fg: #141416;
--bp-fg-muted: #a4a4a0;
--bp-fg-faint: #6e6e6a;
--bp-border: #2e2e32;
--bp-accent: #82a5f5;
--bp-accent-contrast: #10101c;
--bp-note: #82a5f5;
--bp-note-bg: #1b2233;
--bp-tip: #5cc98d;
--bp-tip-bg: #16281e;
--bp-warn: #d9a53f;
--bp-warn-bg: #2b2415;
--bp-danger: #ef7b74;
--bp-danger-bg: #301b19;
--bp-chart-1: #7aa5d4;
--bp-chart-2: #f5a95b;
--bp-chart-3: #7fc27a;
--bp-chart-4: #ea817f;
--bp-chart-5: #c79cc0;
--bp-chart-6: #92cdc8;
}
}
[data-theme="dark"] {
--bp-bg: #141416;
--bp-surface: #1f1f23;
--bp-fg: #ececea;
--bp-on-fg: #141416;
--bp-fg-muted: #a4a4a0;
--bp-fg-faint: #6e6e6a;
--bp-border: #2e2e32;
--bp-accent: #82a5f5;
--bp-accent-contrast: #10101c;
--bp-note: #82a5f5;
--bp-note-bg: #1b2233;
--bp-tip: #5cc98d;
--bp-tip-bg: #16281e;
--bp-warn: #d9a53f;
--bp-warn-bg: #2b2415;
--bp-danger: #ef7b74;
--bp-danger-bg: #301b19;
--bp-chart-1: #7aa5d4;
--bp-chart-2: #f5a95b;
--bp-chart-3: #7fc27a;
--bp-chart-4: #ea817f;
--bp-chart-5: #c79cc0;
--bp-chart-6: #92cdc8;
}
/* ── Article base ───────────────────────────────────────────────────── */
/* The gutter is measured to the screen edge, not added to the host's own:
(100vw - 100%) / 2 is how far a centred host column already sits from each
edge (a padding percentage is of the containing block), so a phone column
with 20px of its own padding gets no second 16px, and a host with none gets
the whole gutter at every width, including 720px to the measure, where it
used to drop to zero and the text touched the glass. content-box keeps the
measure the measure under a border-box reset. */
.bp-article {
box-sizing: content-box;
max-width: var(--bp-measure);
margin-inline: auto;
padding-inline: max(0px, calc(var(--bp-gutter) - (100vw - 100%) / 2));
font-family: var(--bp-font-sans);
font-size: var(--bp-size);
line-height: var(--bp-leading);
color: var(--bp-fg);
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
@media (min-width: 720px) {
.bp-article {
--bp-size: 1.125rem; /* 18px on wide screens */
}
}
/* ── Flow & headings ────────────────────────────────────────────────── */
.bp-p {
margin: 0 0 var(--bp-flow);
}
.bp-h2,
.bp-h3,
.bp-h4 {
font-family: var(--bp-font-sans);
color: var(--bp-fg);
line-height: 1.25;
letter-spacing: -0.015em;
text-wrap: balance;
scroll-margin-top: 5rem; /* anchored headings clear sticky headers */
}
.bp-h2 {
font-size: 1.625em;
font-weight: 700;
margin: calc(var(--bp-flow) * 2) 0 calc(var(--bp-flow) * 0.75);
}
.bp-h3 {
font-size: 1.3em;
font-weight: 650;
margin: calc(var(--bp-flow) * 1.6) 0 calc(var(--bp-flow) * 0.5);
}
.bp-h4 {
font-size: 1.1em;
font-weight: 650;
margin: calc(var(--bp-flow) * 1.3) 0 calc(var(--bp-flow) * 0.4);
}
.bp-hr {
border: 0;
border-top: 1px solid var(--bp-border);
margin: calc(var(--bp-flow) * 2) auto;
width: min(12rem, 60%);
}
/* ── Inline ─────────────────────────────────────────────────────────── */
.bp-link {
color: var(--bp-accent);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
text-decoration-color: color-mix(in srgb, var(--bp-accent) 45%, transparent);
}
.bp-link:hover {
text-decoration-color: var(--bp-accent);
}
.bp-inline-code {
font-family: var(--bp-font-mono);
font-size: 0.875em;
background: var(--bp-surface);
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
padding: 0.08em 0.35em;
}
.bp-fnref a {
color: var(--bp-accent);
text-decoration: none;
font-size: 0.8em;
padding-inline: 0.1em;
}
/* ── Lists ──────────────────────────────────────────────────────────── */
/* list-style-type is declared explicitly, and must stay declared: a CSS reset
is the normal case, not the exception. Tailwind's preflight sets
`ul, ol { list-style: none }`, so a stylesheet that only colors ::marker
styles a marker that no longer exists — every bullet and number silently
disappears, while the HTML stays byte-identical. That shipped to five sites
before a screenshot caught it; test/styles.test.js now fails if either
declaration goes missing again. */
.bp-ul {
margin: 0 0 var(--bp-flow);
padding-inline-start: 1.4em;
list-style-type: disc;
}
.bp-ol {
margin: 0 0 var(--bp-flow);
padding-inline-start: 1.4em;
list-style-type: decimal;
}
/* Nested levels: browsers vary these off the UA sheet, which the reset also
removed, so they are restated rather than inherited. */
.bp-ul .bp-ul {
list-style-type: circle;
}
.bp-ul .bp-ul .bp-ul {
list-style-type: square;
}
.bp-ol .bp-ol {
list-style-type: lower-alpha;
}
.bp-ol .bp-ol .bp-ol {
list-style-type: lower-roman;
}
/* Nested lists sit tight under their parent item rather than opening a full
flow gap. */
.bp-li > .bp-ul,
.bp-li > .bp-ol {
margin-block: 0.35em 0;
}
.bp-li {
margin-block: 0.35em;
}
.bp-ul .bp-li::marker {
color: var(--bp-fg-faint);
}
.bp-ol .bp-li::marker {
color: var(--bp-fg-muted);
font-variant-numeric: tabular-nums;
}
/* ── Quotes ─────────────────────────────────────────────────────────── */
.bp-blockquote {
margin: 0 0 var(--bp-flow);
padding: 0.25rem 0 0.25rem 1.1rem;
border-inline-start: 3px solid var(--bp-border);
color: var(--bp-fg-muted);
}
.bp-blockquote .bp-p:last-child {
margin-bottom: 0;
}
.bp-pullquote {
margin: calc(var(--bp-flow) * 1.6) 0;
padding: 0;
text-align: center;
}
.bp-pullquote-text {
margin: 0;
font-size: 1.35em;
line-height: 1.45;
font-weight: 500;
letter-spacing: -0.01em;
text-wrap: balance;
}
.bp-pullquote-text::before {
content: "“";
display: block;
font-size: 2.2em;
line-height: 0.6;
color: var(--bp-fg-faint);
margin-bottom: 0.2em;
}
.bp-pullquote-cite {
margin-top: 0.75rem;
color: var(--bp-fg-muted);
font-size: 0.85em;
}
.bp-pullquote-cite::before {
content: "— ";
}
@media (min-width: 900px) {
.bp-pullquote {
margin-inline: -3rem; /* gentle breakout on wide screens */
}
}
/* ── Figures, galleries, lightbox ───────────────────────────────────── */
.bp-figure {
margin: calc(var(--bp-flow) * 1.3) 0;
}
.bp-img {
display: block;
max-width: 100%;
height: auto;
border-radius: var(--bp-radius);
border: 1px solid var(--bp-border);
}
.bp-figcaption {
margin-top: 0.6rem;
text-align: center;
font-size: 0.85em;
color: var(--bp-fg-muted);
}
.bp-gallery {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
margin: calc(var(--bp-flow) * 1.3) 0;
}
@media (min-width: 560px) {
.bp-gallery {
grid-template-columns: repeat(2, 1fr);
}
}
.bp-gallery .bp-figure {
margin: 0;
}
.bp-lightbox-trigger {
display: block;
width: 100%;
padding: 0;
border: 0;
background: none;
cursor: zoom-in;
}
.bp-lightbox {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem 1rem;
background: color-mix(in srgb, var(--bp-bg) 20%, rgb(0 0 0 / 0.85));
cursor: zoom-out;
}
.bp-lightbox-img {
max-width: 100%;
max-height: 100%;
border-radius: var(--bp-radius-sm);
}
.bp-lightbox-close {
position: absolute;
top: 0.75rem;
right: 1rem;
border: 0;
background: none;
color: #fff;
font-size: 2rem;
line-height: 1;
cursor: pointer;
min-width: 44px;
min-height: 44px;
}
/* ── Callouts ───────────────────────────────────────────────────────── */
.bp-callout {
margin: 0 0 var(--bp-flow);
padding: 0.9rem 1.1rem;
border-radius: var(--bp-radius);
border: 1px solid var(--bp-border);
border-inline-start: 3px solid var(--bp-note);
background: var(--bp-note-bg);
}
.bp-callout-title {
margin: 0 0 0.4rem;
font-size: 0.8em;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--bp-note);
}
.bp-callout-body > :last-child,
.bp-callout-body > .bp-p:last-child {
margin-bottom: 0;
}
.bp-callout--tip {
border-inline-start-color: var(--bp-tip);
background: var(--bp-tip-bg);
}
.bp-callout--tip .bp-callout-title {
color: var(--bp-tip);
}
.bp-callout--warn {
border-inline-start-color: var(--bp-warn);
background: var(--bp-warn-bg);
}
.bp-callout--warn .bp-callout-title {
color: var(--bp-warn);
}
.bp-callout--danger {
border-inline-start-color: var(--bp-danger);
background: var(--bp-danger-bg);
}
.bp-callout--danger .bp-callout-title {
color: var(--bp-danger);
}
/* ── Code ───────────────────────────────────────────────────────────── */
.bp-codeblock {
margin: calc(var(--bp-flow) * 1.2) 0;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius);
background: var(--bp-surface);
overflow: hidden;
}
/* The toolbar row — filename label (optional) and the copy button — sits ABOVE
the code, in normal flow. It is not an overlay.
History, so nobody puts it back: the button used to be `position: absolute`
over the <pre>, and the <pre> reserved a padding-top for it. That reservation
was a magic number: it assumed the button's rendered height (30px across the
fleet's font stacks). A consumer whose accessibility CSS sets
`button { min-height: 2.75rem }` under `(pointer: coarse)` — the fleet's own
44px touch-target rule — grew the button to 44px, past the band reserved for
it, and it covered the opening line of code again (measured on loki at
390x844: button bottom at 52px, first code line at 46px). Any fixed
clearance is one consumer rule away from the same failure. In flow, layout
pays for the button's height whatever a consumer sizes it to, so code can
never sit under it. test/styles.test.js fails if .bp-copy leaves the flow. */
.bp-codeblock-toolbar {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.75rem;
padding: 0.5rem 0.5rem 0 1rem;
}
.bp-codeblock-filename {
/* Left of the button; the button keeps its place at the right edge. */
margin-inline-end: auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--bp-font-mono);
font-size: 0.75em;
color: var(--bp-fg-muted);
}
.bp-pre,
.bp-codeblock-highlighted pre {
margin: 0;
padding: 0.5rem 1rem 1rem;
overflow-x: auto;
font-family: var(--bp-font-mono);
font-size: 0.82em;
line-height: 1.6;
background: transparent !important; /* shiki inlines a bg; the frame owns it */
}
.bp-pre code,
.bp-codeblock-highlighted code {
font-family: inherit;
}
/* Shiki dual themes: tokens carry --shiki-light/--shiki-dark vars. */
.bp-codeblock-highlighted span {
color: var(--shiki-light);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .bp-codeblock-highlighted span {
color: var(--shiki-dark);
}
}
[data-theme="dark"] .bp-codeblock-highlighted span {
color: var(--shiki-dark);
}
/* Rests VISIBLE. Fading the button in on hover is an enhancement for pointers
that can hover, and it has to stay inside the query below — a touch device
never enters a hover state, so `opacity: 0` plus a `:hover` reveal pinned
the control at zero for the entire mobile web: in the DOM, in the
accessibility tree, tappable, and invisible to the person holding the
phone. Measured at 390x844 with hasTouch on live kivvi and aoz-housing
pages: computed opacity 0 on every code block, with no gesture able to
change it.
In flow, inside .bp-codeblock-toolbar — never positioned out of it (see the
toolbar comment). Fading is opacity only: an invisible button still holds
its place, so the toolbar keeps its height and nothing jumps on reveal. */
.bp-copy {
flex: none;
padding: 0.25rem 0.6rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
background: var(--bp-bg);
color: var(--bp-fg-muted);
font-family: var(--bp-font-sans);
font-size: 0.72rem;
cursor: pointer;
opacity: 1;
transition: opacity 120ms ease;
}
@media (hover: hover) and (pointer: fine) {
.bp-copy {
opacity: 0;
}
.bp-codeblock:hover .bp-copy,
.bp-copy:focus-visible,
.bp-copy[data-copied] {
opacity: 1;
}
}
.bp-copy[data-copied] {
color: var(--bp-tip);
border-color: var(--bp-tip);
}
/* ── Mermaid & math ─────────────────────────────────────────────────── */
/* A block, not a centred flex row: a flex row centres an overflowing diagram
past its own left edge, where no scrollbar can reach. The SVG centres itself
with auto margins, which fall to zero once it is wider than the box. */
.bp-mermaid {
display: block;
overflow-x: auto;
margin: calc(var(--bp-flow) * 1.2) 0;
padding: 1rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius);
background: var(--bp-surface);
}
/* MermaidBlock sets an inline min-width so the labels never shrink below
--bp-diagram-min-text; past that the box scrolls. */
.bp-mermaid svg {
display: block;
margin-inline: auto;
max-width: 100%;
height: auto;
}
.bp-mermaid:focus-visible {
outline: 2px solid var(--bp-accent);
outline-offset: 2px;
}
.bp-mermaid--fallback,
.bp-mermaid--error {
margin: 0;
font-family: var(--bp-font-mono);
font-size: 0.8em;
color: var(--bp-fg-muted);
white-space: pre;
overflow-x: auto;
}
.bp-math {
margin: calc(var(--bp-flow) * 1.2) 0;
overflow-x: auto;
}
.bp-math--display {
text-align: center;
}
.bp-math--fallback {
padding: 1rem;
border: 1px dashed var(--bp-border);
border-radius: var(--bp-radius);
background: var(--bp-surface);
font-family: var(--bp-font-mono);
font-size: 0.85em;
color: var(--bp-fg-muted);
}
/* ── Tables ─────────────────────────────────────────────────────────── */
.bp-table-wrap {
margin: calc(var(--bp-flow) * 1.2) 0;
overflow-x: auto;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius);
}
.bp-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9em;
line-height: 1.5;
}
.bp-table th,
.bp-table td {
padding: 0.6rem 0.9rem;
text-align: left;
vertical-align: top;
}
.bp-table th {
font-weight: 650;
color: var(--bp-fg-muted);
font-size: 0.85em;
letter-spacing: 0.02em;
background: var(--bp-surface);
border-bottom: 1px solid var(--bp-border);
}
.bp-table td {
border-bottom: 1px solid var(--bp-border);
}
.bp-table tbody tr:last-child td {
border-bottom: 0;
}
/* ── Stats ──────────────────────────────────────────────────────────── */
.bp-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
gap: 1rem;
margin: calc(var(--bp-flow) * 1.3) 0;
}
.bp-stat {
padding: 1rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius);
background: var(--bp-surface);
text-align: center;
}
.bp-stat-value {
margin: 0;
font-size: 1.7em;
font-weight: 700;
letter-spacing: -0.02em;
font-variant-numeric: tabular-nums;
}
.bp-stat-label {
margin-top: 0.25rem;
font-size: 0.78em;
color: var(--bp-fg-muted);
}
/* ── Charts ─────────────────────────────────────────────────────────── */
.bp-chart {
margin: calc(var(--bp-flow) * 1.3) 0;
}
.bp-chart-title {
margin-bottom: 0.6rem;
font-weight: 650;
font-size: 0.95em;
}
.bp-chart-frame {
position: relative;
}
.bp-chart-ylabel {
display: block;
margin-bottom: 0.25rem;
font-size: 0.75em;
color: var(--bp-fg-muted);
}
.bp-chart-svg {
display: block;
width: 100%;
height: auto;
}
.bp-chart-grid {
stroke: var(--bp-border);
stroke-width: 1;
}
.bp-chart-axis {
stroke: var(--bp-fg-faint);
stroke-width: 1;
}
.bp-chart-tick {
fill: var(--bp-fg-muted);
font-family: var(--bp-font-sans);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.bp-chart-legend {
display: flex;
flex-wrap: wrap;
gap: 0.4rem 1.2rem;
margin: 0.5rem 0 0;
padding: 0;
list-style: none;
font-size: 0.8em;
color: var(--bp-fg-muted);
}
.bp-chart-legend-item {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.bp-chart-swatch {
width: 0.7rem;
height: 0.7rem;
border-radius: 2px;
}
/* ── Embeds ─────────────────────────────────────────────────────────── */
.bp-embed {
margin: calc(var(--bp-flow) * 1.3) 0;
aspect-ratio: 16 / 9;
border-radius: var(--bp-radius);
overflow: hidden;
border: 1px solid var(--bp-border);
}
.bp-embed-iframe {
width: 100%;
height: 100%;
border: 0;
display: block;
}
/* ── Footnotes ──────────────────────────────────────────────────────── */
.bp-footnotes {
margin-top: calc(var(--bp-flow) * 2);
padding-top: var(--bp-flow);
border-top: 1px solid var(--bp-border);
font-size: 0.85em;
color: var(--bp-fg-muted);
}
.bp-footnotes-list {
margin: 0;
padding-inline-start: 1.4em;
/* Numbered: the number IS the footnote's identity, and the padding above
reserves room for it. Same reset caveat as .bp-ol. */
list-style-type: decimal;
}
.bp-footnote {
margin-block: 0.5em;
}
.bp-footnote:target {
color: var(--bp-fg);
}
.bp-footnote-body {
display: inline;
}
.bp-footnote-body .bp-p {
display: inline;
margin: 0;
}
.bp-fn-back {
color: var(--bp-accent);
text-decoration: none;
}
/* ── Islands: TOC & reading progress ────────────────────────────────── */
.bp-toc {
font-size: 0.85rem;
line-height: 1.5;
}
@media (min-width: 1100px) {
.bp-toc {
position: sticky;
top: 5rem;
max-height: calc(100vh - 6rem);
overflow-y: auto;
}
}
.bp-toc-title {
margin: 0 0 0.5rem;
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--bp-fg-faint);
}
.bp-toc-list {
margin: 0;
padding: 0;
list-style: none;
border-inline-start: 1px solid var(--bp-border);
}
.bp-toc-item a {
display: block;
padding: 0.25rem 0 0.25rem 0.9rem;
color: var(--bp-fg-muted);
text-decoration: none;
border-inline-start: 2px solid transparent;
margin-inline-start: -1px;
}
.bp-toc-item--l3 a {
padding-inline-start: 1.8rem;
}
.bp-toc-item--l4 a {
padding-inline-start: 2.7rem;
}
.bp-toc-item a:hover {
color: var(--bp-fg);
}
.bp-toc-item--active a {
color: var(--bp-accent);
border-inline-start-color: var(--bp-accent);
}
.bp-progress {
position: fixed;
inset-inline: 0;
top: 0;
z-index: 50;
height: 2px;
background: transparent;
pointer-events: none;
}
.bp-progress-bar {
height: 100%;
background: var(--bp-accent);
transition: width 150ms ease-out;
}
/* ── Print ──────────────────────────────────────────────────────────── */
@media print {
.bp-progress,
.bp-toc,
.bp-copy,
.bp-lightbox,
.bp-lightbox-close {
display: none !important;
}
.bp-article {
max-width: none;
padding-inline: 0;
font-size: 11pt;
}
.bp-figure,
.bp-codeblock,
.bp-callout,
.bp-stats,
.bp-chart,
.bp-table-wrap {
break-inside: avoid;
}
.bp-h2,
.bp-h3,
.bp-h4 {
break-after: avoid;
}
/* .bp-copy is display:none above. Without a filename the toolbar is then
empty, and its top padding would be a blank band on every code block on
paper — drop it, so an empty toolbar collapses to nothing. */
.bp-codeblock-toolbar {
padding-top: 0;
}
.bp-pre,
.bp-codeblock-highlighted pre {
white-space: pre-wrap;
padding-top: 1rem;
}
.bp-link[href^="http"]::after {
content: " (" attr(href) ")";
font-size: 0.8em;
color: var(--bp-fg-muted);
word-break: break-all;
}
.bp-embed {
display: none;
}
}
/* ── Feedback: stances, comments, suggestions ───────────────────────── */
.bp-feedback-stance {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.75rem;
}
.bp-feedback-stance-button,
.bp-feedback-form button,
.bp-feedback-similar button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
min-height: 44px;
padding: 0 0.9rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
background: var(--bp-bg);
color: var(--bp-fg);
font: inherit;
font-size: 0.9375rem;
cursor: pointer;
}
.bp-feedback-stance-button[aria-pressed="true"] {
border-color: var(--bp-fg);
background: var(--bp-surface);
font-weight: 600;
}
.bp-feedback-stance-button:disabled,
.bp-feedback-form button:disabled,
.bp-feedback-similar button:disabled {
cursor: default;
opacity: 0.6;
}
.bp-feedback-form button[type="submit"] {
border-color: var(--bp-accent);
background: var(--bp-accent);
color: var(--bp-accent-contrast);
}
.bp-feedback-count {
font-family: var(--bp-font-mono);
font-size: 0.8125rem;
color: var(--bp-fg-muted);
}
.bp-feedback-form button[type="submit"] .bp-feedback-count {
color: inherit;
}
.bp-feedback-thread {
margin-top: 0.75rem;
}
.bp-feedback-thread > summary {
display: inline-flex;
align-items: center;
gap: 0.5rem;
min-height: 44px;
cursor: pointer;
color: var(--bp-fg-muted);
font-size: 0.9375rem;
}
.bp-feedback-comments {
list-style: none;
margin: 0.5rem 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.bp-feedback-comments li {
padding: 0.75rem 1rem;
border-radius: var(--bp-radius-sm);
background: var(--bp-surface);
}
.bp-feedback-comments p {
margin: 0;
white-space: pre-wrap;
}
.bp-feedback-comments time,
.bp-feedback-empty {
font-size: 0.8125rem;
color: var(--bp-fg-faint);
}
.bp-feedback-form {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
margin-top: 0.5rem;
}
.bp-feedback-form textarea {
width: 100%;
box-sizing: border-box;
padding: 0.75rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
background: var(--bp-bg);
color: var(--bp-fg);
font: inherit;
/* 16px or more, or iOS zooms the page on focus. */
font-size: max(1rem, var(--bp-size));
resize: vertical;
}
.bp-feedback-suggest {
margin-top: calc(var(--bp-flow) * 2);
padding-top: var(--bp-flow);
border-top: 1px solid var(--bp-border);
}
.bp-feedback-suggest h3 {
margin: 0;
font-size: 1.125rem;
}
.bp-feedback-similar {
width: 100%;
}
.bp-feedback-similar p {
margin: 0.25rem 0;
color: var(--bp-fg-muted);
font-size: 0.9375rem;
}
.bp-feedback-similar ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.bp-feedback-similar li {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: var(--bp-radius-sm);
background: var(--bp-surface);
}
.bp-feedback-ok {
color: var(--bp-fg-muted);
}
.bp-feedback-error {
color: var(--bp-danger, var(--bp-fg));
}
/* Present for a form-filling bot, absent for a person and for assistive tech. */
.bp-feedback-trap {
position: absolute;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
}
/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.bp-faq {
max-width: var(--bp-measure);
}
.bp-faq-section + .bp-faq-section {
margin-top: calc(var(--bp-flow) * 2);
}
.bp-faq-section-title {
margin: 0 0 var(--bp-flow);
font-size: 1.35rem;
line-height: 1.3;
color: var(--bp-fg);
}
.bp-faq-item {
border-bottom: 1px solid var(--bp-border);
}
.bp-faq-item:first-of-type {
border-top: 1px solid var(--bp-border);
}
.bp-faq-question {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
padding: 1rem 0;
font-weight: 600;
color: var(--bp-fg);
cursor: pointer;
list-style: none;
}
.bp-faq-question::-webkit-details-marker {
display: none;
}
.bp-faq-question::after {
content: "+";
flex-shrink: 0;
color: var(--bp-fg-muted);
font-weight: 400;
}
.bp-faq-item[open] > .bp-faq-question::after {
content: "−";
}
.bp-faq-question:focus-visible {
outline: 2px solid var(--bp-accent);
outline-offset: 2px;
}
.bp-faq-answer {
padding-bottom: 1rem;
color: var(--bp-fg-muted);
}
.bp-faq-item:target > .bp-faq-question {
color: var(--bp-accent);
}
/* Roadmap ↔ changelog: a goal's trail, and what a change advanced. */
.bp-trail-steps {
list-style: none;
margin: 0.75rem 0 0;
padding: 0;
}
.bp-trail-steps > li {
position: relative;
display: grid;
grid-template-columns: 1.25rem minmax(0, 1fr);
column-gap: 0.5rem;
padding-bottom: 0.75rem;
scroll-margin-top: 6rem;
}
/* The line joining one milestone to the next. */
.bp-trail-steps > li:not(:last-child)::before {
content: "";
position: absolute;
left: calc(0.625rem - 1px);
top: 1.1rem;
bottom: -0.1rem;
width: 2px;
background: var(--bp-border, currentColor);
opacity: 0.35;
}
.bp-trail-mark {
width: 0.75rem;
height: 0.75rem;
margin: 0.3rem auto 0;
border-radius: 999px;
border: 2px solid currentColor;
opacity: 0.5;
}
.bp-trail-steps > li[data-done] .bp-trail-mark {
background: currentColor;
opacity: 1;
}
.bp-trail-title {
min-width: 0;
overflow-wrap: anywhere;
}
.bp-trail-cites,
.bp-advances {
grid-column: 2;
display: flex;
flex-wrap: wrap;
gap: 0.25rem 0.5rem;
font-size: 0.875em;
opacity: 0.8;
}
.bp-advances {
margin-top: 0.25rem;
}
.bp-advances-label {
font-weight: 600;
}
.bp-development-records > li,
.bp-development-entry {
scroll-margin-top: 6rem;
}
.bp-development-records > li:target,
.bp-trail-steps > li:target {
outline: 2px solid currentColor;
outline-offset: 0.25rem;
border-radius: 0.25rem;
}
/* ── Share row ──────────────────────────────────────────────────────── */
/* Every way to share in view at once: a grid of equal tiles, an icon over a
short name. One shape for every target, at least 44px, none cut off at the
edge — a sideways strip of pills hid half the services on a phone (seen at
390px on orangecat.ch, 2026-11-15). Four to a row on a phone, more on a wide
column. Lists restate list-style because consumer resets remove it anyway;
here it is "none" on purpose. */
.bp-share {
margin-block: var(--bp-flow);
}
.bp-share-note {
margin: 0.5rem 0 0;
color: var(--bp-fg-muted);
font-size: 0.875rem;
}
.bp-share-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(4.75rem, 100%), 1fr));
grid-auto-rows: 1fr;
gap: 0.5rem;
margin: 0;
padding: 0;
list-style-type: none;
}
.bp-share-list > li {
display: flex;
min-width: 0;
margin: 0;
}
.bp-share-action {
display: flex;
flex-direction: column;
align-items: center;
/* Top-aligned: icons in a row stay on one line when a name takes two. */
justify-content: flex-start;
gap: 0.375rem;
box-sizing: border-box;
width: 100%;
min-width: 44px;
min-height: 4.5rem;
padding: 0.75rem 0.25rem 0.5rem;
border: 1px solid var(--bp-border);
border-radius: var(--bp-radius-sm);
background: var(--bp-bg);
color: var(--bp-fg);
font: inherit;
font-size: 0.75rem;
line-height: 1.2;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.bp-share-icon {
display: flex;
flex: none;
width: 1.5rem;
height: 1.5rem;
}
.bp-share-icon > svg {
width: 100%;
height: 100%;
}
/* A name wraps between words (two lines at most), never mid-word. */
.bp-share-label {
display: -webkit-box;
max-width: 100%;
overflow: hidden;
overflow-wrap: normal;
word-break: normal;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-clamp: 2;
}
.bp-share-action:hover {
background: var(--bp-surface);
}
.bp-share-action:focus-visible {
outline: 2px solid var(--bp-accent);
outline-offset: 2px;
}
/* The one primary action: monochrome, inverted, no brand colour. */
.bp-share-primary {
border-color: var(--bp-fg);
background: var(--bp-fg);
color: var(--bp-on-fg);
font-weight: 600;
}
.bp-share-primary:hover {
background: var(--bp-fg);
opacity: 0.88;
}
.bp-share-action[data-copied] {
color: var(--bp-tip);
}
@media print {
.bp-share {
display: none;
}
}