/* file: css/books-prelim.css */
/* books-prelim.css: the FY2026 preliminary balance sheet on The Books (js/books-prelim.js, docs/BALANCE_PRELIM.md).
   Since the v11 rebuild the preliminary lines are drawn by js/books-home.js inside What he owes / What he owns, with the same
   flat bars as the audited lines (owner, Nov 14: no patterns, keep it simple; css/books-deep.css). This file styles the text
   badges and the "How we estimated this" sheet. Tokens only (--pk-*, which flip for dark mode by themselves); sizes in rem;
   tap targets >= var(--pk-tap) (44px). */

/* R4 (rough pass, Nov 16): the Books lane's tags are the one certainty tag, R2's .bb-tag (css/tokens-ext.css): caption size, weight 600,
   muted ink, no box, a leading 8px dot (filled = Close, hollow = Estimate); Actual and Audited carry no tag. The same rule is repeated
   here, scoped to the Books screens' own classes, so these screens read right on a build where R2's file hasn't landed yet; once it
   has, the two rules agree. The old .bkp-badge (still used by other lanes' files until they swap) takes the same look. */
.bb-tag,.bkp-badge{display:inline-flex;align-items:center;gap:5px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--bb-muted);
  font:600 var(--bb-fs-caption)/1.3 var(--bb-font-body);letter-spacing:0;text-transform:none;white-space:nowrap;vertical-align:baseline;cursor:inherit;user-select:none;-webkit-user-select:none}
.bb-tag::before,.bkp-badge::before{content:"";flex:none;width:8px;height:8px;box-sizing:border-box;border:1.5px solid currentColor;border-radius:var(--bb-radius-pill);background:currentColor}
.bb-tag--estimate::before,.bkp-badge--estimate::before{background:transparent}
.bb-tag--actual,.bb-tag--audited,.bkp-badge--actual,.bkp-badge--audited{display:none}
@media (forced-colors: active){ .bb-tag::before,.bkp-badge::before{border-color:CanvasText} }
.bkp-how__word{font-weight:600}

.bkp-howbtn{display:inline-flex;align-items:center;align-self:flex-start;min-height:var(--pk-tap);padding:0 0.25rem;border:0;background:none;color:var(--pk-link);
  font:600 var(--pk-fs-body)/1.3 var(--pk-font-body);text-decoration:underline;text-underline-offset:0.2em;cursor:pointer}
.bkp-howbtn:focus-visible{outline:0.1875rem solid var(--pk-focus);outline-offset:0.125rem}

/* the "How we estimated this" sheet */
.bkp-how{display:flex;flex-direction:column;gap:0.75rem;color:var(--pk-text);font:400 var(--pk-fs-small)/1.5 var(--pk-font-body)}
.bkp-how p{margin:0}
.bkp-how__lead{font-size:var(--pk-fs-body)}
.bkp-how__meta,.bkp-how__tot{color:var(--pk-muted)}
.bkp-how__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.75rem}
.bkp-how__item{padding:0.75rem 0 0;border-top:var(--pk-hair);scroll-margin-top:1rem}
.bkp-how__item:focus{outline:0}
.bkp-how__item:focus-visible{outline:0.1875rem solid var(--pk-focus);outline-offset:0.25rem}
.bkp-how__h{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin:0 0 0.25rem;font:700 var(--pk-fs-body)/1.3 var(--pk-font-body)}
.bkp-how__v b{font-size:var(--pk-fs-body);color:var(--pk-key)}
.bkp-how__k{font-weight:700}
.bkp-how__sure{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}
.bkp-how__src ul{margin:0.25rem 0 0;padding-left:1.25rem}
.bkp-how__src li{overflow-wrap:anywhere}
.bkp-how a{color:var(--pk-link);text-underline-offset:0.2em}
.bkp-how__src a{display:flex;align-items:center;min-height:var(--pk-tap);padding:0.25rem 0;line-height:1.35}
.bkp-how__src li{padding:0 0 0.25rem}
.bkp-how__q{display:grid;grid-template-columns:auto 1fr;gap:0.5rem 0.75rem;align-items:center;margin:0}
.bkp-how__q dd{margin:0}
.bkp-how__q dt{font-weight:600}
/* "The math": a disclosure row, closed until asked for (R4) */
.bkp-how__math > summary{display:flex;align-items:center;gap:.375rem;min-height:var(--pk-tap);cursor:pointer;font-weight:600;color:var(--pk-link);list-style:none}
.bkp-how__math > summary::-webkit-details-marker{display:none}
.bkp-how__math > summary::after{content:"›";content:"›" / "";font-size:var(--bb-fs-title3);line-height:1;transition:none}
.bkp-how__math[open] > summary::after{transform:rotate(90deg)}
.bkp-how__math > p{margin:0 0 .25rem}
.bkp-howinline > summary{min-height:var(--pk-tap);display:flex;align-items:center;cursor:pointer;font-weight:700}
.bkp-how__srcmeta{display:block;color:var(--pk-muted)}

/* BB-424 and BB-427 (Nov 20): The Books' home (the federal report in its order, the auditor's verdict, the year row, the receipt card)
   and This year's money's two cards and three groups. Tokens only, so Light and Night follow the theme. */
.bkv-stm .bkv-stm__h { margin-top: 1.5rem; }
.bkv-arm--books > .bkv-cards + .bkv-cards, .bkv-arm--books > .bkv-stm + .bkv-cards { margin-top: .625rem; }
.bkv-verdicts { margin-top: .625rem; }
button.bkv-verdict { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.bkv-verdict-sheet .bkv-verdict__p { margin: 0 0 .75rem; font: 400 var(--bb-fs-body, 1rem)/1.45 var(--bb-font-body); color: var(--bb-ink); }
.bkv-verdict-sheet .bkv-src a { color: var(--bb-green); }
.bkv-yearpick .bkv-card__t { color: var(--bb-ink); }
.bkv-receipt { position: relative; display: grid; gap: .25rem; margin-top: .875rem; padding: 1rem 2.5rem 1rem 1.0625rem; border: 1px solid var(--bb-gold-text);
  border-radius: var(--bb-radius-card); background: var(--bb-card); color: var(--bb-ink); text-decoration: none; }
.bkv-receipt .bkv-chev { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }
.bkv-receipt__t { font: 700 var(--bb-fs-title3)/1.2 var(--bb-font-display); }
.bkv-receipt__s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
.bkv-receipt:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-bigcard { border-color: var(--bb-gold-text); min-height: 5rem; }
.bkv-bigcard__k { font: 600 .75rem/1.3 var(--bb-font-body); letter-spacing: .08em; text-transform: uppercase; }
.bkv-groups { margin-top: .625rem; }
.bkv-group > summary { list-style: none; cursor: pointer; }
.bkv-group > summary::-webkit-details-marker { display: none; }
.bkv-group[open] > summary .bkv-group__chev { transform: rotate(90deg); }
.bkv-group__list { margin: .5rem 0 0 .75rem; }

/* file: css/books-deep.css */
/* BooksDeep (js/books-deep.js): The Books goes deep. Tokens only (css/tokens.css, tokens-ext.css, motion.css, motion-ext.css).
   Learning-motion tokens (MOTION_SPEC v6, "Learning motions for The Books"), all built on --m-press so they don't drift.
   Reduced motion is handled in JS (the sheets fade with --m-fade, charts appear complete, steppers are instant). */
:root {
  --m-bk-word: var(--m-press);                        /* 150ms word highlight, --e-standard */
  --m-bk-dim: calc(var(--m-press) * 4 / 3);           /* 200ms background dims */
  --m-bk-sheet: calc(var(--m-press) * 2);             /* 300ms sheet rises, --e-enter */
  --m-bk-sheet-close: calc(var(--m-press) * 4 / 3);   /* 200ms sheet leaves, --e-exit */
  --m-bk-line: calc(var(--m-press) * 4);              /* 600ms trend line (clip-path reveal), --e-standard */
  --m-bk-point: var(--m-press);                       /* 150ms point pop, spring keyframes */
  --m-bk-point-stagger: calc(var(--m-press) * 8 / 5); /* 240ms between points */
  --m-bk-label: calc(var(--m-press) * 4 / 3);         /* 200ms labels */
  --m-bk-ref: calc(var(--m-press) * 2);               /* 300ms reference line */
  --m-bk-src-pause: var(--m-press);                   /* 150ms pause before the official line highlights */
  --m-bk-src-hl: calc(var(--m-press) * 5 / 3);        /* 250ms official line highlight */
  --m-bk-press: var(--m-press);                       /* 150ms answer press */
  --m-bk-green: calc(var(--m-press) * 4 / 3);         /* 200ms right answer turns green */
  --m-bk-explain: calc(var(--m-press) * 5 / 3);       /* 250ms explanation opens, --e-enter */
  --m-bk-out: calc(var(--m-press) * 4 / 3);           /* 200ms page out right, --e-exit */
  --m-bk-in: calc(var(--m-press) * 2);                /* 300ms parent in from left, --e-enter */
  --m-bk-step-press: calc(var(--m-press) * 4 / 5);    /* 120ms stepper press */
  --m-bk-count: calc(var(--m-press) * 4 / 3);         /* 200ms count rolls */
  --m-bk-totals: calc(var(--m-press) * 5 / 3);        /* 250ms totals roll */
  --bd-tint: color-mix(in srgb, var(--bb-paper-edge) 70%, var(--bb-rule));
  --bd-chip: color-mix(in srgb, var(--bb-paper-edge) 75%, var(--bb-paper));
  --bd-hl: color-mix(in srgb, var(--bb-gold) 22%, var(--bb-card));
  --bd-right: color-mix(in oklab, var(--bb-green) 11%, color-mix(in srgb, var(--bb-paper) 40%, var(--bb-card)));
  --bd-series2: var(--bb-gold);
  --bd-scrim: color-mix(in srgb, var(--bb-ink) 45%, transparent);
}
:root[data-theme="dark"], .bb-dark {
  --bd-tint: color-mix(in srgb, var(--bb-rule) 80%, var(--bb-paper));
  --bd-chip: var(--bb-card);
  --bd-hl: color-mix(in srgb, var(--bb-gold) 22%, var(--bb-card));
  --bd-right: color-mix(in srgb, var(--bb-green) 16%, var(--bb-card));
  --bd-scrim: color-mix(in srgb, var(--bb-paper-edge) 70%, transparent);
  --bd-series2: var(--bb-muted);
}
/* "Right answer turns green" (MOTION_SPEC v6) in BOTH themes, as in books-lesson-quiz-{light,dark}: dark mode maps --bb-green to gold,
   so the green comes from --bb-green-deep (the same in both themes), lightened in OKLCH. Browsers without relative colors keep the line above. */
@supports (color: oklch(from currentColor l c h)) { /* token-exception: colours derived from --bb-green-deep */
  :root { --bd-right: oklch(from var(--bb-green-deep) .954 calc(c / 2) h); --bd-right-edge: oklch(from var(--bb-green-deep) .504 calc(c * 2.7) h); } /* token-exception: colours derived from --bb-green-deep */
  :root[data-theme="dark"], .bb-dark { --bd-right: oklch(from var(--bb-green-deep) calc(l + .026) calc(c * 1.4) h); --bd-right-edge: oklch(from var(--bb-green-deep) .504 calc(c * 2.7) h); } /* token-exception: colours derived from --bb-green-deep */
}

.bd-root { color: var(--bb-ink); font-family: var(--bb-font-body); font-size: var(--bb-text-body); line-height: 1.5; }
.bd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.bd-page { max-width: 40rem; margin: 0 auto; padding: 0 1rem 2.5rem; overflow-x: clip; }
.bd-page--embedded { padding: 0; }
:where(.bd-page) a { color: inherit; }
.bd-page :focus-visible, .bd-sheet :focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }

