/* Synced from app/src/styles/analytics.css by web/build.py: the component library's charts (design/app/SYSTEM.md
   §7, Analytics charts). Edit it there; this copy is rewritten on every build. */
/* Analytics charts (components/ui/analytics.tsx and the analytics-*.tsx files beside it; design/app/SYSTEM.md §7
   "Analytics charts"). One job per chart, no categorical colours. Their colour roles (the comparison's grey, the heat
   and leak ramps) are in ui.css's role block with the rest, so the site can draw the same charts. */

/* ---------- frames ---------- */

.bw-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.bw-headline > b { font: 600 var(--t-title)/1.1 var(--sans); letter-spacing: -.032em; }
.bw-headline > b.good { color: var(--own); }
.bw-headline > b.bad { color: var(--rust); }
.bw-headline > span { font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }

.bw-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-keys > span { display: inline-flex; align-items: center; gap: 7px; }
/* a key's swatch, in a legend and in a hover card: a bar, a line, a dot, a track, a band */
:is(.bw-keys, .bw-tip) i:not(.bw-mk) { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--leaf); }
:is(.bw-keys, .bw-tip) i.line { width: 14px; height: 2px; border-radius: 1px; }
:is(.bw-keys, .bw-tip) i.dot { width: 9px; height: 9px; border-radius: 50%; }
:is(.bw-keys, .bw-tip) i.track { background: var(--dither); box-shadow: inset 0 0 0 1px var(--track); }
:is(.bw-keys, .bw-tip) i.held { background: var(--dither-held); box-shadow: inset 0 0 0 1px var(--edge); }
:is(.bw-keys, .bw-tip) i.ring { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
:is(.bw-keys, .bw-tip) i.band { background: var(--leaf-pale); }
:is(.bw-keys, .bw-tip) i.forest { background: var(--own); }
:is(.bw-keys, .bw-tip) i.ink { background: var(--ink); }
:is(.bw-keys, .bw-tip) i.grey { background: var(--compare); }
:is(.bw-keys, .bw-tip) i.rust { background: var(--rust); }

/* hover, with no script (Hover, Tip): a slot per day over the plot; the one under the pointer shows a hairline, a dot
   on each line and one card listing every series there, and any change that day */
.bw-hover { position: absolute; inset: 0; z-index: 2; display: flex; }
.bw-hover > span { position: relative; flex: 1 1 0; min-width: 0; }
.bw-hover > span > * { display: none; }
.bw-hover > span:hover { z-index: 1; }
.bw-hover > span:hover > * { display: block; }
.bw-hover .hair { position: absolute; top: 0; bottom: 0; left: 50%; margin-left: -.5px; border-left: 1px solid var(--text-3); }
:is(.bw-hover, .bw-linechart) .dot { position: absolute; left: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--sheet); }
:is(.bw-hover, .bw-linechart) .dot.forest { background: var(--own); }
:is(.bw-hover, .bw-linechart) .dot.leaf { background: var(--leaf); }
:is(.bw-hover, .bw-linechart) .dot.grey { background: var(--compare); }
.bw-tip { position: absolute; top: 10px; left: calc(50% + 12px); z-index: 3; min-width: 180px; padding: 10px 12px; border-radius: var(--r-l); background: var(--sheet); box-shadow: var(--sh-raised); font: 400 12px/1.3 var(--sans); letter-spacing: 0; color: var(--text-2); text-align: left; white-space: nowrap; pointer-events: none; }
.bw-tip.left { left: auto; right: calc(50% + 12px); }
.bw-tip > b { display: block; margin-bottom: 5px; font-weight: 600; color: var(--ink); }
.bw-tip > span { display: flex; align-items: center; gap: 7px; padding: 2.5px 0; }
.bw-tip em { margin-left: auto; padding-left: 20px; font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }

.bw-card { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px 24px; border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--sh-sheet); }
.bw-card > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.bw-card h3 { font: 600 var(--t-heading)/1.3 var(--sans); letter-spacing: -.012em; }
.bw-card h3 small { font-size: inherit; font-weight: 400; color: var(--text-3); letter-spacing: inherit; }
.bw-card > .body { margin-top: 18px; min-width: 0; }
.bw-card > .bw-keys { margin-top: auto; padding-top: 16px; }

.bw-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px; border-radius: var(--r-sheet); background: var(--ground); }
.bw-gallery > .span2 { grid-column: span 2; }
.bw-gallery > .span3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .bw-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .bw-gallery { grid-template-columns: minmax(0, 1fr); padding: 12px; } .bw-gallery > .span2 { grid-column: auto; } }

/* the scale under three columns of a chart: name, plot, value */
:is(.bw-ranges, .bw-dumbbells, .bw-waterfall, .bw-diverge) > .ticks { display: grid; grid-template-columns: var(--gl) minmax(0, 1fr) var(--gr); gap: var(--gg); height: 16px; margin-top: 6px; }
:is(.bw-ranges, .bw-dumbbells, .bw-waterfall, .bw-diverge) > .ticks .at { position: relative; }
:is(.bw-ranges, .bw-dumbbells, .bw-waterfall, .bw-diverge) > .ticks i { position: absolute; transform: translateX(-50%); font: 500 var(--t-micro)/1.3 var(--sans); font-style: normal; color: var(--text-3); white-space: nowrap; }

/* in a drawer, a chart under its section's label sits 10 below it */
.bw-drawer h3 + :is(.bw-diverge, .bw-barlist, .bw-parts) { margin-top: 10px; }

/* ---------- funnels ---------- */

.bw-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 28px; }
.bw-pairs .n { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bw-pairs .n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-pairs .v { display: flex; gap: 8px; margin-top: 2px; font: 600 var(--t-heading)/1.3 var(--sans); letter-spacing: -.012em; color: var(--text-3); }
.bw-pairs .v .with { color: var(--own); }
.bw-pairs .cols { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 10px; padding: 0 16px; border-radius: var(--r-s); background: var(--dither); overflow: hidden; }
.bw-pairs .cols i { flex: 1 1 0; border-radius: 6px 6px 0 0; background: var(--compare); }
.bw-pairs .cols i.with { background: var(--own); }
.bw-pairs .made { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }

.bw-minifunnel { display: inline-flex; align-items: flex-end; gap: 4px; width: 118px; height: 32px; vertical-align: middle; }
.bw-minifunnel.card { width: 200px; height: 56px; gap: 10px; }
.bw-minifunnel i { flex: 1 1 0; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--leaf); }
.bw-minifunnel.card i { border-radius: 4px 4px 0 0; }
.bw-minifunnel i.none { height: 100%; background: var(--dither); box-shadow: inset 0 0 0 1px var(--edge); }

