/* Figure 1. The dark port. Every class is prefixed br1-. Colours follow the page's tokens when the page defines them
   (cyan: a value; magenta: a read; green: a total that holds; red: a total that moves), with the house values as fallbacks. */
.br1 {
  --x-paper: var(--br-paper, #faf8f3); --x-ink: var(--br-ink, #1d1d1b); --x-body: var(--br-body, #2a2926); --x-soft: var(--br-soft, #3c3a36);
  --x-hair: var(--br-hair, #8a8a8a); --x-c: var(--br-cyan, #009fe3); --x-c-text: var(--br-cyan-text, #0072b5);
  --x-m: var(--br-magenta, #e6007e); --x-m-text: var(--br-magenta-text, #c4006b);
  --x-ok: var(--br-holds, #0b7a3e); --x-lost: var(--br-moves, #c8401f);
  --x-rule: color-mix(in srgb, var(--x-ink) 16%, var(--x-paper));
  --x-text: var(--br-text, "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --x-display: var(--br-display, "Inter Display", "InterVariable", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif);
  --x-mono: var(--br-mono, "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace);
  margin: 0; padding: clamp(.9rem, 1.8vw, 1.25rem) clamp(.9rem, 2vw, 1.4rem); background: var(--x-paper); color: var(--x-body);
  border: 1px solid var(--x-ink); font-family: var(--x-text); font-weight: 420; line-height: 1.42;
  font-optical-sizing: auto; box-sizing: border-box; position: relative;
}
@media screen and (prefers-color-scheme: dark) {
  .br1 { --x-paper: var(--br-paper, #141413); --x-ink: var(--br-ink, #faf8f3); --x-body: var(--br-body, #e9e6df); --x-soft: var(--br-soft, #c9c5bc);
    --x-c: var(--br-cyan, #2bb3f0); --x-c-text: var(--br-cyan-text, #2bb3f0); --x-m: var(--br-magenta, #ff3d9e); --x-m-text: var(--br-magenta-text, #ff5aae);
    --x-ok: var(--br-holds, #3fb871); --x-lost: var(--br-moves, #ff6a3d); }
}
.br1 *, .br1 *::before, .br1 *::after { box-sizing: border-box; }
.br1-label { margin: 0; font: 700 .7rem/1.3 var(--x-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--x-soft); }
.br1-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline;
  padding-bottom: .6rem; margin-bottom: .8rem; border-bottom: 1px solid var(--x-rule); }
.br1-head .br1-live { color: var(--x-ink); }
.br1-live::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; background: var(--x-c); vertical-align: .05rem; }
.br1-lede { margin: 0 0 .8rem; max-width: 52rem; font-size: 1.05rem; font-weight: 450; line-height: 1.32; color: var(--x-ink); }
/* desktop: the drawing on the left with its controls under it; the number, the reads and the sentence on the right */
.br1-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); column-gap: clamp(1rem, 2.4vw, 2rem); row-gap: .55rem;
  grid-template-areas: "stage must" "stage reads" "ctl words"; align-items: start; }
.br1-must { grid-area: must; display: flex; align-items: flex-end; gap: .9rem; }
.br1-stage { grid-area: stage; min-width: 0; }
.br1-ctl { grid-area: ctl; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .2rem .9rem; align-items: end; }
.br1-reads { grid-area: reads; min-width: 0; }
.br1-words { grid-area: words; margin: 0; font-size: .9rem; line-height: 1.38; color: var(--x-ink); }
.br1-svg { display: block; width: 100%; overflow: visible; }
.br1-rb { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .15rem 1.1rem; align-items: center; margin-top: .25rem; }
.br1-rbl { grid-column: 1 / -1; }
.br1-rbl { font: 700 .58rem/1.2 var(--x-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--x-m-text); white-space: nowrap; }
.br1-rbi { display: grid; grid-template-columns: auto 52px auto; gap: .3rem; align-items: center; min-width: 0; }
.br1-rbi b { font: 700 .56rem/1.2 var(--x-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--x-soft); white-space: nowrap; }
.br1-rbi i { display: block; height: 7px; background: var(--x-m); min-width: 0; justify-self: start; }
.br1-rbi em { font: 700 .72rem/1 var(--x-mono); font-style: normal; color: var(--x-m-text); font-variant-numeric: tabular-nums; }
.br1-rest { stroke: var(--x-rule); stroke-width: 1; }
.br1-boxr { fill: var(--x-paper); stroke: var(--x-ink); stroke-width: 1.5; }
.br1-wire { stroke: var(--x-hair); stroke-width: 1; }
.br1-wire-neg { stroke-dasharray: 4 3; }
.br1-node { fill: var(--x-ink); }
.br1-minus { font: 700 17px var(--x-mono); fill: var(--x-ink); }
.br1-tl { font: 700 10px var(--x-mono); letter-spacing: .12em; fill: var(--x-soft); }
.br1-tb { font: 700 12px var(--x-mono); letter-spacing: .12em; fill: var(--x-ink); }
.br1-tl2 { fill: var(--x-c-text); }
.br1-tf { font: 500 13px var(--x-text); fill: var(--x-ink); }
.br1-wave { fill: none; stroke: var(--x-c); stroke-width: 2; stroke-linejoin: round; }
.br1-wave-out { stroke-width: 2.6; }
.br1-wave.is-empty { stroke: var(--x-hair); stroke-width: 1.2; stroke-dasharray: 3 4; }
.br1-al { font: 700 11px var(--x-mono); letter-spacing: .06em; fill: var(--x-c-text); font-variant-numeric: tabular-nums; }
.br1-empty { font: 700 11px var(--x-mono); letter-spacing: .14em; fill: var(--x-soft); }
.br1-big { margin: 0; flex: none; }
.br1-num { display: inline-block; font-family: var(--x-display); font-weight: 860; font-size: clamp(3.4rem, 6.2vw, 5rem); line-height: .8; letter-spacing: -.05em;
  color: var(--x-ink); font-variant-numeric: tabular-nums lining-nums; text-shadow: 0 0 .5px color-mix(in srgb, var(--x-ink) 55%, transparent); }
.br1-num small { font-size: .5em; font-weight: 700; letter-spacing: 0; margin-right: .04em; vertical-align: .32em; }
.br1-mustcap { margin: 0; display: flex; flex-direction: column; gap: .15rem; padding-bottom: .1rem; }
.br1-mustcap .br1-label { color: var(--x-ink); }
.br1-mustline { font-size: .86rem; line-height: 1.32; color: var(--x-soft); }
.br1-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .4rem; align-items: center;
  font: 700 .62rem/1.3 var(--x-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--x-soft); }
.br1-slider output { font-weight: 700; letter-spacing: .02em; color: var(--x-c-text); font-variant-numeric: tabular-nums; font-size: .78rem; }
.br1-slider input { grid-column: 1 / -1; width: 100%; margin: .05rem 0 0; accent-color: var(--x-c); min-height: 26px; }
.br1-btns { display: flex; flex-direction: column; gap: .3rem; }
.br1 button { appearance: none; border: 1px solid var(--x-ink); border-radius: 0; background: transparent; color: var(--x-ink);
  font: 700 .6rem/1 var(--x-mono); letter-spacing: .1em; text-transform: uppercase; padding: .45rem .55rem; min-height: 30px; cursor: pointer; white-space: nowrap; }
.br1 button:hover { background: color-mix(in srgb, var(--x-ink) 8%, transparent); }
.br1 button:focus-visible, .br1 input:focus-visible { outline: 2px solid var(--x-ink); outline-offset: 2px; }
.br1 button[hidden] { display: none; }
.br1-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.br1-table caption { text-align: left; padding: 0 0 .3rem; caption-side: top; }
.br1-capnote { display: block; margin-top: .15rem; font-size: .78rem; line-height: 1.3; color: var(--x-soft); }
.br1-table th, .br1-table td { padding: .28rem .5rem .28rem 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--x-rule); }
.br1-io { font-weight: 400; letter-spacing: .06em; }
.br1-table thead th { font: 700 .58rem/1.3 var(--x-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--x-soft); padding-top: 0; white-space: normal; vertical-align: bottom; }
.br1-table .br1-r, .br1-table td { text-align: right; }
.br1-table tr > :last-child { padding-right: 0; }
.br1-table tbody th { font-weight: 450; color: var(--x-ink); white-space: nowrap; }
.br1-sym { display: inline-block; min-width: 2.1em; font: 700 .9rem/1 var(--x-mono); color: var(--x-m-text); }
.br1-rn { font-size: .88rem; }
.br1-n { font: 400 .88rem/1.3 var(--x-mono); color: var(--x-ink); white-space: nowrap; }
.br1-n.br1-tot { font: 700 clamp(1.05rem, 1.6vw, 1.32rem)/1.15 var(--x-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.br1-n.br1-grow { color: var(--x-soft); }
.br1-st { font: 700 .6rem/1.3 var(--x-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.br1 .is-hold .br1-st { color: var(--x-ok); }
.br1 .is-move .br1-st { color: var(--x-lost); }
.br1 .is-hold .br1-st::before { content: "✓ "; }
.br1 .is-move .br1-st::before { content: "✗ "; }
.br1 .is-hold th, .br1 .is-hold td { background: color-mix(in srgb, var(--x-ok) 7%, transparent); }
.br1-caption { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--x-rule); font-size: .92rem; color: var(--x-body); max-width: 52rem; }
.br1-caption b { color: var(--x-ink); font-weight: 650; }
.br1-k { font-style: italic; text-transform: none; font-family: var(--x-text); font-weight: 600; letter-spacing: 0; }
.br1-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.br1 button, .br1 input { scroll-margin: 1rem 0; }
/* phones and narrow columns: the number first, then the drawing, its controls, the reads and the sentence */
@media (max-width: 980px) {
  .br1-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "must" "stage" "ctl" "reads" "words"; row-gap: .6rem; }
  .br1-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .br1-btns { grid-column: 1 / -1; flex-direction: row; }
}
@container br1fig (max-width: 53rem) { .br1-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "must" "stage" "ctl" "reads" "words"; row-gap: .6rem; } .br1-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .br1-btns { grid-column: 1 / -1; flex-direction: row; } }
@media (max-width: 640px) {
  .br1-rb { grid-template-columns: auto auto; }
  .br1-rbl { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .br1-rbi b { min-width: 6.6em; } }
@media (max-width: 400px) { .br1-rb { grid-template-columns: auto; } }
/* measured fit of the read bars (fitBars): the widths four and two to a row would take, and the layout chosen */
.br1-rb.br1-rb-m4 { grid-template-columns: repeat(4, max-content); width: max-content; }
.br1-rb.br1-rb-m2 { grid-template-columns: repeat(2, max-content); width: max-content; }
.br1-rb.br1-rb-m2 .br1-rbi b, .br1-rb.br1-rb2 .br1-rbi b { min-width: 6.6em; }
.br1-rb.br1-rb2 { grid-template-columns: auto auto; }
.br1-rb.br1-rb1 { grid-template-columns: auto; }
@media (max-width: 480px) {
  .br1 { padding-left: .6rem; padding-right: .6rem; }
  .br1-table th, .br1-table td { padding-right: .3rem; }
  .br1-n { font-size: .8rem; }
  .br1-n.br1-tot { font-size: .98rem; }
  .br1-st { font-size: .56rem; letter-spacing: .08em; }
  .br1-table td.br1-tot { padding-left: .4rem; }   /* two totals side by side never read as one number */
  .br1-n.br1-tot.br1-long { font-size: .74rem; letter-spacing: -.03em; }
  .br1-table td.br1-st { padding-left: .25rem; }
  .br1-io { display: none; }
  .br1-table thead th { white-space: normal; vertical-align: bottom; }
  .br1-rn { display: block; font-size: .72rem; color: var(--x-soft); }
  .br1-mustline { font-size: .8rem; }
}
@container br1fig (max-width: 24.75rem) { .br1-table th, .br1-table td { padding-right: .3rem; } .br1-n { font-size: .8rem; } .br1-n.br1-tot { font-size: .98rem; } .br1-st { font-size: .56rem; letter-spacing: .08em; } .br1-table td.br1-tot { padding-left: .4rem; } /* two totals side by side never read as one number */
  .br1-n.br1-tot.br1-long { font-size: .74rem; letter-spacing: -.03em; } .br1-table td.br1-st { padding-left: .25rem; } .br1-io { display: none; } .br1-table thead th { white-space: normal; vertical-align: bottom; } .br1-rn { display: block; font-size: .72rem; color: var(--x-soft); } .br1-mustline { font-size: .8rem; } }
/* the narrowest phones (a 320 px screen leaves the figure about 270 px): the read's name may wrap, and the cells close up */
.br1-st2 { display: none; }
/* the narrowest phones: the verdict moves under the read's name and the last column is set aside on screen (it stays in the table for screen readers) */
@media (max-width: 400px) {
  .br1-table tr > :last-child { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .br1-st2 { display: block; margin-top: .1rem; font: 700 .56rem/1.3 var(--x-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
  .br1 .is-hold .br1-st2 { color: var(--x-ok); }
  .br1 .is-move .br1-st2 { color: var(--x-lost); }
  .br1 .is-hold .br1-st2::before { content: "✓ "; }
  .br1 .is-move .br1-st2::before { content: "✗ "; }
}
@media (max-width: 360px) {
  .br1-table th, .br1-table td { padding-right: .2rem; }
  .br1-table tbody th { white-space: normal; }
  .br1-n.br1-tot { font-size: .86rem; }
  .br1-st { letter-spacing: .03em; }
}
/* large text: the reads column picks the table layout that fits it, measured in its own text size (em), so a reader's larger
   default text gets the compact and then the narrowest layout wherever the column is narrow for it; past that the table scrolls */
.br1-reads { container-type: inline-size; }
.br1-tscroll { overflow-x: auto; position: relative; max-width: 100%; }
.br1-tscroll:focus-visible { outline: 2px solid var(--x-ink); outline-offset: 2px; }
.br1-tcap { display: none; margin: 0 0 .3rem; }
.br1-reads.br1-tscrolling .br1-tcap { display: block; }
.br1-tcue { display: block; margin-top: .25rem; font-size: .78rem; font-style: italic; color: var(--x-soft); }
.br1-reads.br1-tscrolling .br1-table caption { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@container (max-width: 26em) {
  .br1-table th, .br1-table td { padding-right: .3rem; }
  .br1-n { font-size: .8rem; }
  .br1-n.br1-tot { font-size: .98rem; }
  .br1-st { font-size: .56rem; letter-spacing: .08em; }
  .br1-table td.br1-tot { padding-left: .4rem; }
  .br1-n.br1-tot.br1-long { font-size: .74rem; letter-spacing: -.03em; }
  .br1-table td.br1-st { padding-left: .25rem; }
  .br1-io { display: none; }
  .br1-table thead th { white-space: normal; vertical-align: bottom; }
  .br1-rn { display: block; font-size: .72rem; color: var(--x-soft); }
}
@container (max-width: 19.5em) {
  .br1-table tr > :last-child { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .br1-st2 { display: block; margin-top: .1rem; font: 700 .56rem/1.3 var(--x-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
  .br1 .is-hold .br1-st2 { color: var(--x-ok); }
  .br1 .is-move .br1-st2 { color: var(--x-lost); }
  .br1 .is-hold .br1-st2::before { content: "✓ "; }
  .br1 .is-move .br1-st2::before { content: "✗ "; }
}
@container (max-width: 18.5em) {
  .br1-table th, .br1-table td { padding-right: .2rem; }
  .br1-table tbody th { white-space: normal; }
  .br1-n.br1-tot { font-size: .86rem; }
  .br1-st { letter-spacing: .03em; }
}
/* a slider's name and its value share a line while both fit; with large text the value takes the next line */
.br1-slider { display: flex; flex-wrap: wrap; align-items: center; }
.br1-slider > span { flex: 1 1 auto; }
.br1-slider output { margin-left: auto; }
.br1-slider input { flex: 1 0 100%; }
@media (pointer: coarse) { .br1 input[type="range"] { min-height: 44px; } .br1 button { min-height: 44px; } }
/* print: white page, dark ink, no controls */
.br1.br1-print { --x-paper: #ffffff; --x-ink: #1d1d1b; --x-body: #2a2926; --x-soft: #3c3a36; --x-c: #009fe3; --x-c-text: #0072b5;
  --x-m: #e6007e; --x-m-text: #c4006b; --x-ok: #0b7a3e; --x-lost: #c8401f; }
@media print {
  .br1 { background: #ffffff; color: #2a2926; border-color: #1d1d1b; break-inside: avoid-page; }
  .br1 button, .br1 input[type="range"] { display: none; }
}
/* forced colours: system colours for lines and marks; ✓/✗ and the status words carry the meaning */
@media (forced-colors: active) {
  .br1-wave, .br1-boxr, .br1-rest, .br1-wire { stroke: CanvasText; }
  .br1-node, .br1-minus, .br1-tl, .br1-tb, .br1-tf, .br1-al, .br1-empty { fill: CanvasText; }
  .br1-boxr { fill: Canvas; }
  .br1-rbi i { background: Highlight; forced-color-adjust: none; }
  .br1-wave.is-empty { stroke: GrayText; }
  .br1 button[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: 2px; }
}
/* paper: keep the drawn bars */
@media print {
  .br1, .br1 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* drawn bars and swatches print with background graphics off */
}
/* the figure switches layout on its own width in the reader's text size (the @container twins of the window breakpoints) */
.br1 { container: br1fig / inline-size; }