/* top bar */
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.5rem; margin: 0 -1rem .75rem; padding: .25rem 1rem; border-bottom: 1px solid var(--bb-rule); }
.bd-top__back, .bd-top__act { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font: 600 var(--bb-fs-body)/1.2 var(--bb-font-body); color: var(--bb-muted); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.bd-top__act { font-weight: 500; }
html body .bd-top__title, html body .bd-lesson-h { margin: 0; font: 700 var(--bb-fs-body)/1.2 var(--bb-font-display); color: var(--bb-ink); text-align: center; }
.bd-top__count { color: var(--bb-muted); font-weight: 600; white-space: nowrap; }
.bd-top--center > :last-child { min-width: 44px; }

/* breadcrumb */
.bd-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 .25rem; padding: 0; font: 600 var(--bb-fs-callout)/1.3 var(--bb-font-body); color: var(--bb-muted); }
.bd-crumbs li { display: inline-flex; align-items: center; }
.bd-crumbs li + li::before { content: "\203A"; margin: 0 .35em; }
.bd-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; }   /* Claude's suggestion, not approved (BB-432 round 2): D-42's short "Audit" crumb was 39px wide */
.bd-crumbs a:hover { text-decoration: underline; }
.bd-crumbs [aria-current] { display: inline-flex; align-items: center; min-height: 44px; }

html body .bd-eyebrow { display: block; margin: 0 0 .35rem; font: 600 var(--bb-text-label)/1.3 var(--bb-font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--bb-gold-text); }
html body .bd-h1 { margin: .25rem 0 .5rem; }
html body .bd-h1--title { font: 700 var(--bb-fs-title1)/1.12 var(--bb-font-display); letter-spacing: -.01em; }
html body .bd-h1__eyebrow { margin-bottom: .25rem; }
.bd-value { display: block; font: 700 var(--bb-fs-large-title)/1.05 var(--bb-font-display); letter-spacing: -.015em; color: var(--bb-ink); }
.bd-sub { margin: .25rem 0 .5rem; font-size: var(--bb-fs-body); line-height: 1.45; color: var(--bb-muted); }
.bd-official { margin: 0 0 1rem; font-size: var(--bb-fs-subhead); color: var(--bb-muted); }
.bd-official__t { color: var(--bb-ink); font-weight: 500; }
.bd-lead { font-size: var(--bb-fs-body); line-height: 1.6; margin: 0; }

/* two-year bars */
.bd-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1.5rem; }
.bd-bar { display: flex; flex-direction: column; align-items: stretch; }
.bd-bar__track { height: 4.5rem; display: flex; align-items: flex-end; }
.bd-bar__track i { display: block; width: 100%; background: var(--bd-tint); border-radius: var(--bb-radius-button) var(--bb-radius-button) 0 0; }
.bd-bar.is-cur .bd-bar__track i { background: var(--bb-green); }
.bd-bar__lab { margin-top: .5rem; text-align: center; color: var(--bb-muted); font-variant-numeric: tabular-nums; }

/* trend */
.bd-trend { position: relative; margin: .5rem 0 1.5rem; }
.bd-trend__svg { display: block; width: 100%; height: auto; overflow: visible; }
.bd-trend__axis { stroke: var(--bb-rule); stroke-width: 1; }
.bd-trend__line polyline { fill: none; stroke: var(--bb-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bd-trend__line--1 polyline { stroke: var(--bd-series2); }
.bd-trend__pt { fill: var(--bb-green); transform-box: fill-box; transform-origin: center; }
.bd-trend__pt--1 { fill: var(--bd-series2); }
.bd-trend__val { font: 600 var(--bb-fs-caption) var(--bb-font-body); fill: var(--bb-ink); }
.bd-trend__ref line { stroke: var(--bb-gold); stroke-width: 1.25; stroke-dasharray: 5 5; }
.bd-trend__ref text { font: 500 var(--bb-fs-caption) var(--bb-font-body); fill: var(--bb-gold-text); }
.bd-trend.is-waiting .bd-trend__line { clip-path: inset(0 100% 0 0); }
.bd-trend.is-waiting .bd-trend__pt, .bd-trend.is-waiting .bd-trend__val, .bd-trend.is-waiting .bd-trend__ref { opacity: 0; }
.bd-trend__years { position: relative; height: 1.75rem; color: var(--bb-muted); font-size: var(--bb-fs-subhead); }
.bd-trend__years span { position: absolute; top: 0; transform: translateX(-50%); }
.bd-trend__legend { display: flex; gap: 1.25rem; list-style: none; padding: 0; margin: .25rem 0 0; color: var(--bb-muted); font-size: var(--bb-fs-subhead); }
.bd-key { display: inline-block; width: 1rem; height: 3px; margin-right: .4rem; vertical-align: middle; background: var(--bb-green); border-radius: var(--bb-radius-button); }
.bd-key--1 { background: var(--bd-series2); }
.bd-gaps { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-variant-numeric: tabular-nums; }
html body .bd-gaps caption { text-align: left; }
.bd-gaps th, .bd-gaps td { padding: .5rem 0; border-bottom: 1px solid var(--bb-rule); text-align: left; font-weight: 500; }
.bd-gaps .num { text-align: right; }

/* cards */
.bd-card { background: var(--bb-card); border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); padding: 1.25rem 1.5rem; margin: 0 0 1.25rem; }
.bd-explain p { margin: 0 0 1rem; font-size: var(--bb-text-body); line-height: 1.55; }
.bd-explain p:last-child { margin-bottom: 0; }
html body .bd-explain .bd-eyebrow { margin-top: .25rem; }

/* dotted words */
.bd-term { position: relative; display: inline; font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  text-decoration: underline dotted var(--bb-ink); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.bd-term::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 44px; transform: translateY(-50%); }   /* 44px tap target */
.bd-term__hl { position: absolute; inset: -1px -3px; border-radius: var(--bb-radius-button); background: var(--bd-hl); opacity: 0; z-index: -1; }
.bd-term.is-on .bd-term__hl { opacity: 1; }
.bd-term { isolation: isolate; }

/* keep learning */
.bd-keep { margin: 1.75rem 0 1.25rem; }
.bd-chips { display: flex; flex-wrap: wrap; gap: .625rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.bd-chip { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1.1rem; border-radius: var(--bb-radius-button); background: var(--bd-chip); border: 1px solid transparent; font-weight: 600; text-decoration: none; }
:root[data-theme="dark"] .bd-chip { border-color: var(--bb-rule); }
.bd-chip:hover { border-color: var(--bb-gold); }

/* source row */
.bd-srcrow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t c" "s c"; align-items: center; gap: .15rem .75rem; width: 100%; min-height: 44px; text-align: left;
  margin: 1.25rem 0; padding: 1.1rem 1.4rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: transparent; color: var(--bb-ink); font: inherit; cursor: pointer; }
.bd-srcrow__t { grid-area: t; font: 800 var(--bb-fs-title3)/1.25 var(--bb-font-body); }
.bd-srcrow__s { grid-area: s; color: var(--bb-muted); }
.bd-srcrow__chev, .bd-row__chev { grid-area: c; font-size: var(--bb-fs-title2); color: var(--bb-muted); }
.bd-foot { margin: 0; }
.bd-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bb-muted); font-weight: 600; }

/* rows (hub, sections) */
.bd-rows { list-style: none; padding: 0; margin: 1rem 0; }
.bd-row { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "t v c" "s v c"; align-items: center; gap: .1rem .75rem; min-height: 44px; padding: .9rem 0; border-bottom: 1px solid var(--bb-rule); text-decoration: none; }
.bd-row__t { grid-area: t; font-weight: 600; font-size: var(--bb-fs-body); }
.bd-row__s { grid-area: s; color: var(--bb-muted); font-size: var(--bb-fs-subhead); }
.bd-row__v { grid-area: v; font: 700 var(--bb-fs-body) var(--bb-font-body); font-variant-numeric: tabular-nums lining-nums; }   /* v38 part 10 (item 8): Fraunces has no even-width figures, so number columns use Inter */

/* lesson stop + quiz */
.bd-lessonstop__t { margin: 0 0 .75rem; }
.bd-lessonstop__t a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
html body .bd-quiz .bd-eyebrow { margin-top: .5rem; }
html body .bd-quiz__q { margin: 0 0 1rem; font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); }
html body .bd-lessonstop .bd-quiz__q { font-size: var(--bb-fs-title2); }
.bd-quiz__opts { display: grid; gap: .75rem; }
.bd-opt { position: relative; isolation: isolate; display: flex; align-items: center; gap: .4rem; min-height: 3.5rem; width: 100%; padding: .75rem 1.1rem; text-align: left;
  border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); color: var(--bb-ink); font: 600 var(--bb-text-body)/1.3 var(--bb-font-body); cursor: pointer; overflow: hidden; }
.bd-opt__fill { position: absolute; inset: 0; z-index: -1; background: var(--bd-right); opacity: 0; }
.bd-opt.is-right { border-color: var(--bb-green); border-color: var(--bd-right-edge, var(--bb-green)); }
.bd-opt.is-right .bd-opt__fill { opacity: 1; }
.bd-opt.is-right .bd-opt__mark::after { content: "\2713"; }
.bd-opt.is-wrong { border-color: var(--bb-muted); }
.bd-opt.is-wrong .bd-opt__mark::after { content: "\2715"; color: var(--bb-muted); }
.bd-quiz__exp { margin: 1rem 0 0; padding: 1.1rem 1.4rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); font-size: var(--bb-fs-body); line-height: 1.5; }
.bd-quiz__exp strong { font-weight: 800; }
.bd-page--lesson .bd-quiz { margin-top: 1.5rem; }
.bd-top--lesson { display: grid; grid-template-columns: auto 1fr auto; }

/* learn path */
.bd-lessons { list-style: none; padding: 0; margin: 1rem 0; }
.bd-lesson { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "m t c" "m s c"; align-items: center; gap: .1rem 1.1rem; min-height: 44px; padding: 1.1rem 0; border-bottom: 1px solid var(--bb-rule); text-decoration: none; }
.bd-lesson__mark { grid-area: m; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--bb-radius-pill); border: 1.5px solid var(--bb-rule); font-weight: 600; }
.bd-lesson.is-done .bd-lesson__mark { background: var(--bb-green); border-color: var(--bb-green); color: var(--bb-on-green); }
.bd-check { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.bd-lesson__t { grid-area: t; font-weight: 600; font-size: var(--bb-fs-title3); }
.bd-lesson__s { grid-area: s; color: var(--bb-muted); }
.bd-lesson .bd-row__chev { grid-area: c; }

/* buttons */
.bd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.25rem; border-radius: var(--bb-radius-button); border: 1px solid transparent; font: 600 var(--bb-fs-body)/1.2 var(--bb-font-body); text-decoration: none; cursor: pointer; }
.bd-btn--primary { background: var(--bb-green); color: var(--bb-on-green); }
:root[data-theme="dark"] .bd-btn--primary { color: var(--bb-on-green); }
.bd-btn--quiet { background: var(--bd-chip); color: var(--bb-ink); border-color: var(--bb-rule); }
.bd-btn--wide { display: flex; width: 100%; margin: 1.25rem 0 0; }
.bd-btn[hidden] { display: none; }
.bd-resume { margin: .5rem 0 0; }
.bd-next { margin-top: 2rem; }