.bw-celltable > div { display: grid; grid-template-columns: var(--cols); gap: 6px; align-items: center; min-height: 32px; }
.bw-celltable > .h { min-height: 22px; align-items: end; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-celltable > .h > span:nth-child(n + 2) { text-align: center; }
.bw-celltable > .h > span:last-child:not(:nth-child(2)) { text-align: right; }
.bw-celltable [role="rowheader"] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-celltable [role="rowheader"].strong { font-weight: 600; }
.bw-celltable .c { display: grid; place-items: center; height: 28px; border-radius: var(--r-item); font: 600 var(--t-small)/1 var(--sans); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.bw-celltable .c.none { background: var(--dither); box-shadow: inset 0 0 0 1px var(--track); }
.bw-celltable .end { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bw-celltable.heat .s1, .bw-ramp.heat .s1 { background: var(--heat-1); color: var(--ink); }
.bw-celltable.heat .s2, .bw-ramp.heat .s2 { background: var(--heat-2); color: var(--ink); }
.bw-celltable.heat .s3, .bw-ramp.heat .s3 { background: var(--heat-3); color: var(--ink); }
.bw-celltable.heat .s4, .bw-ramp.heat .s4 { background: var(--heat-4); color: var(--heat-ink-4); }
.bw-celltable.heat .s5, .bw-ramp.heat .s5 { background: var(--heat-5); color: var(--heat-ink-5); }
.bw-celltable.leak .s1, .bw-ramp.leak .s1 { background: var(--leak-1); color: var(--ink); box-shadow: inset 0 0 0 1px var(--leak-2); }
.bw-celltable.leak .s2, .bw-ramp.leak .s2 { background: var(--leak-2); color: var(--ink); }
.bw-celltable.leak .s3, .bw-ramp.leak .s3 { background: var(--leak-3); color: var(--ink); }
.bw-celltable.leak .s4, .bw-ramp.leak .s4 { background: var(--leak-4); color: var(--leak-ink-4); }
.bw-celltable.leak .s5, .bw-ramp.leak .s5 { background: var(--leak-5); color: var(--leak-ink-5); }
.bw-ramp { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-ramp > span { display: inline-flex; gap: 2px; }
.bw-ramp i { width: 24px; height: 10px; border-radius: 3px; }

.bw-steplines > div { display: grid; grid-template-columns: 136px minmax(0, 1fr) 44px; gap: 14px; align-items: center; height: 68px; border-top: 1px solid var(--line); }
.bw-steplines > div:first-child { border-top: 0; }
.bw-steplines .n { display: grid; line-height: 1.3; min-width: 0; }
.bw-steplines .n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-steplines .n small { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-steplines .plot { position: relative; height: 46px; }
.bw-steplines svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-steplines .band { fill: var(--g-tint); }
.bw-steplines .line { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-steplines .line.moved { stroke: var(--ink); }
.bw-steplines .at { position: absolute; bottom: -13px; transform: translateX(-50%); line-height: 0; }
.bw-steplines .v { text-align: right; font: 600 var(--t-heading)/1 var(--sans); letter-spacing: -.012em; }

.bw-columns .plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; height: 176px; border-bottom: 1px solid var(--edge); }
.bw-columns .plot > span { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.bw-columns .plot small { text-align: center; font: 600 var(--t-small)/1 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-columns .plot i { display: block; height: calc((100% - 20px) * var(--v)); border-radius: 6px 6px 0 0; background: var(--leaf); }
.bw-columns .plot i.strong { background: var(--own); }
.bw-columns .plot small:has(+ i.strong) { color: var(--ink); }
.bw-columns .axis { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; margin-top: 6px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); text-align: center; white-space: nowrap; }
.bw-columns .bracket { position: relative; height: 26px; margin-top: 10px; }
.bw-columns .bracket i { position: absolute; left: 0; top: 4px; box-sizing: border-box; width: calc(var(--at) * 100%); height: 8px; border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 3px 3px; }
.bw-columns .bracket span { position: absolute; top: 0; left: calc(var(--at) * 100%); margin-left: 8px; font: 600 var(--t-small)/1.3 var(--sans); letter-spacing: 0; white-space: nowrap; }

.bw-barlist { display: grid; gap: 10px; }
.bw-barlist > div { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 26px; }
.bw-barlist .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-barlist .t { position: relative; height: 12px; border-radius: 4px; background: var(--dither); overflow: hidden; }
.bw-barlist .t i { position: absolute; inset: 0 auto 0 0; min-width: 4px; border-radius: 4px; background: var(--compare); }
.bw-barlist .v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bw-barlist .v b { font-weight: 600; }
.bw-barlist .v small { margin-left: 6px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-barlist .v .bw-delta { margin-left: 8px; }
.bw-barlist > .ink .t i { background: var(--ink); }
.bw-barlist > .bad .t i { background: var(--rust); }
.bw-barlist > .good .t i { background: var(--leaf); }
.bw-barlist > :is(.ink, .bad) .n { font-weight: 600; }
.bw-barlist > .bad .v b { color: var(--rust); }
.bw-barlist.stacked { gap: 12px; }
.bw-barlist.stacked > div { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
.bw-barlist.stacked .t { grid-column: 1 / -1; grid-row: 2; height: 10px; }

/* ---------- tests ---------- */

.bw-ranges { position: relative; --gl: 132px; --gr: 216px; --gg: 20px; padding-top: 20px; }
.bw-ranges::before { content: ""; position: absolute; top: 20px; bottom: 22px; left: calc(var(--gl) + var(--gg) + (100% - var(--gl) - var(--gr) - var(--gg) * 2) * var(--zero)); border-left: 1px solid var(--edge-hover); }
.bw-ranges > .zero { position: absolute; top: 0; left: calc(var(--gl) + var(--gg) + (100% - var(--gl) - var(--gr) - var(--gg) * 2) * var(--zero)); transform: translateX(-50%); font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-2); white-space: nowrap; }
.bw-ranges > div:not(.ticks) { display: grid; grid-template-columns: var(--gl) minmax(0, 1fr) var(--gr); gap: var(--gg); align-items: center; height: 46px; border-top: 1px solid var(--line); }
.bw-ranges > .zero + div { border-top: 0; }
.bw-ranges .n.strong { font-weight: 600; }
.bw-ranges .plot, .bw-range { position: relative; display: block; height: 16px; }
.bw-ranges .plot i, .bw-range i { position: absolute; }
.bw-ranges .r { top: 2px; height: 12px; border-radius: 6px; background: var(--track); }
.bw-ranges .b { top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 2.5px var(--sheet); }
.bw-ranges .v { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; white-space: nowrap; }
.bw-ranges .v b { font-weight: 600; }
.bw-ranges .v small { font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-range { min-width: 120px; }
.bw-range .z { top: -6px; bottom: -6px; border-left: 1px solid var(--edge-hover); }
.bw-range .r { top: 3px; height: 10px; border-radius: 5px; background: var(--track); }
.bw-range .b { top: 1px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 2px var(--sheet); }
:is(.bw-ranges .clear, .bw-range.clear) .r { background: var(--range); }
:is(.bw-ranges .clear, .bw-range.clear) .b { background: var(--own); }
.bw-ranges .clear .v b { color: var(--own); }
:is(.bw-ranges .worse, .bw-range.worse) .r { background: var(--rust-pale); }
:is(.bw-ranges .worse, .bw-range.worse) .b { background: var(--rust); }
.bw-ranges .worse .v b { color: var(--rust); }
@media (max-width: 640px) { .bw-ranges { --gl: 88px; --gr: 96px; --gg: 12px; } .bw-ranges .v small { display: none; } }

.bw-narrow .plot { position: relative; height: 170px; }
.bw-narrow svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-narrow svg .band { fill: var(--leaf-pale); }
.bw-narrow .zero { stroke: var(--edge-hover); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-narrow svg .line { fill: none; stroke: var(--own); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-narrow .plot > i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--own); box-shadow: 0 0 0 2px var(--sheet); }
.bw-narrow .z { position: absolute; right: 0; margin-top: 4px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-2); }
.bw-narrow .days { position: relative; height: 32px; margin-top: 8px; }
.bw-narrow .days span { position: absolute; transform: translateX(-50%); display: grid; justify-items: center; font: 500 var(--t-micro)/1.35 var(--sans); color: var(--text-3); white-space: nowrap; }
.bw-narrow .days b { font-weight: 600; }
.bw-narrow .days .fairly b { color: var(--text-2); }
.bw-narrow .days .very b { color: var(--own); }

.bw-rollout { padding-right: 60px; }
.bw-rollout .plot { position: relative; height: 170px; }
.bw-rollout svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-rollout .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-rollout .area { fill: var(--leaf); fill-opacity: .14; }
.bw-rollout .line { fill: none; stroke: var(--own); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bw-rollout .held { position: absolute; right: 0; background: var(--dither-held); }
.bw-rollout .note { position: absolute; margin: 8px 0 0 8px; font: 600 12px/1.3 var(--sans); letter-spacing: 0; white-space: nowrap; }
.bw-rollout .tick { position: absolute; right: -60px; transform: translateY(-50%); padding-left: 8px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); white-space: nowrap; }
.bw-rollout .days { position: relative; height: 16px; margin-top: 8px; }
.bw-rollout .days span { position: absolute; transform: translateX(-50%); font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); white-space: nowrap; }

.bw-dumbbells { --gl: 132px; --gr: 120px; --gg: 20px; }
.bw-dumbbells > div:not(.ticks) { display: grid; grid-template-columns: var(--gl) minmax(0, 1fr) var(--gr); gap: var(--gg); align-items: center; height: 40px; }
.bw-dumbbells .plot { position: relative; height: 16px; }
.bw-dumbbells .plot i { position: absolute; }
.bw-dumbbells .link { top: 6px; height: 4px; border-radius: 2px; background: var(--edge); }
.bw-dumbbells .from { top: 2px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--compare); box-shadow: 0 0 0 2px var(--sheet); }
.bw-dumbbells .to { top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2.5px var(--sheet); }
.bw-dumbbells .worse .link { background: var(--rust-pale); }
.bw-dumbbells .worse .to { background: var(--rust); }
.bw-dumbbells .v { text-align: right; white-space: nowrap; }
.bw-dumbbells .v small { font-size: var(--t-body); color: var(--text-3); }
.bw-dumbbells .v b { font-weight: 600; }
.bw-dumbbells .worse .v b { color: var(--rust); }
@media (max-width: 640px) { .bw-dumbbells { --gl: 96px; --gr: 92px; --gg: 12px; } }

/* ---------- over time ---------- */

/* a few series over the same days, each named at its end (Lines). Not .bw-lines, the list on hairlines in ui.css */
.bw-linechart { padding-right: 76px; }
.bw-linechart .plot { position: relative; height: var(--h); }
.bw-linechart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-linechart svg .gap { fill: var(--gap-wash); fill-opacity: .6; }
.bw-linechart .wash { fill: var(--leaf); fill-opacity: .1; }
.bw-linechart svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-linechart svg .line.ink { stroke: var(--ink); }
.bw-linechart svg .line.leaf { stroke: var(--leaf); }
.bw-linechart svg .line.grey { stroke: var(--compare); stroke-width: 1.75; }
.bw-linechart .mark { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--edge-hover); }
.bw-linechart .marklabel { position: absolute; top: -2px; margin-left: 6px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-2); white-space: nowrap; }
.bw-linechart .end { position: absolute; right: -76px; transform: translateY(-50%); display: grid; padding-left: 10px; font-size: var(--t-small); line-height: 1.25; color: var(--text-3); letter-spacing: 0; white-space: nowrap; }
.bw-linechart .end b { font: 600 var(--t-heading)/1.2 var(--sans); color: var(--ink); }
.bw-linechart .end.grey b { color: var(--text-2); }
.bw-linechart .axis { display: flex; justify-content: space-between; margin-top: 8px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-linechart svg .line.forest { stroke: var(--own); }
.bw-linechart svg .band { fill: var(--wash); }
.bw-linechart svg .band:is(.forest, .leaf) { fill: var(--leaf-pale); }
/* on a scale: round gridlines with their values in the gutter at the right, a dot at each line's end */
.bw-linechart.scaled { padding-right: 48px; }
.bw-linechart svg .grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-linechart .y { position: absolute; left: calc(100% + 8px); transform: translateY(-50%); font: 500 var(--t-micro)/1 var(--sans); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-linechart .plot > .dot { left: auto; }

/* the same number for a few groups, a small plot each on one scale (Multiples) */
.bw-multiples { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)) 34px; gap: 16px; }
.bw-multiples .h { height: 42px; margin-bottom: 8px; font-size: 12px; line-height: 1.4; color: var(--text-3); letter-spacing: 0; white-space: nowrap; }
.bw-multiples .h span { display: block; }
.bw-multiples .h b { display: flex; align-items: center; gap: 6px; font: 600 17px/1.3 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.bw-multiples .plot { position: relative; display: block; height: 96px; }
.bw-multiples svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bw-multiples .grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-multiples .line { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-multiples .line.quiet { stroke: var(--compare); }
.bw-multiples .plot > i { position: absolute; left: 100%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--sheet); }
.bw-multiples .plot > i.quiet { background: var(--compare); }
.bw-multiples .axis { display: flex; justify-content: space-between; margin-top: 7px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-multiples .scale { position: relative; height: 96px; margin-top: 50px; }
.bw-multiples .scale i { position: absolute; left: 0; transform: translateY(-50%); font: 500 var(--t-micro)/1 var(--sans); font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .bw-multiples { grid-template-columns: minmax(0, 1fr); } .bw-multiples .scale { display: none; } }

/* what moved the number: a row per change on round gridlines, a hairline joining each row to the next */
.bw-waterfall { position: relative; container-type: inline-size; --gl: 168px; --gr: 56px; --gg: 12px; }
.bw-waterfall > .grid { position: absolute; top: 0; bottom: 22px; left: calc(var(--gl) + var(--gg)); right: calc(var(--gr) + var(--gg)); }
.bw-waterfall > .grid i { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.bw-waterfall > div:not(.ticks) { position: relative; display: grid; grid-template-columns: var(--gl) minmax(0, 1fr) var(--gr); gap: var(--gg); align-items: center; height: 40px; }
.bw-waterfall .n { display: grid; line-height: 1.25; min-width: 0; color: var(--text-2); }
.bw-waterfall .n > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-waterfall .n b { font-weight: 600; color: var(--ink); }
.bw-waterfall .n small { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-waterfall .plot { position: relative; align-self: stretch; }
.bw-waterfall .plot > * { position: absolute; top: 50%; }
.bw-waterfall .bar { height: 18px; margin-top: -9px; border-radius: 3px; background: var(--own); }
.bw-waterfall .down .bar { background: var(--rust); }
.bw-waterfall .rest .bar { background: var(--compare); }
.bw-waterfall .join { height: 40px; border-left: 1px solid var(--edge-hover); }
.bw-waterfall .tick { width: 2px; height: 22px; margin: -11px 0 0 -1px; border-radius: 1px; background: var(--ink); }
/* a change that moved nothing: its square on the running total, ringed so the hairline doesn't run through it */
.bw-waterfall .at { z-index: 1; transform: translate(-50%, -50%); line-height: 0; }
.bw-waterfall .at .bw-mk { width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--sheet); }
.bw-waterfall em { transform: translateY(-50%); font: 500 var(--t-small)/1 var(--sans); font-style: normal; letter-spacing: 0; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bw-waterfall .end em { font-weight: 600; color: var(--ink); }
.bw-waterfall .up em { color: var(--own); }
.bw-waterfall .down em { color: var(--rust); }
.bw-waterfall :is(.rest, .none) em { font-weight: 400; }
/* in a narrow card the names give way, and the scale names only its ends */
@container (max-width: 380px) {
  .bw-waterfall > div { --gl: 132px; }
  .bw-waterfall > .grid { left: calc(132px + var(--gg)); }
  .bw-waterfall > .ticks i:not(:first-child, :last-child) { display: none; }
}

.bw-weekheat { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; }
.bw-weekheat .hours { position: relative; height: 16px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-weekheat .hours span { position: absolute; }
.bw-weekheat .days { display: grid; grid-template-rows: repeat(7, 18px); row-gap: 3px; margin-top: 4px; font: 500 var(--t-micro)/18px var(--sans); color: var(--text-3); }
.bw-weekheat .grid { position: relative; display: grid; grid-template-rows: repeat(7, 18px); row-gap: 3px; margin-top: 4px; }
.bw-weekheat .row { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 3px; }
.bw-weekheat .row i { border-radius: 4px; }
.bw-weekheat .s1 { background: var(--heat-1); }
.bw-weekheat .s2 { background: var(--heat-2); }
.bw-weekheat .s3 { background: var(--heat-3); }
.bw-weekheat .s4 { background: var(--heat-4); }
.bw-weekheat .s5 { background: var(--heat-5); }
.bw-weekheat .window { position: absolute; top: -3px; height: calc(var(--rows) * 21px + 3px); margin-left: -3px; padding-right: 3px; border-radius: var(--r-badge); box-shadow: 0 0 0 1.5px var(--ink); }

.bw-month > div { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.bw-month > .h { margin-top: 0; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-month [role="cell"] { display: flex; flex-direction: column; justify-content: space-between; height: 36px; padding: 4px 6px 5px; border-radius: var(--r-badge); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); }
.bw-month [role="cell"] small { font: 500 10.5px/1 var(--sans); color: var(--text-2); letter-spacing: 0; }
.bw-month [role="cell"] > span { display: flex; flex-wrap: wrap; gap: 3px; }
.bw-month .out { background: var(--ground); box-shadow: none; }
.bw-month .out small { color: var(--faint); }
.bw-month .today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.bw-month .today small { font-weight: 600; color: var(--ink); }

/* the number over time with what happened on the same days (TrendStack): the line on its usual range; a lane of its
   changes; what each tool read; one hover across all of it. The scale's values sit in the gutter at the right */
.bw-trendstack { padding-right: 48px; }
.bw-trendstack .stack { position: relative; }
.bw-trendstack :is(.main, .sub) { position: relative; }
.bw-trendstack :is(.main, .sub) > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bw-trendstack svg.wash { fill: var(--leaf); opacity: .16; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.bw-trendstack svg .grid { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-trendstack svg .band { fill: var(--leaf-pale); }
.bw-trendstack svg .line { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-trendstack .y { position: absolute; left: calc(100% + 8px); transform: translateY(-50%); font: 500 var(--t-micro)/1 var(--sans); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-trendstack .end { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--sheet); }
/* the lane: a test is a bar over its days, an update a square on its day */
.bw-trendstack .lane { display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); }
.bw-trendstack .row { position: relative; height: 20px; }
/* a bar's name sits on it when it fits: an empty first item fills its line, so a name too long wraps under the bar,
   out of sight */
.bw-trendstack .lane .bar { position: absolute; top: 2px; display: flex; flex-wrap: wrap; height: 16px; overflow: hidden; border-radius: 4px; background: var(--moss); }
.bw-trendstack .lane .bar::before { content: ""; width: 0; height: 16px; }
.bw-trendstack .lane .bar b { padding: 0 7px; font: 500 11px/16px var(--sans); letter-spacing: 0; color: var(--text-2); white-space: nowrap; }
.bw-trendstack .lane .bar.helped { background: var(--own); }
.bw-trendstack .lane .bar.helped b { color: var(--on-primary); }
.bw-trendstack .lane .bar.undone { background: var(--rust); }
.bw-trendstack .lane .bar.undone b { color: var(--on-rust); }
.bw-trendstack .lane .bar.waiting { background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bw-trendstack .lane .bar.first { background: var(--gold); box-shadow: none; }
.bw-trendstack .lane .bar.test { background: linear-gradient(90deg, var(--own) calc(var(--p, 50) * 1%), var(--sheet) 0); box-shadow: inset 0 0 0 1.5px var(--own); }
.bw-trendstack .lane .at { position: absolute; top: 50%; transform: translate(-50%, -50%); line-height: 0; }
.bw-trendstack .lane .at .bw-mk { width: 9px; height: 9px; }
/* a tool's reading: its logo and name top left, its highest value on the scale */
.bw-trendstack .sub { border-top: 1px solid var(--line); }
.bw-trendstack svg .thin { fill: none; stroke: var(--text-2); stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bw-trendstack svg .bars { fill: var(--leaf); }
.bw-trendstack svg .bars.grey { fill: var(--compare); }
.bw-trendstack svg .bars.hot { fill: var(--rust); }
.bw-trendstack .sub > .name { position: absolute; top: 6px; left: 0; display: inline-flex; align-items: center; gap: 4px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-trendstack .axis { position: relative; height: 16px; margin-top: 7px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-trendstack .axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.bw-trendstack .bw-legend { margin-top: 12px; }

/* ---------- breakdowns ---------- */

.bw-breakdown > div { display: grid; grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 52px 92px 128px; gap: 20px; align-items: center; min-height: 38px; border-top: 1px solid var(--line); }
.bw-breakdown > .h { min-height: 24px; align-items: end; border-top: 0; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-breakdown > .h > span:nth-child(n + 3) { text-align: right; }
.bw-breakdown [role="rowheader"] { font-weight: 600; }
.bw-breakdown .bar { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 12px; align-items: center; }
.bw-breakdown .t { position: relative; height: 14px; border-radius: 4px; background: var(--dither); overflow: hidden; }
.bw-breakdown .t i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--leaf); }
.bw-breakdown .num { text-align: right; font-variant-numeric: tabular-nums; }
.bw-breakdown .dim { color: var(--text-3); }
.bw-breakdown .rate { display: inline-flex; justify-content: flex-end; align-items: center; gap: 8px; }
.bw-breakdown .rate b { font: 600 var(--t-heading)/1 var(--sans); }
.bw-breakdown .rate .bw-delta { min-width: 58px; justify-content: center; }
@media (max-width: 720px) {
  .bw-breakdown > div { grid-template-columns: 72px minmax(0, 1fr) 116px; gap: 12px; }
  .bw-breakdown > div > :is(:nth-child(3), :nth-child(4)) { display: none; }
}

.bw-diverge { position: relative; --gl: 112px; --gr: 64px; --gg: 14px; --plot: calc(100% - var(--gl) - var(--gr) - var(--gg) * 2); padding-top: 22px; }
.bw-diverge::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: calc(var(--gl) + var(--gg) + var(--plot) * var(--wl)); width: calc(var(--plot) * var(--ww)); border-radius: var(--r-badge); background: var(--ground); }
.bw-diverge::after { content: ""; position: absolute; top: 22px; bottom: 22px; left: calc(var(--gl) + var(--gg) + var(--plot) * var(--zero)); border-left: 1px solid var(--edge-hover); }
.bw-diverge > .usual { position: absolute; top: 0; left: calc(var(--gl) + var(--gg) + var(--plot) * var(--wl)); width: calc(var(--plot) * var(--ww)); text-align: center; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-diverge > div:not(.ticks) { position: relative; z-index: 1; display: grid; grid-template-columns: var(--gl) minmax(0, 1fr) var(--gr); gap: var(--gg); align-items: center; height: 38px; }
.bw-diverge .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-diverge .plot { position: relative; height: 16px; }
.bw-diverge .plot i { position: absolute; top: 0; height: 16px; background: var(--compare); }
.bw-diverge .plot .neg { border-radius: 5px 0 0 5px; }
.bw-diverge .plot .pos { border-radius: 0 5px 5px 0; }
.bw-diverge .plot .nil { width: 3px; margin-left: -1.5px; border-radius: 1.5px; }
.bw-diverge .worse i { background: var(--rust); }
.bw-diverge .better i { background: var(--own); }
.bw-diverge :is(.worse, .better) .n { font-weight: 600; }
.bw-diverge .v { text-align: right; font-weight: 600; white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bw-diverge .worse .v { color: var(--rust); }
.bw-diverge .better .v { color: var(--own); }

.bw-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bw-seg + .bw-wall { margin-top: 12px; }   /* under the segment that picks what it shows */
.bw-wall li { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: var(--r-tile); background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); }
.bw-wall li:is(.moved, .worse) { background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bw-wall li.worse { box-shadow: inset 0 0 0 1.5px var(--rust); }
.bw-wall p { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bw-wall p span { font-size: var(--t-small); font-weight: 500; color: var(--text-2); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-wall p b { flex: none; font: 600 var(--t-heading)/1.2 var(--sans); letter-spacing: -.012em; }
.bw-wall svg { display: block; width: 100%; height: 26px; }
.bw-wall .band { fill: var(--heat-1); }
.bw-wall .line { fill: none; stroke: var(--leaf); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-wall .moved .band { fill: var(--line); }
.bw-wall .moved .line { stroke: var(--ink); }
.bw-wall .worse .line { stroke: var(--rust); }
.bw-wall span.none { display: block; height: 8px; margin: 9px 0; border-radius: 4px; background: var(--dither); }
.bw-wall small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-wall small::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 1.5px; background: var(--moss); }
.bw-wall .moved small { color: var(--ink); }
.bw-wall .moved small::before { background: var(--ink); }
.bw-wall .worse small { color: var(--rust); }
.bw-wall .worse small::before { background: var(--rust); }

.bw-spread .plot { position: relative; height: 150px; margin-top: 26px; }
.bw-spread svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-spread .area { fill: var(--leaf); fill-opacity: .14; }
.bw-spread svg.half .area { fill-opacity: .3; }
.bw-spread .line { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bw-spread .mark { position: absolute; top: -8px; bottom: 0; border-left: 1.5px solid var(--ink); }
.bw-spread .mark.nine { border-left: 1px solid var(--text-3); }
.bw-spread .mark b { position: absolute; top: -18px; transform: translateX(-50%); font: 600 12px/1 var(--sans); letter-spacing: 0; white-space: nowrap; }
.bw-spread .mark.nine b { font-weight: 500; color: var(--text-2); }
.bw-spread .axis { position: relative; height: 20px; margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--edge); font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-spread .axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.bw-spread .axis span:first-child { transform: none; }
.bw-spread .axis span:last-child { transform: translateX(-100%); }

.bw-parts { display: grid; gap: 14px; }
.bw-parts > div { display: grid; gap: 6px; }
.bw-parts .n { font-size: var(--t-small); font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.bw-parts .bar { display: flex; gap: 2px; height: 34px; }
.bw-parts .bar i { display: flex; align-items: center; min-width: 0; padding: 0 10px; overflow: hidden; background: var(--pill); color: var(--ink); font: 600 var(--t-small)/1 var(--sans); font-style: normal; letter-spacing: 0; white-space: nowrap; }
.bw-parts .bar i:first-child { border-radius: 8px 0 0 8px; background: var(--part-2); color: var(--on-strong); }
.bw-parts .bar.lead i:first-child { background: var(--ink); color: var(--sheet); }
.bw-parts .bar i:last-child { justify-content: flex-end; border-radius: 0 8px 8px 0; }

/* ---------- then and now (analytics-live.tsx), and counts per day ---------- */

.bw-thennow .plot:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 6px; border-radius: 2px; }

.bw-thennow .plot { position: relative; height: var(--h); margin: 0 92px 0 40px; }
.bw-thennow .tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.bw-thennow .tick small { position: absolute; left: -40px; transform: translateY(-50%); font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-thennow svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bw-thennow .wash { fill: var(--leaf); fill-opacity: .1; }
.bw-thennow .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-thennow .line.now { stroke: var(--ink); }
.bw-thennow .line.before { stroke: var(--compare); stroke-width: 1.75; }
.bw-thennow .hair { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ink); pointer-events: none; }
.bw-thennow .dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--sheet); pointer-events: none; }
.bw-thennow .dot.before { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--compare); }
.bw-thennow .tip { position: absolute; top: 8px; z-index: 2; display: grid; gap: 2px; padding: 9px 11px; border-radius: var(--r-l); background: var(--sheet); box-shadow: var(--sh-raised); white-space: nowrap; pointer-events: none; transform: translateX(14px); }
.bw-thennow .tip.flip { transform: translateX(calc(-100% - 14px)); }
.bw-thennow .tip small { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-thennow .tip > span { display: flex; align-items: center; gap: 8px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-thennow .tip b { min-width: 52px; font: 600 var(--t-heading)/1.3 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.bw-thennow .tip i { width: 12px; height: 2px; border-radius: 1px; background: var(--ink); }
.bw-thennow .tip i.before { background: var(--compare); }
.bw-thennow .end { position: absolute; right: -92px; transform: translateY(-50%); display: grid; padding-left: 12px; font-size: var(--t-small); line-height: 1.25; color: var(--text-3); letter-spacing: 0; }
.bw-thennow .end b { font: 600 var(--t-heading)/1.2 var(--sans); color: var(--ink); }
.bw-thennow .end.before b { color: var(--text-2); }
.bw-thennow .hits { position: absolute; inset: 0; display: flex; }
.bw-thennow .hits i { flex: 1 1 0; }
.bw-thennow .axis { display: flex; justify-content: space-between; margin: 8px 92px 0 40px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
@media (max-width: 640px) {
  .bw-thennow :is(.plot, .axis) { margin-right: 64px; margin-left: 34px; }
  .bw-thennow .end { right: -64px; }
  .bw-thennow .tick small { left: -34px; }
}

.bw-daily .plot { position: relative; height: 150px; margin-right: 44px; }
.bw-daily .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.bw-daily .grid:first-child { border-top-color: var(--edge); }
.bw-daily .grid small { position: absolute; right: -44px; transform: translateY(-50%); padding-left: 8px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); font-variant-numeric: tabular-nums; }
.bw-daily .cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.bw-daily .cols > span { position: relative; flex: 1 1 0; min-width: 0; border-radius: 2px 2px 0 0; background: var(--leaf); }
.bw-daily .cols > span.today { background: var(--dither-held); box-shadow: inset 0 0 0 1px var(--held); }
.bw-daily .cols > span:hover { z-index: 2; background: var(--ink); }
.bw-daily .cols > span.today:hover { background: var(--dither-held); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bw-daily .cols .bw-tip { display: none; top: auto; bottom: calc(100% + 8px); }
.bw-daily .cols > span:hover > .bw-tip { display: block; }
/* the 7-day average, over the columns */
.bw-daily .plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bw-daily .plot > svg path { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-daily .axis { position: relative; height: 16px; margin: 8px 44px 0 0; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); }
.bw-daily .axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* ---------- changes: tiles, lanes, impact, moves ---------- */

.bw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bw-tiles > .bw-card { padding: 14px 16px 16px; }
.bw-tiles > .bw-card h3 { font: 500 var(--t-small)/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-tiles > .bw-card .bw-headline { margin-top: 4px; }
.bw-tiles > .bw-card > .body { margin-top: 8px; }
.bw-tiles .bw-spark { width: 100%; height: 40px; }   /* a tile's line runs the tile's width */

/* how a set of changes ended: the count, one bar in the result marks' fills, the key that picks a result */
.bw-ended .bw-headline { margin-top: 0; }
.bw-ended .bw-stack { height: 10px; margin-top: 14px; }
.bw-ended > .bw-tabs { margin: 10px 0 0 -10px; }
.bw-filters + .bw-ended { margin-top: 28px; }

/* lanes: ruled apart, the head on the first row's line, one today line down every lane */
.bw-lanes-box { overflow-x: auto; }
.bw-lanes { min-width: 760px; }
.bw-lanes .lane { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; width: 100%; padding: 8px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; letter-spacing: inherit; text-align: left; text-decoration: none; }
.bw-lanes > .lane:first-child { border-top: 0; }
.bw-lanes button.lane { cursor: pointer; }
@media (hover: hover) { .bw-lanes button.lane:hover { background: var(--wash); } }
.bw-lanes .lane.on { background: var(--wash); }
.bw-lanes .head { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 20px; font-size: var(--t-small); line-height: 20px; }
.bw-lanes .head .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-lanes .lane.on .head .name { font-weight: 600; }
.bw-lanes .track { position: relative; display: flex; flex-direction: column; gap: 6px; align-self: stretch; padding: 6px 0; }
.bw-lanes .track::after { content: ""; position: absolute; top: -8px; bottom: -8px; left: var(--today); border-left: 1px solid var(--edge-hover); }
.bw-lanes .row { position: relative; z-index: 1; height: 8px; }
.bw-lanes .row:has(.lbl) { height: 20px; }
.bw-lanes .row:first-child:has(.lbl) { margin-top: -6px; }
.bw-lanes .row:last-child:has(.lbl) { margin-bottom: -6px; }
.bw-lanes :is(.bar, .sq) { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 2px; background: var(--moss); }
.bw-lanes .sq { width: 8px; margin-left: -4px; }
.bw-lanes :is(.bar, .sq).helped { background: var(--own); }
.bw-lanes :is(.bar, .sq).undone { background: var(--rust); }
.bw-lanes :is(.bar, .sq).waiting { background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink); }
.bw-lanes :is(.bar, .sq).first { background: var(--gold); box-shadow: none; }
.bw-lanes :is(.bar, .sq).test { background: linear-gradient(90deg, var(--own) calc(var(--p, 50) * 1%), var(--sheet) 0); box-shadow: inset 0 0 0 1.5px var(--own); }
.bw-lanes .bar.setup { box-sizing: border-box; border: 1.5px dashed var(--faint); background: var(--sheet); }
.bw-lanes .lbl { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 600 var(--t-small)/1 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-lanes .lbl:is(.helped, .test) { color: var(--own); }
.bw-lanes .lbl.undone { color: var(--rust); }
.bw-lanes .lbl.waiting { color: var(--ink); }
.bw-lanes .lbl.first { color: var(--gold-ink); }
.bw-lanes .lane.line { padding-top: 6px; padding-bottom: 6px; }
.bw-lanes .line .head.axis { position: relative; align-self: stretch; justify-content: flex-end; }
.bw-lanes .line .axis i { position: absolute; right: 0; transform: translateY(-50%); font: 500 var(--t-micro)/1 var(--sans); font-style: normal; color: var(--text-3); letter-spacing: 0; }
.bw-lanes .line .track { height: 120px; padding: 0; }
.bw-lanes .line .track::after { top: -6px; bottom: -6px; }
.bw-lanes .line svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; }
.bw-lanes .line .usual { fill: var(--g-tint); }
.bw-lanes .line path { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-lanes .line .end { position: absolute; z-index: 1; left: calc(var(--today) + 8px); transform: translateY(-50%); padding: 0 6px; border-radius: var(--r-badge); background: var(--sheet); font: 600 var(--t-small)/1.5 var(--sans); letter-spacing: 0; }
.bw-lanes .ticks { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 0 8px; }
.bw-lanes .ticks .at { position: relative; height: 22px; border-top: 1px solid var(--line); }
.bw-lanes .ticks i { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; font: 500 var(--t-micro)/1.3 var(--sans); font-style: normal; color: var(--text-3); letter-spacing: 0; }
.bw-lanes .ticks i:first-child { transform: none; }
.bw-lanes .ticks i.now { font-weight: 600; color: var(--ink); }

.bw-impact { position: relative; display: block; height: 20px; }
.bw-impact::before { content: ""; position: absolute; top: -4px; bottom: -4px; left: 50%; border-left: 1px solid var(--edge-hover); }
.bw-impact > i { position: absolute; top: 3px; height: 14px; background: var(--moss); }
.bw-impact > i.pos { border-radius: 0 3px 3px 0; }
.bw-impact > i.neg { border-radius: 3px 0 0 3px; }
.bw-impact.good > i { background: var(--own); }
.bw-impact.bad > i { background: var(--rust); }
.bw-impact.cut > i { border-radius: 0; }
.bw-impact-ax { display: flex; justify-content: space-between; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-impact-ax i { font-style: normal; }
.bw-impact.slot > i { left: 50%; width: 46%; top: 4px; height: 12px; box-sizing: border-box; border: 1.5px dashed var(--held); border-radius: 3px; background: none; }

/* the other numbers (UpDown, MoveTally, Moves, MovesStrip): how many got better and worse; a cell per number, the
   kinds side by side, under them a key with each kind's count; the ones that moved as rows on a worse-to-better axis;
   the steady ones by name */
.bw-updown { display: inline-flex; gap: .45em; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-updown > b { font-weight: inherit; }
.bw-updown > .good { color: var(--own); }
.bw-updown > .bad { color: var(--rust); }

.bw-movetally .cells { display: flex; gap: 3px; }
.bw-movetally .cells i { flex: 1 1 0; max-width: 40px; height: 18px; border-radius: 3px; }
.bw-movetally i { background: var(--moss); }
.bw-movetally i.good { background: var(--own); }
.bw-movetally i.expected { background: var(--ink); }
.bw-movetally i.bad { background: var(--rust); }
.bw-movetally .key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 9px; font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-movetally .key > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bw-movetally .key i { flex: none; width: 9px; height: 9px; border-radius: 2.5px; }
.bw-movetally .key b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.bw-moves > .movers { --cols: minmax(0, 1.3fr) minmax(0, 1.7fr) 52px; margin-top: 22px; }
.bw-moves > .movers.lines { --cols: minmax(0, 1.3fr) 76px minmax(0, 1.7fr) 52px; }
.bw-moves > .movers.values { --cols: minmax(0, 1.3fr) 132px minmax(0, 1.7fr) 52px; }
.bw-moves > .movers.lines.values { --cols: minmax(0, 1.3fr) 76px 132px minmax(0, 1.7fr) 52px; }
.bw-moves .movers :is(.ax, li) { display: grid; grid-template-columns: var(--cols); gap: 18px; align-items: center; }
.bw-moves .ax > span { grid-column: -3 / -2; display: flex; justify-content: space-between; padding-bottom: 5px; font: 500 var(--t-micro)/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-moves .ax i { font-style: normal; }
.bw-moves .movers li { height: 46px; border-top: 1px solid var(--line); }
.bw-moves .n { min-width: 0; line-height: 1.3; }
.bw-moves .n > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-moves .n b { font-weight: 500; }
.bw-moves .n span { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-moves .sp { display: block; width: 100%; height: 24px; overflow: visible; }
.bw-moves .sp path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bw-moves .sp.good path { stroke: var(--own); }
.bw-moves .sp.bad path { stroke: var(--rust); }
.bw-moves .ba { font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bw-moves .ba b { font-weight: 500; color: var(--ink); }
.bw-moves .ba i { display: inline-block; width: 10px; height: 1px; margin: 0 7px; vertical-align: 4px; background: var(--compare); }
/* worse to better: the usual wobble shaded either side of the middle, the bar from the middle toward where it went */
.bw-moves .bar { position: relative; align-self: stretch; background: linear-gradient(90deg, transparent calc(50% - var(--usual)), var(--leaf-pale) 0 calc(50% + var(--usual)), transparent 0); }
.bw-moves .bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--edge-hover); }
.bw-moves .bar i { position: absolute; top: 50%; height: 14px; margin-top: -7px; border-radius: 3px; background: var(--moss); }
.bw-moves .bar i.good { background: var(--own); }
.bw-moves .bar i.expected { background: var(--ink); }
.bw-moves .bar i.bad { background: var(--rust); }
.bw-moves .v { text-align: right; font: 600 14px/1 var(--sans); font-variant-numeric: tabular-nums; }
.bw-moves .v.good { color: var(--own); }
.bw-moves .v.bad { color: var(--rust); }
.bw-moves > .steady { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bw-moves > .movers + .steady { margin-top: 0; }
.bw-moves .steady .h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bw-moves .steady .h i { flex: none; width: 9px; height: 9px; border-radius: 2.5px; background: var(--moss); }
.bw-moves .steady .h b { font-weight: 500; }
.bw-moves .steady .h span { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-moves .steady ul { columns: 5 164px; column-gap: 30px; }
.bw-moves .steady li { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 26px; break-inside: avoid; font-size: var(--t-small); color: var(--text-2); letter-spacing: 0; white-space: nowrap; }
.bw-moves .steady li span { overflow: hidden; text-overflow: ellipsis; }
.bw-moves .steady em { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* on a phone the line and the before and now give way: the name, the bar and the move stay */
@media (max-width: 720px) {
  .bw-moves > .movers, .bw-moves > .movers.lines, .bw-moves > .movers.values, .bw-moves > .movers.lines.values { --cols: minmax(0, 1.3fr) minmax(0, 1fr) 52px; }
  .bw-moves :is(.sp, .ba, .ax i:nth-child(2)) { display: none; }
}

.bw-wall small.good { color: var(--own); }
.bw-wall small.good::before { background: var(--own); }
.bw-wall small.bad { color: var(--rust); }
.bw-wall small.bad::before { background: var(--rust); }

/* Change rows (a loop's Changes, the company's Changes): date, the change with its tags, its effect from zero, the
   number and its status; a loop's rows open in place. */
.bw-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bw-changes { --cols: 56px minmax(0, 1fr) 220px 76px 16px; }
.bw-changes.all { --cols: 56px minmax(0, 1fr) 220px 104px; }
.bw-changes section > h3 { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: end; margin: 18px 0 4px; padding: 0 8px; font: 500 12px/1.3 var(--sans); color: var(--text-3); letter-spacing: 0; }
.bw-changes section:first-child > h3 { margin-top: 0; }
.bw-changes section > h3 > span { grid-column: 1 / 3; }
.bw-changes section > h3 > .bw-impact-ax { grid-column: 3; }
.bw-changes section > h3.gold { color: var(--gold-ink); }
.bw-changes .r { border-top: 1px solid var(--line); }
.bw-changes .r.open { background: color-mix(in srgb, var(--wash) 55%, var(--sheet)); }
.bw-changes .head { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: center; width: 100%; min-height: 54px; padding: 8px; border: 0; background: none; color: var(--ink); font: inherit; letter-spacing: inherit; text-align: left; text-decoration: none; cursor: pointer; }
@media (hover: hover) { .bw-changes .head:hover { background: var(--wash); } }
.bw-changes .date { font-size: var(--t-small); color: var(--text-3); letter-spacing: 0; }
.bw-changes .what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bw-changes .what > b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bw-changes .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.bw-changes .what > .bw-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-changes .impact .bw-days { width: 46%; margin-left: 50%; }
.bw-changes .v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; text-align: right; }
.bw-changes .v > b { font: 600 var(--t-heading)/1.3 var(--sans); color: var(--text-3); letter-spacing: -.012em; }
.bw-changes .v.good > b { color: var(--own); }
.bw-changes .v.bad > b { color: var(--rust); }
.bw-changes .v > small { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); color: var(--text-3); letter-spacing: 0; }
.bw-changes .v > small.gold { color: var(--gold-ink); font-weight: 600; }
.bw-changes .chev { color: var(--text-3); transition: transform var(--fast); }
.bw-changes .r.open .chev { transform: rotate(180deg); }
.bw-changes .body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 32px; padding: 4px 16px 20px 80px; }
.bw-changes .body .k { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.bw-changes .body .learned { font-weight: 500; }
.bw-changes .body .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bw-changes .body .bw-meta { margin-top: 8px; }
.bw-changes > .none { padding: 16px 8px; border-top: 1px solid var(--line); color: var(--text-3); }
@media (max-width: 760px) {
  .bw-changes, .bw-changes.all { --cols: minmax(0, 1fr) 76px; }
  .bw-changes :is(.date, .impact, .chev, .bw-impact-ax) { display: none; }
  .bw-changes .body { padding-left: 8px; }
}
.bw-card > .body:empty { display: none; }

.bw-movestrip { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bw-movestrip .t { display: flex; flex-direction: column; line-height: 1.3; color: var(--ink); text-decoration: none; }
.bw-movestrip .t b { font-weight: 600; }
.bw-movestrip .t span { font-size: 12px; color: var(--text-3); letter-spacing: 0; }
@media (hover: hover) { .bw-movestrip a.t:hover b { text-decoration: underline; } }
.bw-movestrip .bw-movetally .cells i { height: 14px; }
.bw-movestrip .bw-movetally .key { margin-top: 7px; }
.bw-movestrip > .bw-updown { font: 600 var(--t-heading)/1.3 var(--sans); }
@media (max-width: 640px) { .bw-movestrip { grid-template-columns: minmax(0, 1fr) auto; } .bw-movestrip > .bw-movetally { grid-column: 1 / -1; grid-row: 2; } }