/* search */
.bd-search { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .5rem; padding: 0 1rem; min-height: 3.5rem; border-radius: var(--bb-radius-card); background: var(--bd-chip); border: 1px solid var(--bb-rule); }
.bd-search__icon svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: var(--bb-muted); stroke-width: 2.25; stroke-linecap: round; display: block; }
.bd-search__in { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--bb-ink); font: 400 var(--bb-fs-title2) var(--bb-font-body); outline: none; }
.bd-search:focus-within { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bd-search__status { margin: .25rem 0 .5rem; color: var(--bb-muted); }
.bd-search__try { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 .75rem; color: var(--bb-muted); }
.bd-search__try[hidden] { display: none; }
/* v38 part 06 (v35 Part 3 item 9: "as tappable chips"; no web-looking in-app links): pills, not underlined words */
.bd-search__chip { min-height: 44px; padding: 0 1rem; border: 1.5px solid var(--bb-rule); border-radius: var(--bb-radius-pill); background: var(--bb-card); color: var(--bb-ink); font: 600 var(--bb-fs-callout) var(--bb-font-body); cursor: pointer; }
.bd-search__h { margin: 1rem 0 .25rem; }
.bd-search__chip:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bd-search__status:empty { display: none; }
.bd-results { list-style: none; padding: 0; margin: 0 -1rem; }
.bd-result { display: block; padding: 1.1rem 1rem; border-bottom: 1px solid var(--bb-rule); text-decoration: none; }
.bd-result__t { display: block; font-weight: 600; font-size: var(--bb-fs-title3); line-height: 1.3; }
.bd-result__s { display: block; color: var(--bb-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* household */
.bd-page--household > .bd-eyebrow { margin-top: .75rem; }
.bd-step { display: flex; align-items: center; justify-content: center; gap: 1.75rem; margin: .75rem 0 1.25rem; }
.bd-step__b { width: 3.5rem; height: 3.5rem; border-radius: var(--bb-radius-card); border: 1px solid transparent; background: var(--bd-chip); color: var(--bb-ink); font: 600 var(--bb-fs-title1)/1 var(--bb-font-body); cursor: pointer; }
:root[data-theme="dark"] .bd-step__b { border-color: var(--bb-rule); }
.bd-step__b:disabled { opacity: .45; cursor: default; }
.bd-step__n { min-width: 3ch; text-align: center; font: 700 var(--bb-fs-large-title)/1 var(--bb-font-display); overflow: hidden; }
/* Your household asks first (D-37, Chris, Nov 16, item 3): the question above the stepper, Save under it */
.bd-ask__q { margin: 1rem 0 .25rem; text-align: center; font: 700 var(--bb-fs-title2)/1.25 var(--bb-font-display); color: var(--bb-ink); }
.bd-ask__q:focus { outline: none; }
html body .bd-page--household [hidden] { display: none; }
.bd-ask__save:disabled { opacity: .45; cursor: default; }
.bd-ask__save:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bd-roll { display: inline-block; }
.bd-hh { margin: 0 0 1rem; padding: .5rem 1.5rem; }
.bd-hh__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--bb-rule); }
.bd-hh__row dt { flex: 1 1 10rem; min-width: 0; }
.bd-hh__row:last-child { border-bottom: 0; }
.bd-hh dt { color: var(--bb-muted); font-size: var(--bb-fs-body); }
.bd-hh dt a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.bd-hh dt a:hover { text-decoration: underline; }
.bd-hh dd { margin: 0; font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; }
.bd-hh__note { color: var(--bb-muted); margin: 0 0 1rem; }
.bd-hh__lines { margin: 0 0 1rem; border-top: 1px solid var(--bb-rule); }
.bd-hh__sum { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.bd-hh__list { list-style: none; padding: 0; margin: 0; }
.bd-hh__list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-bottom: 1px solid var(--bb-rule); }
.bd-hh__list a { display: flex; flex-direction: column; min-height: 44px; justify-content: center; padding: .4rem 0; text-decoration: none; }
.bd-hh__lg { color: var(--bb-muted); font-size: var(--bb-fs-footnote); }
.bd-hh__lv { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* sheets */
.bd-sheet-layer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: flex-end; }
.bd-scrim { position: absolute; inset: 0; background: var(--bd-scrim); }
.bd-sheet { position: relative; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: 40rem; margin: 0 auto; padding: .75rem 1.25rem 1.75rem;
  background: var(--bb-card); color: var(--bb-ink); border-radius: var(--bb-radius-card) var(--bb-radius-card) 0 0; box-shadow: var(--bb-shadow-card); font-family: var(--bb-font-body); outline: none; }
.bd-sheet__grip { width: 2.5rem; height: .3rem; margin: 0 auto 1.25rem; border-radius: var(--bb-radius-pill); background: var(--bb-rule); }
/* round 6: while a scrolled sheet closes, the grip becomes a full-width top bar on the sheet's own color, stuck to the top edge (top: minus the panel padding, which a sticky box keeps clear; the same
   space in the flow: -.75 + 1.8 + .5 = .3 + 1.25 rem, so nothing below moves); the grip's pill is drawn on it */
.bd-sheet.is-scrolled > .bd-sheet__grip { position: sticky; top: -.75rem; z-index: 3; width: auto; height: 1.8rem; margin: -.75rem -1.25rem .5rem;
  border-radius: var(--bb-radius-card) var(--bb-radius-card) 0 0; background: var(--bb-card); box-shadow: 0 1px 0 var(--bb-rule); }
.bd-sheet.is-scrolled > .bd-sheet__grip::after { content: ""; position: absolute; left: 50%; top: .75rem; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: var(--bb-radius-pill); background: var(--bb-rule); }
html body .bd-sheet__title { margin: 0 0 .5rem; font: 700 var(--bb-fs-title2)/1.15 var(--bb-font-display); }
.bd-sheet__meta { margin: 0 0 1.25rem; color: var(--bb-muted); font-size: var(--bb-fs-callout); }
.bd-def { margin: 0 0 1rem; font-size: var(--bb-fs-body); line-height: 1.55; }
.bd-def-more { margin: 0 0 1.25rem; color: var(--bb-muted); font-size: var(--bb-fs-body); }
.bd-sheet__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bd-sheet__note { color: var(--bb-muted); font-size: var(--bb-fs-body); margin: 1.25rem 0 0; }
.bd-src-wrap { border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); overflow: hidden; }
.bd-src-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--bb-fs-subhead); }
.bd-src-table th, .bd-src-table td { position: relative; padding: .65rem .8rem; text-align: left; border-top: 1px solid var(--bb-rule); font-weight: 400; vertical-align: top; }
.bd-src-table thead th { border-top: 0; background: var(--bd-chip); font-weight: 600; }
.bd-src-table .num { text-align: right; white-space: nowrap; }
/* BB-189 (coordinator, Nov 20: the value column ran off the right edge, e.g. a town's "Name in the Census file" and Taken in's "$23.2 billion · SF0036"):
   a value over 18 characters (js/books-deep.js sourceSheet marks it num--wrap) wraps inside its cell; a short amount still stays on one line, a long
   value takes at most about half the row, and a row name breaks inside a word only if one word is wider than its column; the table never runs past the sheet at 320 or 390 */
.bd-src-table .num--wrap { width: 55%; white-space: normal; overflow-wrap: anywhere; }
.bd-src-table th { overflow-wrap: break-word; }
.bd-src-table .is-this th, .bd-src-table .is-this td { font-weight: 600; }
.bd-hl { position: absolute; inset: 0; background: var(--bd-hl); opacity: 0; }
.bd-src-table .is-lit .bd-hl { opacity: 1; }
.bd-cell { position: relative; }
.bd-src-table .is-total th, .bd-src-table .is-total td { font-weight: 500; }
.bd-src-docs { color: var(--bb-muted); padding-left: 1.1rem; }
.bd-orig { margin: 1.25rem 0 0; font-size: var(--bb-fs-subhead); color: var(--bb-muted); }
.bd-orig__a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bb-muted); text-underline-offset: .2em; }

@media (min-width: 48rem) { .bd-sheet { border-radius: var(--bb-radius-card) var(--bb-radius-card) 0 0; } }
@media (prefers-reduced-motion: reduce) { .bd-trend.is-waiting .bd-trend__line { clip-path: none; } .bd-trend.is-waiting .bd-trend__pt, .bd-trend.is-waiting .bd-trend__val, .bd-trend.is-waiting .bd-trend__ref { opacity: 1; } }
html.still .bd-trend.is-waiting .bd-trend__line { clip-path: none; }
html.still .bd-trend.is-waiting .bd-trend__pt, html.still .bd-trend.is-waiting .bd-trend__val, html.still .bd-trend.is-waiting .bd-trend__ref { opacity: 1; }
@media (forced-colors: active) { .bd-term { text-decoration-color: CanvasText; } .bd-opt.is-right { outline: 2px solid Highlight; } }
.bd-top__chev { margin-right: .3em; }
.bd-root, .bd-root *, .bd-root *::before, .bd-root *::after, .bd-sheet-layer, .bd-sheet-layer *, .bd-sheet-layer *::before, .bd-sheet-layer *::after { box-sizing: border-box; }
.bd-hh dd { flex-shrink: 0; }
.bd-crumbs ol { font-size: var(--bb-fs-subhead); }
.bd-sheet__btns .bd-btn { font-size: var(--bb-fs-callout); padding: .75rem 1rem; }
/* the app's Books rows link here (applied by the screens job in js/books.js, see docs/BOOKS_DEEP.md) */
.bd-fulllink { display: inline-flex; align-items: center; min-height: 44px; margin: .5rem 0 .25rem; color: var(--bb-muted); font-weight: 600; font-size: var(--bb-fs-subhead); text-underline-offset: .2em; }
.bd-entry--app { margin: 1rem 0; }
#view-booksdeep .bd-page { padding-top: .25rem; }

/* ==========================================================================
   The Books build-out (Asset Pack v11, js/books-home.js): books-{home,per-person,connecticut,owe,own,came-in,went-out,how-it-works}-{light,dark}.
   Tokens only. Sizes in rem so they survive 200% text. Flat colors (no patterns). Targets 44px or more.
   ========================================================================== */
:root {
  --bkv-track: color-mix(in srgb, var(--bb-paper-edge) 75%, var(--bb-card));   /* segmented track: #F1EBDD in the mock */
  --bkv-thumb: var(--bb-card);
  --bkv-thumb-shadow: var(--bb-shadow-card);
  --bkv-owe: var(--bb-green);            /* green bars (gold-light at night, as mocked) */
  --bkv-own: var(--bb-gold);             /* gold bars in both themes */
  --bkv-gutter: 1rem;
  /* The Books motions (MOTION_SPEC v5), built on --m-press */
  --m-bkv-press: var(--m-press);                      /* 150ms card press */
  --m-bkv-row: calc(var(--m-press) * 5 / 3);          /* 250ms each row cascades in, --e-enter */
  --m-bkv-stagger: calc(var(--m-press) * 4 / 15);     /* 40ms between rows */
  --m-bkv-bar: calc(var(--m-press) * 2);              /* 300ms bars fill */
  --m-bkv-seg: calc(var(--m-press) * 4 / 3);          /* 200ms segment slides */
  --m-bkv-out: var(--m-press);                        /* 150ms number rolls out, --e-exit */
  --m-bkv-in: calc(var(--m-press) * 5 / 3);           /* 250ms number rolls in, --e-enter */
}
:root[data-theme="dark"], .bb-dark {
  --bkv-track: color-mix(in srgb, var(--bb-rule) 85%, var(--bb-card));        /* #22312A in the mock */
  /* the selected segment, dark only (owner polish P4/C12): a lighter fill and a 1px accent outline so it reads at a glance */
  --bkv-thumb: color-mix(in srgb, var(--bb-gold-light) 18%, var(--bb-card));
  --bkv-thumb-shadow: var(--bb-shadow-card);
}
.bkv-home, .bkv-page { color: var(--bb-ink); font-family: var(--bb-font-body); }
#sbooks:has(> .bkv-home) { padding-top: 0; }
.bkv-home { padding: .1875rem 0 1rem; }
#view-booksdeep .bkv-page.bd-page, .bkv-page.bd-page { margin-top: -.125rem; padding: 0 0 2rem; }
.bkv-page:not(.bkv-page--home) .bkv-sub { margin-top: 0; }
/* every Books screen is one screen, as on the Books tab itself: no site footer under it (as body[data-screen="books"], css/social.css) */
html.skin-social body[data-screen="booksdeep"]:has(.bkv-page) .site-foot { display: none; }
/* pushed Books pages (What he owes, What he owns, This year's money, How it works...): the tab bar stays, as on every pushed page (sweep 2, item 45:
   one rule for the whole app, so it no longer comes and goes between Follow the Bucks and What he owes); "‹ The Books" leads back */
#view-booksdeep .bkv-page--home.bd-page { margin-top: 0; padding-top: .1875rem; }
.bkv-page--home .bkv-home { padding-top: 0; }
/* Books home fits one 390x844 screen above the tab bar (owner, Nov 14) now that it also holds the FY2026 preliminary line, Follow the Bucks
   and Deficit in 60 seconds: spacing only, nothing removed. The mock's parts (switches, headline, three rows) keep the mock's spacing;
   the two entries and the source line sit a little closer, and the empty space under the page is the tab bar plus 8px, not plus 48px. */
.bkv-home { padding-bottom: 0; }
#view-booksdeep .bkv-page--home.bd-page { padding-bottom: 0; }
.bkv-home .ftb-entry, .bkv-home .d60-entry { min-height: 3.5rem; margin-top: .375rem; padding-top: .5rem; padding-bottom: .5rem; }
.bkv-home .d60-entry__s, .bkv-home .ftb-entry__s { line-height: 1.3; }
.bkv-home .bkv-src { margin-top: .375rem; line-height: 1.35; }
.bkv-home .bkv-srcline { margin-bottom: -.625rem; }
@media (max-width: 960px) {
  html.skin-social body[data-screen="books"]:has(#sbooks > .bkv-home) main.wrap,
  html.skin-social body[data-screen="booksdeep"]:has(.bkv-page--home) main.wrap { padding-bottom: calc(var(--bb-tabbar-h) + 8px + env(safe-area-inset-bottom, 0px)); }
}

/* segmented switches: a soft track, the selected segment a card-colored pill that slides (200ms, MOTION_SPEC v5) */
.bkv-switches { display: grid; gap: .75rem; margin-bottom: .75rem; }
.bkv-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 0; border-radius: var(--bb-radius-card); background: var(--bkv-track); isolation: isolate; }
.bkv-seg__thumb { position: absolute; z-index: -1; top: .1875rem; bottom: .1875rem; left: .1875rem; width: calc(50% - .375rem); border-radius: var(--bb-radius-button); background: var(--bkv-thumb); box-shadow: var(--bkv-thumb-shadow); transition: none; }
.bkv-seg[data-on="1"] .bkv-seg__thumb { left: calc(50% + .1875rem); }
.bkv-seg__b { min-height: 2.75rem; margin: -.125rem 0; padding: .25rem .5rem; border: 0; border-radius: var(--bb-radius-button); background: none; color: var(--bb-ink);
  font: 600 var(--bb-fs-footnote)/1.2 var(--bb-font-body); cursor: pointer; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
.bkv-seg__b:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-seg--year { margin-top: 1.5rem; }
/* D-35 (Chris, Nov 16): Total · Per person · Per household, three equal segments; the pill sits on the chosen third */
.bkv-seg--3 { grid-template-columns: 1fr 1fr 1fr; }
.bkv-seg--3 .bkv-seg__thumb { width: calc(100% / 3 - .375rem); }
.bkv-seg--3[data-on="1"] .bkv-seg__thumb { left: calc(100% / 3 + .1875rem); }
.bkv-seg--3[data-on="2"] .bkv-seg__thumb { left: calc(200% / 3 + .1875rem); }
/* D-40 (Chris, Nov 17): Federal | State; the State segment is the state's name and a ▾ (a long name trims with "…" at 320px) */
.bkv-seg--place { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bkv-seg__b[data-k="state"] { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 0; overflow-wrap: normal; }
.bkv-seg__st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkv-seg__caret { flex: none; font-size: .85em; line-height: 1; }
/* Per household: the household's size, right under the headline ("People in your household  −  3  +"); 44px buttons */
.bkv-people { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .5rem 0 .25rem; padding: .25rem .25rem .25rem .875rem;
  border-radius: var(--bb-radius-card); background: var(--bkv-track); }
.bkv-people__l { font: 600 var(--bb-fs-footnote)/1.25 var(--bb-font-body); color: var(--bb-ink); }
.bkv-people__step { display: inline-flex; align-items: center; gap: .25rem; }
.bkv-people__b { width: 2.75rem; height: 2.75rem; border: 1px solid transparent; border-radius: var(--bb-radius-button); background: var(--bkv-thumb); box-shadow: var(--bkv-thumb-shadow);
  color: var(--bb-ink); font: 600 var(--bb-fs-title3)/1 var(--bb-font-body); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:root[data-theme="dark"] .bkv-people__b { border-color: var(--bb-rule); }
.bkv-people__b:disabled { opacity: .45; cursor: default; }
.bkv-people__b:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-people__n { min-width: 2.5ch; text-align: center; font: 700 var(--bb-fs-title3)/1 var(--bb-font-display); font-variant-numeric: tabular-nums; color: var(--bb-ink); }
/* Per household asks first (D-37, Chris, Nov 16, item 3): the question, the − / + stepper and Save, before any figure */
.bkv-ask { margin: .25rem 0 .5rem; }
.bkv-ask__q { margin: 0 0 1rem; }
.bkv-ask__step { justify-content: center; padding: .375rem; }
.bkv-ask__save { margin-top: 1rem; }
.bkv-ask__save:disabled { opacity: .45; cursor: default; }
.bkv-ask__save:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-ask-page { padding-top: .5rem; }
.bkv-ask__unset { color: var(--bb-muted, var(--bb-ink)); opacity: .6; }

/* the headline: plain words, the key number in the accent color */
html body .bkv-h, html.skin-social .bb-screen h1.bkv-h { margin: 0; font: 600 var(--bb-fs-title1)/1.13 var(--bb-font-display); letter-spacing: -0.01em; color: var(--bb-ink); }
.bkv-h:focus { outline: none; }
.bkv-accent { color: var(--bb-nay); }   /* the gap (owed beyond owned) is a shortfall: the nay red, light and dark (Chris, Nov 15; AA: 8.8:1 on light paper, 6.4:1 on the dark card) */
.bkv-card .bkv-card__v--gap { color: var(--bb-nay); }
/* the Books count-up (js/books-home.js countUpOnce) wraps the number in .pk-num: keep it inline so the headline wraps as mocked */
.bkv-h .bkv-accent.pk-num, .bkv-h .bkv-accent .pk-num__vis { display: inline; }
.bkv-sub { margin: .125rem 0 0; font: 400 var(--bb-fs-footnote)/1.4 var(--bb-font-body); color: var(--bb-muted); }
.bkv-src { margin: .625rem 0 0; font: 400 var(--bb-fs-caption)/1.45 var(--bb-font-body); color: var(--bb-muted); }
/* Books home, under the headline: one "Source Treasury ›" chip (app feel B/C: no underlined links; MoneyStamp.sourceChip, 44px target)
   that opens "Where this number comes from" (v28 item 8). The chip's look is css/money-stamp.css; this only places it. */
.bkv-srcline { margin: -.125rem 0 -.5rem; }
.bkv-srcline .bkv-srcchip { margin-left: -4px; }
.bkv-sub .bkp-badge, .bkv-card__s .bkp-badge { vertical-align: 1px; }
/* This year's money: the new fiscal year so far, and the same months a year earlier (owner, B8) */
.bkv-ytd { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--bb-rule); }
.bkv-ytd__t { margin: 0; font: 600 var(--bb-fs-subhead)/1.4 var(--bb-font-body); color: var(--bb-ink); }
.bkv-ytd .bkv-ytd__p { margin-top: .125rem; }

/* the three drill-in rows */
.bkv-cards { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .625rem; }
.bkv-card { display: flex; align-items: center; gap: .75rem; min-height: 4.25rem; padding: .625rem 1rem .625rem 1.0625rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card);
  background: var(--bb-card); color: var(--bb-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bkv-card:focus-visible, .bkv-line:focus-visible, .bkv-how:focus-visible, .bkv-pp:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-card__txt { display: grid; flex: 1 1 auto; min-width: 0; }
.bkv-card__t { font: 600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color: var(--bb-ink); }
.bkv-card__s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
.bkv-card__v { flex: none; font: 700 var(--bb-fs-title2)/1.1 var(--bb-font-display); color: var(--bb-ink); white-space: nowrap; }
/* Books home rows (audit BB-365 item 2): the value is written out ("$50.4 trillion"), on the top line beside the title in the
   title3 size; if the title and value don't fit side by side (a bigger text setting) the value wraps to its own line under it.
   The line below then uses the card's full width, which keeps the Books home one screen at 390x844. */
.bkv-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: .75rem; }
.bkv-card__top .bkv-card__v { font-size: var(--bb-fs-title3); line-height: 1; }
.bkv-chev { flex: none; font: 400 var(--bb-fs-body)/1 var(--bb-font-body); color: var(--bb-muted); margin-left: -.125rem; }
.bkv-card--quiet { min-height: 3.5rem; }

/* per person: a divided list */
.bkv-pplist { list-style: none; margin: .3125rem 0 0; padding: 0; }
.bkv-pp { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; min-height: 2.75rem; padding: .5rem 0 .75rem; border-bottom: 1px solid var(--bb-rule); color: var(--bb-ink); text-decoration: none; }
.bkv-pplist li + li .bkv-pp { padding-top: .75rem; }
.bkv-pp__txt { display: grid; min-width: 0; padding-top: .3125rem; }
.bkv-pp__t { font: 600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); }
.bkv-pp__s { font: 400 var(--bb-fs-footnote)/1.4 var(--bb-font-body); color: var(--bb-muted); }
.bkv-pp__v { flex: none; font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); white-space: nowrap; }
.bkv-pplist + .bkv-src { margin-top: .625rem; }

/* bars: flat, rounded; the fill grows from the left (300ms) */
.bkv-bar { display: block; height: .4375rem; }
.bkv-bar__fill { display: block; height: 100%; min-width: .3125rem; border-radius: var(--bb-radius-button); background: var(--bkv-owe); transform-origin: left center; }
.bkv-bar--own .bkv-bar__fill { background: var(--bkv-own); }

/* Connecticut: owed vs owned */
.bkv-ct { margin-top: .8125rem; padding: .8125rem 1rem .9375rem 1.0625rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); display: grid; gap: .6875rem; }
.bkv-ct__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: .3125rem; }
.bkv-ct__t { font: 400 var(--bb-fs-title3)/1.3 var(--bb-font-body); color: var(--bb-muted); }
.bkv-ct__v { font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); color: var(--bb-ink); }
.bkv-ct .bkv-bar { grid-column: 1 / -1; }

/* takeaway card */
.bkv-callout { margin: 1rem 0 0; padding: .9375rem .875rem .9375rem 1.0625rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); }
.bkv-callout--gold { border-color: var(--bb-gold); }
.bkv-lines + .bkv-callout { margin-top: .8125rem; }
.bkv-ct + .bkv-callout { margin-top: .8125rem; }
html body .bkv-callout__t, html.skin-social .bb-screen h2.bkv-callout__t { margin: 0 0 .3125rem; font: 800 var(--bb-fs-body)/1.4 var(--bb-font-body); letter-spacing: -0.01em; color: var(--bb-ink); }
.bkv-callout__p { margin: 0; font: 400 var(--bb-fs-footnote)/1.43 var(--bb-font-body); color: var(--bb-muted); }

/* the pages: total, then every line with its bar */
html body .bkv-ph { margin: 0; font: 600 var(--bb-fs-title1)/1.15 var(--bb-font-display); letter-spacing: -0.01em; color: var(--bb-ink); }
.bkv-ph:focus { outline: none; }
.bkv-lines { list-style: none; margin: .4375rem 0 0; padding: 0; }
.bkv-line { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: .75rem; row-gap: .25rem; min-height: 2.75rem; margin: -.25rem 0; padding: .4375rem 0 .375rem; color: var(--bb-ink); text-decoration: none; }
.bkv-line__t { font: 400 var(--bb-fs-footnote)/1.3 var(--bb-font-body); }
.bkv-line__q { color: var(--bb-muted); }
.bkv-line__v { font: 700 var(--bb-fs-subhead)/1.25 var(--bb-font-body); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }   /* v38 part 10 (item 8): a column, so Inter's even-width figures (Fraunces has none) */
.bkv-line .bkv-bar { grid-column: 1 / -1; }
.bkv-h2 { margin: 1.75rem 0 0; font: 600 var(--bb-fs-title3)/1.25 var(--bb-font-display); color: var(--bb-ink); }
.bkv-more .bkv-cards { margin-top: .75rem; }
.bkv-prelim__note { font: 400 var(--bb-fs-subhead)/1.5 var(--bb-font-body); color: var(--bb-muted); }
.bkv-prelim__note b { color: var(--bb-ink); }
.bkv-howbtn { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: .5rem; padding: 0; border: 0; background: none; color: var(--bb-ink); font: 600 var(--bb-fs-callout)/1.2 var(--bb-font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bkv-fy[hidden] { display: none; }

/* How it works: four cards */
.bkv-hows { list-style: none; margin: -.0625rem 0 0; padding: 0; display: grid; gap: .75rem; }
.bkv-how { display: block; padding: .875rem 1rem 1rem 1.0625rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); color: var(--bb-ink); text-decoration: none; }
.bkv-how__k { display: block; font-size: var(--bb-fs-caption); }
html body .bkv-how__t, html.skin-social .bb-screen h2.bkv-how__t { margin: .25rem 0 .25rem; font: 700 var(--bb-fs-title3)/1.15 var(--bb-font-display); letter-spacing: -0.01em; color: var(--bb-ink); }
.bkv-how__p { margin: 0; font: 400 var(--bb-fs-subhead)/1.52 var(--bb-font-body); color: var(--bb-ink); }
.bkv-how__p b { font-weight: 800; }

/* the head's right-hand meta (date, Per person, FY2025) */
.bkv-headmeta { font: 600 var(--bb-fs-footnote)/1.2 var(--bb-font-body); color: var(--bb-muted); white-space: nowrap; }
/* v29 verify: at 320 and 360 wide "Fiscal 2026 preliminary" on one line cut the title ("The …"); below 375 wide the label
   takes two lines at the right ("Fiscal 2026" over "preliminary"), so "The Books" shows whole */
@media (max-width: 374px) { .bkv-headmeta { white-space: normal; max-width: 6.5em; text-align: right; } }
/* large text (B7): when "‹ The Books", the title and a long year label ("FY2026 preliminary") can't share one row, the label moves to
   its own row at the right instead of covering the back link and title. At normal sizes the row is unchanged (the title still fills it). */
html.puck[data-headlead] body[data-screen="booksdeep"] header.top .topbar:has(.bkv-headmeta) { flex-wrap: wrap; row-gap: 0; }
html.puck[data-headlead] body[data-screen="booksdeep"] header.top .topbar:has(.bkv-headmeta) .pk-masthead { flex: 1 1 15rem; min-width: 0; max-width: 100%; }   /* 15rem: "‹ The Books  What he owes" fits whole at 390px; a long meta ("FY2026 preliminary") wraps under it (Nov 15) */
html.puck[data-headlead] body[data-screen="booksdeep"] header.top .topbar:has(.bkv-headmeta) #pk-headmeta { margin-left: auto; }

/* the pushed Books pages' header (books-owe-* etc.): "‹ The Books", the title in the space between, the year at the right.
   Scoped to The Books' deep screen; the chrome's absolute centring would let a long title ("Where it came from") run into the back control. */
html.puck[data-headlead] body[data-screen="booksdeep"] .pk-masthead .pk-pagetitle:not([hidden]) { position: static; transform: none; flex: 1 1 auto; min-width: 0; max-width: none;
  font-size: var(--bb-fs-title3); text-align: center; }
body[data-screen="booksdeep"] .pk-headlead .bkv-back { font-size: var(--bb-fs-subhead); font-weight: 600; white-space: nowrap; }
body[data-screen="booksdeep"] .pk-headlead .bkv-back .fb-back__chev { font-size: var(--bb-fs-body); margin-top: 0; }
/* This year's money: the latest-numbers strip waits hidden until the Treasury files arrive (.tl-strip sets display:flex) */
.bkv-tiles[hidden] { display: none; }
.tl-strip.bkv-tiles { margin-top: 1.75rem; }   /* same gap as the .bkv-h2 headings above it */
/* Refine item 1: on a computer the tiles sit in a neat 3-across grid instead of a swipe row */
@media (min-width: 900px) {
  .bkv-tiles .tl-row, html.puck #sbooks .bkv-tiles .tl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; margin-right: 0; padding-right: 2px; }
  .bkv-tiles .tl-tile, .bkv-tiles .tl-wide, html.puck #sbooks .bkv-tiles .tl-tile, html.puck #sbooks .bkv-tiles .tl-wide { width: auto; max-width: none; }
}
/* sweep 2 item 31: the confidence tags and sources on Per person and Your household */
.bkv-pp__s .bkp-badge, .bd-hh dt .bkp-badge { vertical-align: 1px; }
.bd-hh dt .bkp-badge { font-size: var(--bb-fs-caption); }
.bd-hh__src { margin: .5rem 0 0; font: 400 var(--bb-fs-footnote)/1.4 var(--bb-font-body); color: var(--bb-muted); }
.bd-hh__ct { margin: 1rem 0 0; color: var(--bb-muted); }
/* the Books home fits one 390x844 screen above the tab bar (owner, Nov 14): the rows sit a little closer */
html body .bkv-home .bkv-cards { gap: .5rem; }
/* round 6 (b): Per household has four rows (Total has three) and now keeps Follow the Bucks and Deficit in 60 seconds, which ran the
   page 12px past one 390x844 screen and put the bottom of Deficit in 60 seconds under the tab bar. The four-row list uses the same closer
   spacing the Books home already uses while the demo banner shows (below): spacing only, nothing removed, type unchanged. */
html body .bkv-home .bkv-cards--hh { margin-top: .5rem; gap: .375rem; }
.bkv-home .bkv-cards--hh ~ :is(.ftb-entry, .d60-entry) { margin-top: .25rem; }
/* the published demo (sweep 2 v13, item 30): its "Pretend demo" banner sits inside the sticky header (about 40px; added at build time, see
   scratchpad compact-banner.py), which pushed the Books home 30px past one 390x844 screen and the Sources line under the tab bar. While that banner
   shows (Hide removes it, and these rules with it), the same parts sit a little closer: spacing only, nothing removed, type unchanged. */
@media (max-width: 960px) {
  html:has(header.top > #demo-note:not([style*="display: none"])) body[data-screen="books"]:has(#sbooks > .bkv-home) main.wrap { padding-top: .375rem; }
  html:has(header.top > #demo-note:not([style*="display: none"])) .bkv-home .bkv-switches { gap: .5rem; margin-bottom: .5rem; }
  html:has(header.top > #demo-note:not([style*="display: none"])) body .bkv-home .bkv-cards { margin-top: .5rem; gap: .375rem; }
  html:has(header.top > #demo-note:not([style*="display: none"])) .bkv-home .ftb-entry,
  html:has(header.top > #demo-note:not([style*="display: none"])) .bkv-home .d60-entry { margin-top: .25rem; }
  html:has(header.top > #demo-note:not([style*="display: none"])) .bkv-home .bkv-src { margin-top: .25rem; }
}

/* ==========================================================================
   R4 (rough pass, Nov 16; Chris: "the demo is looking really rough"): The Books section.
   Tokens only: type sizes from css/tokens.css, corners and shadows from the tokens, motion from the --m-* tokens (JS), with a
   reduced-motion version (no fade at all).
   ========================================================================== */
/* (a) skeleton bars until the data files answer: grey shapes, no figure, no shimmer loop */
.bkv-skel__bar { display: block; height: .875rem; margin: .375rem 0; border-radius: var(--bb-radius-button); background: var(--bkv-track); }
.bkv-skel__h .bkv-skel__bar { height: 1.75rem; margin: .5rem 0; }
.bkv-skel__sub { margin: .5rem 0 1rem; }
.bkv-skel__row { min-height: 4.25rem; }
.bkv-skel__row > .bkv-skel__bar { flex: none; width: 5.5rem !important; }
.bkv-skel__row .bkv-card__txt .bkv-skel__bar:first-child { height: 1rem; }
.bkv-now > .bkv-skel { min-height: 6rem; }
/* the headline: balanced lines, and an amount never breaks across lines */
html body .bkv-h, html body .bkv-ph { text-wrap: balance; }
.bkv-h .bkv-accent { white-space: nowrap; }
/* (b) a Books row: title, one short caption, and the amount at the right in a muted subhead, one line, tabular figures */
.bkv-row .bkv-card__t { font: 600 var(--bb-fs-headline)/1.3 var(--bb-font-body); }
.bkv-row .bkv-card__s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
html body .bkv-row .bkv-card__v { flex: none; min-width: 5.5rem; margin-left: auto; text-align: right; font: 500 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color: var(--bb-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.bkv-row .bkv-chev { flex: none; margin-left: .125rem; }
.bkv-row--plain { cursor: default; }
button.bkv-card { width: 100%; font: inherit; text-align: left; color: inherit; cursor: pointer; }
/* the year's tag sits once, after the source chip */
.bkv-srcline { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.bkv-srcline .bb-tag { margin-top: .125rem; }
/* (d) This year's money: the months-so-far row and the how row sit in the same list look */
.bkv-ytd { margin: 1rem 0 0; padding: 0; border-top: 0; }
.bkv-howrow { margin-top: 1rem; }
/* round 6 (c): the way to the other side of the balance sheet, last on What he owes / What he owns */
.bkv-next { margin-top: 1rem; }
/* (e) the year switch right under the headline */
html body .bkv-seg--year { margin: .75rem 0 .5rem; }
.bkv-prelim:empty { display: none; }
/* (d) the latest numbers: fixed-height tiles about 75% wide so the next one peeks; a footnote label, a title2 number on one
   line, a two-line caption and the date at the foot. Never one word per line. */
html body #books-deep .bkv-tiles .tl-row { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem 1rem .75rem 0; margin-right: calc(-1 * var(--bkv-gutter)); }
html body #books-deep .bkv-tiles .tl-tile, html body #books-deep .bkv-tiles .tl-wide { flex: 0 0 75%; width: 75%; max-width: 20rem; height: 10rem; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  align-items: flex-start; gap: .25rem; padding: .875rem 1rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); box-shadow: var(--bb-shadow-card);
  color: var(--bb-ink); text-align: left; scroll-snap-align: start; }
html body #books-deep .bkv-tiles .tl-tile .tl-label { padding: 0; border: 0; border-radius: 0; background: none; color: var(--bb-muted); font: 600 var(--bb-fs-footnote)/1.3 var(--bb-font-body);
  letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html body #books-deep .bkv-tiles .tl-tile .tl-value { font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-variant-numeric: tabular-nums; }
html body #books-deep .bkv-tiles .tl-tile .tl-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body);
  color: var(--bb-muted); overflow-wrap: normal; word-break: normal; hyphens: none; }
html body #books-deep .bkv-tiles .tl-tile .tl-date { margin-top: auto; font: 400 var(--bb-fs-caption)/1.3 var(--bb-font-body); color: var(--bb-muted); }
html body #books-deep .bkv-tiles .tl-tile .tl-sub .bkp-badge, html body #books-deep .bkv-tiles .tl-tile .tl-sub .bb-tag { display: none; }   /* no tags on tiles; the tile's sheet has it */
@media (min-width: 900px) { html body #books-deep .bkv-tiles .tl-tile, html body #books-deep .bkv-tiles .tl-wide { flex: 1 1 0; width: auto; max-width: none; } }
/* (h) the bars in a source sheet (the tiles' sheet): a visible track and a fill that reads in light and dark */
:root body #bb-sheet .tl-bars li > i, :root body .bd-sheet .tl-bars li > i { position: relative; height: .625rem; border: 0; border-radius: var(--bb-radius-button);
  background: var(--bkv-owe); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bb-ink) 12%, transparent); }
:root body #bb-sheet .tl-bars li, :root body .bd-sheet .tl-bars li { background: linear-gradient(var(--bkv-track), var(--bkv-track)) no-repeat left bottom / 100% .625rem; }
/* (g) Line by line (#ledger): congressional titles in the headline token, three lines at most */
html body #view-balance .dk > h3 { font: 600 var(--bb-fs-headline)/1.35 var(--bb-font-body); letter-spacing: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* (c) the budget pages (#fed, #fed-…, #st-…): the hero amount, one primary button, link rows, title3 section headers */
#explore-body .x-hero { margin: .25rem 0 .25rem; font: 600 var(--bb-fs-large-title)/1.1 var(--bb-font-display); letter-spacing: -0.01em; color: var(--bb-ink); text-wrap: balance; font-variant-numeric: tabular-nums; }
#explore-body .x-facts { margin: 0 0 1rem; font: 400 var(--bb-fs-subhead)/1.4 var(--bb-font-body); color: var(--bb-muted); }
#explore-body .x-facts .bb-tag { margin-left: .25rem; }
html body #explore-body .x-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3rem; margin: 0 0 .75rem; padding: .75rem 1.25rem;
  border: 0; border-radius: var(--bb-radius-button); background: var(--bb-green); color: var(--bb-on-green); font: 600 var(--bb-fs-body)/1.2 var(--bb-font-body); box-shadow: none; }
#explore-body .x-you { display: block; margin: 0 0 .75rem; padding: 0; background: none; font: 600 var(--bb-fs-subhead)/1.4 var(--bb-font-body); color: var(--bb-ink); }
#explore-body .x-row { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3.25rem; margin: 0 0 .5rem; padding: .625rem 1rem; border: 1px solid var(--bb-rule);
  border-radius: var(--bb-radius-card); background: var(--bb-card); color: var(--bb-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
#explore-body .x-row:focus-visible { outline: 2px solid var(--bb-gold); outline-offset: 2px; }
#explore-body .x-row__txt { display: grid; flex: 1 1 auto; min-width: 0; }
#explore-body .x-row__t { font: 600 var(--bb-fs-headline)/1.3 var(--bb-font-body); }
#explore-body .x-row__s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
#explore-body .x-row__chev { flex: none; color: var(--bb-muted); font-size: var(--bb-fs-title3); line-height: 1; }
#explore-body .x-statepick { max-width: none; margin: 0 0 1rem; }
html body #explore-body :is(.x-sub, .ideas > h2) { margin: 1.5rem 0 .5rem; font: 600 var(--bb-fs-title3)/1.25 var(--bb-font-display); letter-spacing: 0; text-transform: none; color: var(--bb-ink); }
html body #explore-body .x-policy dt { margin: 1.25rem 0 .25rem; font: 600 var(--bb-fs-title3)/1.25 var(--bb-font-display); letter-spacing: 0; text-transform: none; color: var(--bb-ink); }
#explore-body .x-policy dd { margin: 0; }
#explore-body .x-srcrow { margin-top: 1rem; }
/* readers' share against the government's: a pair of bars */
html body #explore-body .x-pair { margin: .5rem 0 1rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#explore-body .x-pair__row { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; align-items: baseline; margin: 0 0 .625rem; }
#explore-body .x-pair__t { font: 400 var(--bb-fs-subhead)/1.35 var(--bb-font-body); color: var(--bb-ink); }
#explore-body .x-pair__v { font: 600 var(--bb-fs-subhead)/1.35 var(--bb-font-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
#explore-body .x-pair__bar { grid-column: 1 / -1; display: block; height: .625rem; border-radius: var(--bb-radius-button); background: var(--bkv-track); overflow: hidden; }
#explore-body .x-pair__bar > i { display: block; height: 100%; border-radius: var(--bb-radius-button); background: var(--bkv-own); }
#explore-body .x-pair__bar.is-gov > i { background: var(--bkv-owe); }

/* one bar per Books page: the bar's actions (share, follow) as 44px icon buttons */
.bd-headacts { display: inline-flex; align-items: center; gap: .125rem; }
.bd-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--bb-radius-pill); background: none; color: var(--bb-ink); cursor: pointer; }
.bd-iconbtn svg { width: 1.375rem; height: 1.375rem; }
.bd-iconbtn:focus-visible { outline: 2px solid var(--bb-gold); outline-offset: 0; }
.bd-iconbtn.is-on svg path { fill: currentColor; }
.lf-bellwrap { display: inline-flex; }
/* a line page: the share line and its tag under the number, then the one primary button */
.bl-sub .bb-tag { order: 2; }
.bl-split { margin: 0 0 1rem; }
.bl-page .bd-srcrow { margin: 0 0 1.25rem; }
/* the budget pages' bar: the same layout as the pushed Books pages ("‹ The Books", the name in the space between, actions at the
   right); a long name ("Connecticut state budget") is cut with an ellipsis instead of running under the back control */
html.puck[data-headlead] body[data-screen="explore"] .pk-masthead .pk-pagetitle:not([hidden]),
html.puck[data-headlead] body[data-screen="booksdeep"] .pk-masthead .pk-pagetitle:not([hidden]) { position: static; transform: none; flex: 1 1 auto; min-width: 0; max-width: none;
  font-size: var(--bb-fs-title3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-screen="explore"] .pk-headlead .bkv-back { font-size: var(--bb-fs-subhead); font-weight: 600; white-space: nowrap; }
body[data-screen="explore"] .pk-headlead .bkv-back .fb-back__chev { font-size: var(--bb-fs-body); margin-top: 0; }
.bl-page .bd-srcrow .bd-srcrow__t { font: 600 var(--bb-fs-headline)/1.3 var(--bb-font-body); }
/* Line by line (#ledger): the app bar carries "‹ This year's money", so the page's own breadcrumb goes */
html.puck #view-balance > nav.crumbs { display: none; }
body[data-screen="balance"] .pk-headlead .bkv-back { font-size: var(--bb-fs-subhead); font-weight: 600; white-space: nowrap; }
html.puck[data-headlead] body[data-screen="balance"] .pk-masthead .pk-pagetitle:not([hidden]) { position: static; transform: none; flex: 1 1 auto; min-width: 0; max-width: none;
  font-size: var(--bb-fs-title3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   R4 review fixes (Nov 16): nothing cut off, Defense like the other budget pages, no stray tags or boxes.
   Tokens only (type sizes, corners); no motion added.
   ========================================================================== */
/* (1) the latest numbers: a value in words ("Individual income taxes") wraps to a second line instead of being cut; the tiles in a row
   share the tallest one's height. The swipe row shows no scrollbar track (it read as a grey band under the tiles). */
html body #books-deep .bkv-tiles .tl-tile, html body #books-deep .bkv-tiles .tl-wide { height: auto; min-height: 10rem; }
html body #books-deep .bkv-tiles .tl-tile .tl-value { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; text-overflow: clip;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
html body #books-deep .bkv-tiles .tl-row { scrollbar-width: none; }
html body #books-deep .bkv-tiles .tl-row::-webkit-scrollbar { display: none; }
/* (2) a pushed Books page's bar on a phone: "‹ <parent>" and the actions on the first row, the page's name on its own row below it,
   left-aligned and wrapping, so a long name ("Connecticut state budget") or a long back label is never cut short. The same on every
   Books page (budget pages, line pages, This year's money, What he owes, Line by line). */
@media (max-width: 960px) {
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) header.top .topbar { flex-wrap: wrap; align-items: center; row-gap: 0; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) header.top .topbar .pk-masthead { display: contents; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) header.top .topbar .pk-headlead { order: 1; flex: 0 1 auto; min-width: 0; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) header.top .topbar #pk-headmeta { order: 2; flex: 0 1 auto; min-width: 0; margin-left: auto; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) header.top .topbar .pk-masthead .pk-pagetitle:not([hidden]) { order: 3; flex: 1 1 100%;
    position: static; transform: none; max-width: none; margin: 0; padding: 0 0 .5rem; font: 700 var(--bb-fs-title2)/1.2 var(--bb-font-display); text-align: left;
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: normal; word-break: normal; hyphens: manual; text-wrap: balance; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) .pk-headlead .bkv-back { max-width: 100%; }
  html.puck[data-headlead] body:is([data-screen="explore"], [data-screen="booksdeep"], [data-screen="balance"]) .pk-headlead .bkv-back .pk-back__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* (3) Defense and every line page: the same 16px margins as the other budget pages (the view already has the gutter), no spaced
   capitals label over the number (the name is in the bar; screen readers still hear it), the token's rounded-rectangle buttons,
   section headers in title3 like "Its share of the budget" */
#view-booksdeep .bl-page.bd-page { padding: 0 0 2rem; }
html body .bl-page .bl-h1 .bl-eyebrow { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html body .bl-page .bl-h1 .bd-value { font: 600 var(--bb-fs-large-title)/1.1 var(--bb-font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.bl-page .bl-sub { margin: .25rem 0 1rem; font: 400 var(--bb-fs-subhead)/1.4 var(--bb-font-body); }
html body .bl-page :is(.bl-btn, .emb-btn) { min-height: 3rem; border-radius: var(--bb-radius-button); font: 600 var(--bb-fs-body)/1.2 var(--bb-font-body); box-shadow: none; }
html body .bl-page .bl-split { margin: 0 0 .75rem; }
html body .bl-page .bl-share__t { margin: .75rem 0 0; font: 600 var(--bb-fs-title3)/1.25 var(--bb-font-display); letter-spacing: 0; text-transform: none; color: var(--bb-ink); }
.bl-page .bd-srcrow { padding: .625rem 1rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); }
/* the line's history, in its source sheet now (one number on the page) */
.bd-sheet .bl-card { margin: 1rem 0 0; padding: 1rem; }
/* (4) This year's money: "Every line, fiscal 2026" is a row like the rows around it (title, caption, a chevron that turns when open) */
html body .bl-year { margin: 1rem 0 0; padding: 0; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); }
html body .bl-year > summary { display: flex; align-items: center; gap: .75rem; min-height: 4.25rem; padding: .625rem 1rem .625rem 1.0625rem; list-style: none; cursor: pointer; font-weight: 400; }
.bl-year > summary::-webkit-details-marker { display: none; }
.bl-year > summary:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; border-radius: var(--bb-radius-card); }
.bl-year__sum { display: grid; flex: 1 1 auto; min-width: 0; }
.bl-year__sum-t { font: 600 var(--bb-fs-headline)/1.3 var(--bb-font-body); color: var(--bb-ink); }
.bl-year__sum-s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
.bl-year > summary .bkv-chev { transform: rotate(90deg); }
.bl-year[open] > summary .bkv-chev { transform: rotate(-90deg); }
html body .bl-year[open] { padding: 0 1rem 1rem 1.0625rem; }
html body .bl-year[open] > summary { margin: 0 -1rem 0 -1.0625rem; }
/* room under the tiles for their shadow: a row that scrolls sideways clips it, which showed as a hard grey band under the tiles */
@media (max-width: 899px) {
  html body #books-deep .bkv-tiles .tl-row { margin-bottom: -1.25rem; padding-bottom: 2rem; }
}
/* (5) the Books tab's own bar on a narrow phone (320px): "The Books" stays whole; the year at the right takes two lines instead */
html.puck:not([data-headlead]) body:is([data-screen="books"], [data-screen="booksdeep"]) header.top .topbar:has(.bkv-headmeta-wrap) .pk-masthead { flex: none; }
html.puck:not([data-headlead]) body:is([data-screen="books"], [data-screen="booksdeep"]) header.top .topbar:has(.bkv-headmeta-wrap) .pk-pagetitle:not([hidden]) { flex: none; overflow: visible; text-overflow: clip; }
html.puck:not([data-headlead]) body:is([data-screen="books"], [data-screen="booksdeep"]) header.top .topbar #pk-headmeta:has(.bkv-headmeta-wrap) { flex: 0 1 auto; min-width: 0; margin-left: auto; }
html.puck:not([data-headlead]) body:is([data-screen="books"], [data-screen="booksdeep"]) .bkv-headmeta-wrap .bkv-headmeta { min-width: 0; white-space: normal; text-align: right; text-wrap: balance; }
/* on a computer the latest numbers are the 3-across grid again (the swipe row's flex rule above had squeezed all eight into one row) */
@media (min-width: 900px) {
  html body #books-deep .bkv-tiles .tl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; overflow: visible; scroll-snap-type: none; margin: 0; padding: .25rem 0 .75rem; }
  html body #books-deep .bkv-tiles .tl-tile, html body #books-deep .bkv-tiles .tl-wide { flex: none; width: auto; max-width: none; }
}
.bl-page .bd-srcrow .bd-srcrow__s { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); }
.bl-page .bd-srcrow .bd-srcrow__chev { font-size: var(--bb-fs-title3); }

/* v37 part 03 (item 14): the year switch with its ⓘ (the fiscal 2025 audit line) on one row */
html body .bkv-yearrow { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 .5rem; }
html body .bkv-yearrow > .bkv-seg--year { flex: 1 1 auto; margin: 0; min-width: 0; }
html body .bkv-yearrow > .bkv-yearinfo { flex: none; }

/* BB-421: another state's books (#/books/state/{ab}): the year's money in and out sits under its own small heading */
.bkv-st__year { margin-top: 1.25rem; }
html body .bkv-st__h2, html.skin-social .bb-screen h2.bkv-st__h2 { margin: 0 0 .5rem; font: 800 var(--bb-fs-body)/1.4 var(--bb-font-body); letter-spacing: -0.01em; color: var(--bb-ink); }
.bkv-st__year .bkv-cards { margin-top: .5rem; }
/* D-47: Federal money in <state> (js/books-home.js fedPage): room above each list's heading */
html body .bkv-page--fm h2.bkv-st__h2, html.skin-social .bb-screen .bkv-page--fm h2.bkv-st__h2 { margin-top: 1.25rem; }
.bkv-home .bb-place { margin: .25rem 0 .75rem; }
.bkv-accent.bkv-accent--own { color: var(--bb-green); }
/* v38 part 06 (v35 Part 3 item 6): the line under "How many people live in your home?" and the one-tap 1 / 2 / 3 / 4 / 5+ buttons */
.bkv-ask__hint { margin: .25rem 0 .75rem; color: var(--bb-muted); font: 400 var(--bb-fs-callout)/1.4 var(--bb-font-body); }
.bkv-quick { display: grid; grid-template-columns: repeat(5, minmax(2.75rem, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.bkv-quick__b { min-height: 2.75rem; border: 1.5px solid var(--bb-rule); border-radius: var(--bb-radius-button); background: var(--bb-card); color: var(--bb-ink);
  font: 600 var(--bb-fs-body)/1 var(--bb-font-body); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bkv-quick__b:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bkv-quick__b:active { background: var(--pk-secondary, var(--bb-paper-edge)); }
/* v38 part 08: "How we did the math ⓘ" under Your household's note: a 44pt row-link that opens the sources sheet */
button.bd-hh__math { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--bb-ink); font: 600 var(--bb-fs-footnote)/1.3 var(--bb-font-body); text-decoration: none; }
button.bd-hh__math:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; border-radius: var(--bb-radius-button); }
/* v38 part 08: "See Connecticut's ›" on a federal Books page is a 44pt row link, not underlined text */
.bkv-placenote a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bb-ink); font-weight: 600; text-decoration: none; }
.bkv-placenote a::after { content: "\00a0›"; content: "\00a0›" / ""; color: var(--bb-muted); }
/* v38 part 08 (PR #57 check): "Line by line" keeps its distance from the home state line above it */
.bd-hh__lines { margin-top: 1.25rem; }
/* v38 part 10 (BB-411 item 6): the row a Follow the Bucks stream opened ("Show as a list"): a soft ochre band and an ochre bar at
   its left, tokens only (light and Night) */
.bkv-lines li.is-hl { border-radius: var(--bb-radius-button); background: color-mix(in srgb, var(--chart-ochre) 16%, transparent);
  box-shadow: -.5rem 0 0 color-mix(in srgb, var(--chart-ochre) 16%, transparent), .5rem 0 0 color-mix(in srgb, var(--chart-ochre) 16%, transparent); }

/* v42 item 1: The shelf (js/books-shelf.js; switch booksShelf). On The Books' home, one more section under the rows that were there:
   a row of books you can scroll sideways (each one 44pt and up), then one row to the whole shelf. A government's page: its title, its
   report's page count, three lines from its balance sheet, and one wide button. */
.bsh-home { margin-top: 1.75rem; }
.bsh-home .bsh-home__h { margin-top: 0; }
.bsh-home__s { margin: .25rem 0 0; }
.bsh-books { display: flex; gap: .5rem; margin: .75rem -1rem 0; padding: .125rem 1rem .5rem; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 1rem; scrollbar-width: none; }
.bsh-books::-webkit-scrollbar { display: none; }
.bsh-book { flex: 0 0 auto; scroll-snap-align: start; }
.bsh-book__a { display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; min-width: 7.5rem; max-width: 11.5rem; min-height: 6.5rem; padding: .625rem .625rem .5rem .875rem;
  border: 1px solid var(--bb-rule); border-left: 4px solid var(--bb-green); border-radius: 6px var(--bb-radius-card) var(--bb-radius-card) 6px; background: var(--bb-card); color: var(--bb-ink); text-decoration: none; box-shadow: var(--bb-shadow-card); }
.bsh-book--later .bsh-book__a { border-left-color: var(--bb-rule); }
.bsh-book__t { font: 700 var(--bb-fs-callout)/1.2 var(--bb-font-display); overflow-wrap: normal; word-break: normal; hyphens: manual; }   /* Nov 19: a name never breaks mid-word (Chris: "Connecticut is wrongly cut off"); the book widens to fit its longest word */
.bsh-book__s { margin-top: .5rem; color: var(--bb-muted); font-size: var(--bb-fs-caption); line-height: 1.3; }
.bsh-book__a:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bsh-gov__h { overflow-wrap: anywhere; }
.bsh-pages { display: flex; flex-direction: column; gap: .125rem; margin: .5rem 0 0; }
.bsh-pages__n { font: 600 var(--bb-fs-headline)/1.3 var(--bb-font-body); color: var(--bb-ink); }
.bsh-pages__s { color: var(--bb-muted); font-size: var(--bb-fs-footnote); line-height: 1.4; }
.bsh-net { font-size: var(--bb-fs-footnote); color: var(--bb-muted); }
.bsh-ask { margin-top: 1.25rem; }
.bsh-ask .bd-btn--wide { margin-top: 0; text-align: center; }
.bsh-ask__btn:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bsh-ask__why { margin: .5rem 0 0; color: var(--bb-ink); font-size: var(--bb-fs-subhead); line-height: 1.4; }
.bsh-ask__why:empty { display: none; }

/* css/books-states.css: v41 Part B (folded into css/books-deep.css to keep the phone demo at 500 files), every government's books on one template (js/books-states.js).
   Rows are full width and at least 44pt tall; How it was checked uses no colors (Chris, Nov 18: neutral wording, no colors). */
.bs-template { margin-top: 1.25rem; }
.bs-sec { margin-top: 1.25rem; }
.bs-h2 { margin: 0; font: 700 var(--bb-fs-title3)/1.25 var(--bb-font-display); color: var(--bb-ink); }
.bs-rows { margin-top: .5rem; gap: .375rem; }
.bs-row { min-height: 2.75rem; width: 100%; box-sizing: border-box; padding-top: .5rem; padding-bottom: .5rem; text-decoration: none; }
.bs-row .bkv-card__txt { flex: 1 1 auto; min-width: 0; }
.bs-row .bkv-card__t { overflow-wrap: anywhere; }
.bs-v { font: 600 var(--bb-fs-subhead)/1.25 var(--bb-font-body); font-variant-numeric: tabular-nums; }
.bs-row--plain { cursor: default; }
/* BB-470 (Nov 20; Chris's Nov 19 report "Taken in and spent are pushable buttons but don't go anywhere", option A by default):
   a row that opens nothing (no link, no chevron) is drawn as plain figures, not a card: no fill, no card border (it turns clear, so nothing moves) or rounded corners,
   no shadow, one divider line under it, and no press or hover look (css/shell.css gives every .bkv-card a shrink and tint, and
   js/shell.js adds .is-down on touch). Label, amount, line text and the 44pt height stay as they are.
   tests/plain_rows_test.mjs checks it. */
.bkv-card.bkv-row--plain, .bkv-card.bs-row--plain { background: transparent; border-color: transparent transparent var(--bb-rule); border-radius: 0; box-shadow: none; cursor: default; }
.bkv-card.bkv-row--plain:is(:hover, :active, .is-down), .bkv-card.bs-row--plain:is(:hover, :active, .is-down) { transform: none; filter: none; box-shadow: none; }
.bs-method { margin: .375rem 0 0; color: var(--bb-muted); font-size: var(--bb-fs-footnote); line-height: 1.4; }
.bs-plain { margin-top: .5rem; }
.bs-foot { margin-top: .5rem; }
/* How it was checked: the same ink for every opinion, never a red, green or gold tone */
.bs-neutral .bkv-card__t, .bs-neutral .bkv-card__s { color: var(--bb-ink); }
.bs-neutral .bkv-card__s { color: var(--bb-muted); }
.bs-page .bkv-h { margin-top: .5rem; }
.bs-row:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
/* Nov 19: a state's Taken in / Spent by category (js/books-states.js flowPage): plain lines with bars, like Where it came from, not cards */
.bs-flow__list { margin-top: .75rem; }
.bs-flow__list > li + li { margin-top: .5rem; }
.bs-flow__txt { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.bs-flow__t { font: 600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color: var(--bb-ink); overflow-wrap: anywhere; }
.bs-flow__s, .bs-flow__m { font: 400 var(--bb-fs-footnote)/1.35 var(--bb-font-body); color: var(--bb-muted); }
.bs-flow__m { font-variant-numeric: tabular-nums; }
.bs-flow__parts { margin: .25rem 0 0; padding-left: .875rem; border-left: 2px solid var(--bb-rule); }
.bs-flow__line--part .bs-flow__t { font-weight: 500; }
/* Nov 20, v41 B8: Your town's books (js/books-states.js townPage): the ZIP code box, the pick list where a ZIP code crosses lines */
.bs-town__form { margin-top: .75rem; }
.bs-town__label { display: block; font: 600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color: var(--bb-ink); }
.bs-town__row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .375rem; }
.bs-town__zip { box-sizing: border-box; width: 8.5em; min-height: 2.75rem; padding: 0 .625rem; font: inherit; font-variant-numeric: tabular-nums; letter-spacing: .08em;
  border: 2px solid var(--bb-rule); border-radius: var(--bb-radius-button); background: var(--bb-card); color: var(--bb-ink); }
.bs-town__zip:focus-visible, .bs-town__go:focus-visible, .bs-town__opt:focus-visible, .bs-town__again:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bs-town__go { min-height: 2.75rem; padding: 0 1.25rem; }
.bs-town__help { margin-top: .375rem; }
.bs-town__msg:empty { display: none; }
.bs-town__pick { list-style: none; }
.bs-town__q { margin: .25rem 0 0; }
.bs-town__opt { width: 100%; font: inherit; text-align: left; color: var(--bb-ink); background: var(--bb-card); cursor: pointer; }
.bs-town__again { min-height: 2.75rem; padding: 0; border: 0; background: none; font: 600 var(--bb-fs-subhead)/1.3 var(--bb-font-body); color: var(--bb-ink); text-decoration: underline; cursor: pointer; }

/* v41 B7: Every state's books, the federal government first and every row one full-width 44pt target */
.al-st .al-st__a.al-st__line { display: grid; min-height: 2.75rem; }   /* beats css/audit-lines.css .al-st__a (loaded later) */
.al-st__line { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 3.5rem; align-items: center; column-gap: .5rem; min-height: 2.75rem; padding: .375rem 0; color: var(--bb-ink); text-decoration: none; }
.al-st__line .al-st__n { font-weight: 600; overflow-wrap: anywhere; }
.al-st__line .al-st__r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-st__line .al-st__r--na { color: var(--bb-muted); font-size: var(--bb-fs-footnote); white-space: normal; }
.al-st__line .al-st__y { text-align: right; color: var(--bb-muted); font-size: var(--bb-fs-footnote); font-variant-numeric: tabular-nums; }
.al-st__cell { padding: 0; }
.al-st__row--fed { background: var(--bb-card); }
.al-st__row--fed .al-st__line, .al-st__row--home .al-st__line { padding-left: .625rem; }
.al-st__line:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: -3px; }
@media (max-width: 22rem) { .al-st__line { grid-template-columns: minmax(0, 1fr) 6.5rem 3rem; } }
.al-st { table-layout: fixed; }
.al-st__th--ratio { width: 9rem; }
.al-st__th--fy { width: 3.5rem; }
@media (max-width: 22rem) { .al-st__th--ratio { width: 6.5rem; } .al-st__th--fy { width: 3rem; } }

/* Large text (BB-189 follow-up; the "bbtext" container and its 13em line are explained in css/nav-bar.css). Only at very large text:
   a row's amount drops under its name (a card's chevron goes with it, at the right edge), so the name has the whole width and never breaks
   inside a word; a lesson's number sits above its title. At normal sizes none of this applies. */
@container bbtext (max-width: 13em) {
  html body .bkv-card { flex-wrap: wrap; row-gap: .25rem; }
  html body .bkv-card > .bkv-card__txt { flex: 1 1 100%; }
  html body .bkv-card > .bkv-card__v { flex: 0 1 auto; min-width: 0; margin-left: 0; text-align: left; white-space: normal; }
  html body .bkv-card > .bkv-chev { margin-left: auto; }
  html body .bkv-line { grid-template-columns: minmax(0, 1fr); }
  html body .bkv-line > .bkv-line__v { justify-self: start; white-space: normal; }
  html body .bd-lesson { grid-template-columns: auto 1fr auto; grid-template-areas: "m . c" "t t t" "s s s"; }
  html body .bkv-ct__row { grid-template-columns: minmax(0, 1fr); }
  html body .bkv-h .bkv-accent { white-space: normal; }   /* the headline's amount ("$44.2 trillion") may wrap, never run off the screen */
}

/* file: css/books-lines.css */
/* BooksLines (js/books-lines.js): a link to the exact number + where it has been (v19 W10, mock
   brand/ui-screens/ask-the-books/w10-line-history-and-link-light.png). Tokens only; dark mode follows the tokens. */
:root {
  --bl-est: color-mix(in srgb, var(--bb-paper-edge) 75%, var(--bb-rule));
  --bl-close: color-mix(in srgb, var(--bb-gold) 30%, var(--bb-card));
  --bl-actual: var(--bd-right, color-mix(in srgb, var(--bb-green) 14%, var(--bb-card)));
  --bl-banner: color-mix(in srgb, var(--bb-gold) 16%, var(--bb-card));
}
:root[data-theme="dark"], .bb-dark {
  --bl-est: color-mix(in srgb, var(--bb-rule) 85%, var(--bb-card));
  --bl-close: color-mix(in srgb, var(--bb-gold) 28%, var(--bb-card));
  --bl-banner: color-mix(in srgb, var(--bb-gold) 14%, var(--bb-card));
}

/* the headline on a line page: eyebrow, value, tag + "of every 100 bucks" */
html body .bl-h1 { margin: .5rem 0 .5rem; }
.bl-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 1.25rem; color: var(--bb-muted); }

/* data tags: Actual · Close · Estimate (BRAND.md) */
.bl-tag { display: inline-flex; align-items: center; min-height: 1.5rem; padding: .1rem .6rem; border-radius: var(--bb-radius-pill); font: 700 var(--bb-fs-caption)/1.2 var(--bb-font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--bb-ink); background: var(--bl-est); white-space: nowrap; }
.bl-tag--close { background: var(--bl-close); }
.bl-tag--actual { background: var(--bl-actual); }

/* "This number changed since it was shared" */
.bl-banner { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--bb-gold); border-radius: var(--bb-radius-card); background: var(--bl-banner); }
.bl-banner p { margin: 0; }
.bl-banner__t { font-weight: 700; color: var(--bb-ink); }
.bl-banner__nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin: .5rem 0 !important; font-size: var(--bb-fs-body); }
.bl-banner__k { color: var(--bb-muted); font-size: var(--bb-fs-footnote); }
.bl-banner__old s { color: var(--bb-muted); }
.bl-banner__arrow { color: var(--bb-gold-text); }
.bl-banner__s { color: var(--bb-muted); font-size: var(--bb-fs-subhead); }

/* "Where this number has been" */
.bl-panel { margin: 0 0 1.25rem; }
.bl-card { background: var(--bb-card); border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); padding: 1.25rem 1.25rem 1rem; margin: 0 0 1.5rem; }
html body .bl-card__t { margin: 0 0 1rem; font: 700 var(--bb-fs-body)/1.3 var(--bb-font-body); color: var(--bb-ink); letter-spacing: 0; text-transform: none; }
.bl-steps { list-style: none; margin: 0; padding: 0; }
.bl-step { position: relative; display: grid; grid-template-columns: 1.5rem 1fr auto; gap: .25rem .75rem; align-items: start; padding: 0 0 1.25rem; }
.bl-step:last-child { padding-bottom: .25rem; }
.bl-step:not(:last-child)::before { content: ""; position: absolute; left: calc(.75rem - 1px); top: 1.25rem; bottom: 0; width: 2px; background: var(--bb-rule); }
.bl-step__dot { width: 1rem; height: 1rem; margin: .2rem 0 0 .25rem; border-radius: var(--bb-radius-pill); border: 2px solid var(--bb-rule); background: var(--bb-card); position: relative; }
.bl-step.is-done .bl-step__dot { background: var(--bb-green); border-color: var(--bb-green); }
.bl-step.is-now .bl-step__dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bb-green) 25%, transparent); }
.bl-step__txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.bl-step__t { font-weight: 700; color: var(--bb-ink); line-height: 1.3; }
.bl-step__s { color: var(--bb-muted); font-size: var(--bb-fs-subhead); line-height: 1.35; }
.bl-step .bl-tag { margin-top: .1rem; }
.bl-card__foot { margin: .5rem 0 0; padding-top: .75rem; border-top: 1px solid var(--bb-rule); color: var(--bb-muted); font-size: var(--bb-fs-footnote); }

/* "Share this exact number" */
.bl-share { display: flex; flex-direction: column; gap: .75rem; }
html body .bl-share__t { margin: 0; font: 600 var(--bb-text-label, .8125rem)/1.3 var(--bb-font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--bb-gold-text); }
.bl-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3.25rem; padding: .75rem 1.25rem; border-radius: var(--bb-radius-pill); border: 1px solid transparent; font: 600 var(--bb-fs-body)/1.2 var(--bb-font-body); cursor: pointer; }
.bl-btn--quiet { background: var(--bl-est); color: var(--bb-ink); }
.bl-btn--main { background: var(--bb-green); color: var(--bb-on-green); }
.bl-btn:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 2px; }
.bl-ic { width: 1.25rem; height: 1.25rem; flex: none; }
.bl-share__input { width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-button); background: var(--bb-card); color: var(--bb-ink); font: inherit; font-size: var(--bb-fs-subhead); }
.bl-share__manual:empty, .bl-share__status:empty { display: none; }
.bl-share__status { margin: 0; text-align: center; font-weight: 600; color: var(--bb-ink); }
.bl-share__note { margin: 0; text-align: center; color: var(--bb-muted); font-size: var(--bb-fs-footnote); }
.bl-src { margin: 1.5rem 0 0; color: var(--bb-muted); font-size: var(--bb-fs-footnote); }

/* "Every line, fiscal 2026" on This year's money */
.bl-year { margin: 1.25rem 0; border: 1px solid var(--bb-rule); border-radius: var(--bb-radius-card); background: var(--bb-card); padding: 0 1.25rem; }
.bl-year > summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; padding: .75rem 0; }
.bl-year[open] { padding-bottom: 1rem; }
html body .bl-year__h { margin: .75rem 0 .25rem; font: 600 var(--bb-fs-footnote)/1.3 var(--bb-font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--bb-gold-text); }
.bl-year__list { list-style: none; margin: 0; padding: 0; }
.bl-year__row { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; align-items: center; min-height: 44px; border-bottom: 1px solid var(--bb-rule); color: var(--bb-ink); text-decoration: none; }
.bl-year__list li:last-child .bl-year__row { border-bottom: 0; }
.bl-year__v { font-variant-numeric: tabular-nums; font-weight: 600; }

/* the line page's top bar: back at the left, the line's name in the middle (as mocked); a long name is cut with an ellipsis */
.bl-page > .bd-top > .bd-top__back { flex: none; white-space: nowrap; }
html body .bl-page > .bd-top > .bd-top__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-page > .bd-top > span:last-child { flex: 0 1 2.75rem; min-width: 0; }

/* the breadcrumb on a line page (and a Books node page, sweep 2 item 18) stays on one row: "The Books › What he owes › Money it borr…". The parents never shrink;
   the line's own name (shown in full right below, in the headline) is cut with an ellipsis when the row is too narrow. */
.bl-page > .bd-crumbs ol, .bd-page--node > .bd-crumbs ol { flex-wrap: nowrap; }
.bl-page > .bd-crumbs li, .bd-page--node > .bd-crumbs li { flex: none; }
.bl-page > .bd-crumbs li:last-child, .bd-page--node > .bd-crumbs li:last-child { flex: 0 1 auto; min-width: 0; }
.bl-page > .bd-crumbs li:last-child > [aria-current], .bd-page--node > .bd-crumbs li:last-child > [aria-current] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 44px; }
