/* Consumer shell v3: classes only, on the Passbook tokens (--pb-*) declared in
   dd-design-system.css. Every size is a --fs-* token, every gap a --sp-* token,
   every radius a --radius-* token. No hex, no literal font sizes. */

.cv3-app { --cv3-topbar-h: 68px; min-height: 100dvh; background: var(--pb-app); color: var(--pb-ink); display: flex; flex-direction: column; }
.cv3-tabular { font-variant-numeric: tabular-nums lining-nums; }
.cv3-overline { font-family: var(--pb-display); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--track-overline); text-transform: uppercase; color: var(--pb-ink-mute); margin: 0; }

/* strips */
.cv3-strips { display: flex; flex-direction: column; }
.cv3-strip { font-size: var(--fs-xs); line-height: 1.4; padding: var(--sp-2) var(--sp-4); }
.cv3-strip--demo { background: var(--pb-caution-wash); color: var(--pb-ink); border-bottom: 1px solid var(--pb-caution-border); }
.cv3-strip--trust { background: var(--pb-plate); border-bottom: 1px solid var(--pb-line); }
.cv3-strip__toggle { display: inline-flex; align-items: center; gap: var(--sp-2); background: none; border: 0; padding-block: var(--sp-2); margin-block: calc(var(--sp-2) * -1); padding-inline: 0; min-height: 0; color: var(--pb-ink-soft); font: inherit; cursor: pointer; }
.cv3-strip__shield { display: inline-flex; width: 16px; height: 16px; border-radius: var(--radius-pill); background: var(--pb-accent-wash); color: var(--pb-accent-deep); align-items: center; justify-content: center; font-size: var(--fs-2xs); }
.cv3-strip__more { color: var(--pb-accent-deep); font-weight: 600; text-decoration: underline; }
.cv3-strip__body { margin: var(--sp-2) 0 0; color: var(--pb-ink-soft); }

/* top bar */
.cv3-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--pb-card); border-bottom: 1px solid var(--pb-line); position: sticky; top: 0; z-index: 40; }
.cv3-topbar__lead { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.cv3-topbar__mark { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; }
.cv3-topbar__logo { height: 22px; width: auto; max-width: 120px; }
.cv3-topbar__greet { display: flex; flex-direction: column; line-height: 1.15; }
.cv3-topbar__hello { font-size: var(--fs-2xs); color: var(--pb-ink-mute); }
.cv3-topbar__name { font-family: var(--pb-display); font-size: var(--fs-md); font-weight: 700; }
.cv3-topbar__back { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; background: none; border: 0; font-size: var(--fs-h2); line-height: 1; color: var(--pb-ink); padding: 0 var(--sp-2); margin-left: calc(var(--sp-2) * -1); border-radius: var(--radius-pill); cursor: pointer; }
.cv3-topbar__title { font-family: var(--pb-display); font-size: var(--fs-md); font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv3-topbar__actions { display: flex; align-items: center; gap: var(--sp-2); }
.cv3-topbar__brandname { font-size: var(--fs-xs); color: var(--pb-ink-soft); }
.cv3-iconbtn { position: relative; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 1px solid transparent; background: transparent; color: var(--pb-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: var(--fs-md); }
.cv3-iconbtn:hover { background: var(--pb-plate); }
.cv3-iconbtn--avatar { background: var(--pb-accent); color: var(--pb-card); font-weight: 700; font-family: var(--pb-display); }
.cv3-iconbtn__badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--pb-accent); color: var(--pb-card); font-size: var(--fs-2xs); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* canvas */
.cv3-canvas { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) calc(var(--tabbar-height) + env(safe-area-inset-bottom) + var(--sp-6)); display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.cv3-main { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-5); outline: none; }
.cv3-rail { display: none; flex-direction: column; gap: var(--sp-4); }
@media (min-width: 900px) {
  .cv3-canvas--rail { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .cv3-rail { display: flex; }
  .cv3-canvas { padding-bottom: var(--sp-8); }
  /* min-height, never height: .cv3-topbar__name has no white-space rule, so a
     fixed height would clip a long first name. Phone is untouched. */
  .cv3-topbar { min-height: var(--cv3-topbar-h); }
  .cv3-tabbar { top: var(--cv3-topbar-h); z-index: 39; }
  /* One reading measure. The rail is home-only, so every other screen was one
     ~1008px column and set its longest sentence across all of it. */
  .cv3-canvas:not(.cv3-canvas--rail):not(.cv3-canvas--wide) > .cv3-main { max-width: 680px; margin-inline: auto; }
}

/* sections */
.cv3-section { display: flex; flex-direction: column; gap: var(--sp-3); }
.cv3-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 44px; }
.cv3-section__more { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--sp-2); margin-right: calc(var(--sp-2) * -1); font-size: var(--fs-xs); font-weight: 600; color: var(--pb-accent-deep); text-decoration: none; }
.cv3-section__more:hover { text-decoration: underline; }

/* cards + rows */
.cv3-card { background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-wallet); box-shadow: var(--shadow-float); padding: var(--sp-4); }
.cv3-picture { display: flex; flex-direction: column; gap: var(--sp-4); }
.cv3-picture__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.cv3-picture__title { font-family: var(--pb-display); font-size: var(--fs-lead); line-height: 1.2; letter-spacing: -0.02em; margin: var(--sp-2) 0; color: var(--pb-ink); }
.cv3-picture__loading { font-family: var(--pb-serif); font-size: var(--fs-md); line-height: 1.35; color: var(--pb-ink); margin: 0; }
.cv3-picture__refresh { flex-shrink: 0; min-height: 44px; padding: 0 var(--sp-3); border: 1px solid var(--pb-line); border-radius: var(--radius-pill); background: var(--pb-card); color: var(--pb-accent-deep); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.cv3-picture__refresh:hover, .cv3-picture__secondary:hover { background: var(--pb-plate); }
.cv3-picture__refresh:disabled { opacity: 0.6; cursor: wait; }
.cv3-picture__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.cv3-picture__metric { min-width: 0; padding: var(--sp-3); background: var(--pb-plate); border-radius: var(--radius-md); }
.cv3-picture__metric-label { display: block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pb-ink-mute); }
.cv3-picture__metric-value { display: block; margin-top: var(--sp-1); font-family: var(--pb-display); font-size: var(--fs-md); line-height: 1.15; color: var(--pb-ink); font-variant-numeric: tabular-nums lining-nums; }
.cv3-picture__metric-note { display: block; margin-top: var(--sp-1); font-size: var(--fs-2xs); line-height: 1.35; color: var(--pb-ink-soft); }
.cv3-picture__not-entered { font-family: var(--pb-display); font-size: var(--fs-sm); font-weight: 700; }
.cv3-picture__source-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.cv3-picture__source-split > div { display: flex; flex-direction: column; gap: var(--sp-0-5); min-width: 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--pb-line); border-radius: var(--radius-md); background: var(--pb-card); }
.cv3-picture__source-split strong { margin-top: var(--sp-1); color: var(--pb-ink); font-family: var(--pb-display); font-size: var(--fs-md); font-variant-numeric: tabular-nums lining-nums; }
.cv3-picture__source-split small { color: var(--pb-ink-mute); font-size: var(--fs-2xs); }
.cv3-picture__coverage { padding-top: var(--sp-3); border-top: 1px solid var(--pb-line); }
.cv3-picture__progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); margin: calc(var(--sp-2) * -1) 0 0; padding: 0 0 var(--sp-2); list-style: none; border-bottom: 1px solid var(--pb-line); }
.cv3-picture__progress li { position: relative; display: flex; align-items: center; gap: var(--sp-1); min-width: 0; padding-top: var(--sp-2); color: var(--pb-ink-mute); font-size: var(--fs-2xs); }
.cv3-picture__progress li:not(:last-child)::after { content: ''; position: absolute; top: calc(var(--sp-2) + var(--sp-2)); right: var(--sp-1); left: calc(var(--sp-4) + var(--sp-1)); border-top: 1px solid var(--pb-line); }
.cv3-picture__progress li span { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 var(--sp-4); width: var(--sp-4); height: var(--sp-4); border: 1px solid var(--pb-line); border-radius: var(--radius-pill); background: var(--pb-card); font-size: var(--fs-2xs); font-weight: 700; }
.cv3-picture__progress li strong { position: relative; z-index: 1; min-width: 0; font-weight: 600; line-height: 1.25; }
.cv3-picture__progress li.is-current, .cv3-picture__progress li.is-complete { color: var(--pb-accent-deep); }
.cv3-picture__progress li.is-current span { border-color: var(--pb-accent); background: var(--pb-accent-wash); }
.cv3-picture__progress li.is-complete span { border-color: var(--pb-accent); background: var(--pb-accent); color: var(--pb-card); }
.cv3-picture__coverage-head { display: flex; justify-content: space-between; gap: var(--sp-3); align-items: baseline; }
.cv3-picture__coverage-head strong { font-size: var(--fs-sm); color: var(--pb-ink); }
.cv3-picture__bar { height: var(--sp-1-5); margin-top: var(--sp-2); border-radius: var(--radius-pill); background: var(--pb-line); overflow: hidden; }
.cv3-picture__bar span { display: block; height: 100%; border-radius: inherit; background: var(--pb-accent); transition: width 0.35s var(--ease-standard); }
.cv3-picture__detail-coverage { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--sp-3); align-items: baseline; margin-top: var(--sp-2); color: var(--pb-ink-soft); font-size: var(--fs-2xs); }
.cv3-picture__detail-coverage strong { color: var(--pb-ink); font-size: var(--fs-xs); }
.cv3-picture__detail-coverage small { grid-column: 1 / -1; color: var(--pb-ink-mute); }
.cv3-picture__financial { gap: var(--sp-3); }
.cv3-picture__financial-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.cv3-picture__financial-head > div { min-width: 0; }
.cv3-picture__financial-head .cv3-picture__title { margin-bottom: var(--sp-1); }
.cv3-picture__financial-head .cv3-muted { margin: 0; }
.cv3-picture__financial-action { flex-shrink: 0; }
.cv3-picture__financial-metrics { margin-top: var(--sp-1); }
.cv3-picture__read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.cv3-picture__read-title { display: block; margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-md); line-height: 1.3; color: var(--pb-ink); }
.cv3-picture__insight { padding-left: var(--sp-4); border-left: 2px solid var(--pb-accent); }
.cv3-picture__insight strong { display: block; margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-sm); color: var(--pb-ink); }
.cv3-picture__signals { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--pb-line); border-radius: var(--radius-md); color: var(--pb-ink-soft); font-size: var(--fs-xs); line-height: 1.45; }
.cv3-picture__signals span + span { padding-left: var(--sp-2); border-left: 1px solid var(--pb-line); }
.cv3-picture__records { padding-top: var(--sp-3); border-top: 1px solid var(--pb-line); }
.cv3-picture__records-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.cv3-picture__records-head strong { display: block; margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--pb-ink); }
.cv3-picture__records-link, .cv3-picture__records-more { border: 0; background: transparent; color: var(--pb-accent-deep); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.cv3-picture__records-link { min-height: 44px; padding: 0; }
.cv3-picture__records-link:hover, .cv3-picture__records-more:hover { text-decoration: underline; }
.cv3-picture__record-list { margin: var(--sp-2) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--pb-line); }
.cv3-picture__record { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--pb-line); }
.cv3-picture__record-mark { display: inline-block; width: var(--sp-2); height: var(--sp-2); border-radius: var(--radius-pill); background: var(--pb-ink-mute); }
.cv3-picture__record-mark--connected { background: var(--pb-accent); }
.cv3-picture__record-mark--draft { background: var(--pb-caution); }
.cv3-picture__record-mark--waiting { background: var(--pb-ink-mute); }
.cv3-picture__record-main { display: flex; flex-direction: column; min-width: 0; }
.cv3-picture__record-main strong { overflow: hidden; color: var(--pb-ink); font-size: var(--fs-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cv3-picture__record-main small { margin-top: var(--sp-0-5); color: var(--pb-ink-soft); font-size: var(--fs-2xs); }
.cv3-picture__status { padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-pill); font-size: var(--fs-2xs); font-weight: 700; white-space: nowrap; }
.cv3-picture__status--connected { background: var(--pb-accent-wash); color: var(--pb-accent-deep); }
.cv3-picture__status--draft { background: var(--pb-plate); color: var(--pb-ink-soft); }
.cv3-picture__status--waiting { background: var(--pb-caution-wash); color: var(--pb-caution); }
.cv3-picture__record-balance { min-width: 7ch; color: var(--pb-ink); font-size: var(--fs-sm); text-align: right; }
.cv3-picture__records-more { margin-top: var(--sp-2); padding: 0; }
.cv3-picture__records-note { margin: var(--sp-2) 0 0; color: var(--pb-ink-mute); font-size: var(--fs-2xs); }
.cv3-picture__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cv3-picture__primary, .cv3-picture__secondary { min-height: 44px; padding: 0 var(--sp-4); border-radius: var(--radius-pill); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.cv3-picture__primary { border: 1px solid var(--pb-ink); background: var(--pb-ink); color: var(--pb-card); }
.cv3-picture__primary:hover { background: var(--pb-accent-deep); border-color: var(--pb-accent-deep); }
.cv3-picture__secondary { border: 1px solid var(--pb-line); background: var(--pb-card); color: var(--pb-accent-deep); }
.cv3-picture__fine { margin: 0; font-size: var(--fs-2xs); line-height: 1.5; color: var(--pb-ink-mute); }
.cv3-picture--error { border-color: var(--pb-caution-border); }
.cv3-picture--error .cv3-picture__title { margin-bottom: var(--sp-1); }
@media (max-width: 640px) {
  .cv3-picture__head { flex-direction: column; }
  .cv3-picture__refresh { align-self: flex-start; }
  .cv3-picture__progress { grid-template-columns: 1fr; gap: 0; }
  .cv3-picture__progress li { padding-top: var(--sp-2); }
  .cv3-picture__progress li:not(:last-child)::after { top: calc(var(--sp-2) + var(--sp-2)); right: auto; bottom: calc(var(--sp-2) * -1); left: calc(var(--sp-2) + var(--sp-1)); height: var(--sp-2); border-top: 0; border-left: 1px solid var(--pb-line); }
  .cv3-picture__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv3-picture__source-split { grid-template-columns: 1fr; }
  .cv3-picture__financial-head { flex-direction: column; }
  .cv3-picture__financial-action { align-self: flex-start; }
  .cv3-picture__record { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cv3-picture__status { grid-column: 2; grid-row: 2; justify-self: start; }
  .cv3-picture__record-balance { grid-column: 3; grid-row: 1 / span 2; }
  .cv3-picture__read { grid-template-columns: 1fr; }
  .cv3-picture__insight { padding-left: 0; padding-top: var(--sp-3); border-left: 0; border-top: 2px solid var(--pb-accent); }
  .cv3-picture__signals { flex-direction: column; }
  .cv3-picture__signals span + span { padding-left: 0; border-left: 0; padding-top: var(--sp-2); border-top: 1px solid var(--pb-line); }
}
.cv3-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left; background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); color: var(--pb-ink); text-decoration: none; cursor: pointer; font: inherit; min-height: 56px; }
.cv3-row:hover { background: var(--pb-plate); }
.cv3-row--neutral { /* the default row: named so the class in the DOM is not a lie */ }
.cv3-row--accent { border-left-width: var(--sp-0-5); border-left-color: var(--pb-accent); padding-left: calc(var(--sp-4) - var(--sp-0-5)); }
.cv3-row--caution { border-left-width: var(--sp-0-5); border-left-color: var(--pb-caution); padding-left: calc(var(--sp-4) - var(--sp-0-5)); }
.cv3-row--urgent { border-left-width: var(--sp-0-5); border-left-color: var(--pb-caution); padding-left: calc(var(--sp-4) - var(--sp-0-5)); background: var(--pb-plate); }
/* .cv3-row:hover is (0,2,0) and beats every tone class, so without these a
   hovered row erased its own mark's surface. */
.cv3-row--accent:hover, .cv3-row--caution:hover { background: var(--pb-card); }
.cv3-row--urgent:hover { background: var(--pb-caution-wash); }
/* The calm state: not interactive, so it is a div, and it never hovers. */
.cv3-row--calm { background: var(--pb-accent-wash); border-color: var(--pb-accent); cursor: default; }
.cv3-row--calm:hover { background: var(--pb-accent-wash); }
/* The ask must not be smaller than the reassurance. Scoped to the needs
   section so Help, Account and Payments rows keep the body size. */
#needs .cv3-row__title { font-size: var(--fs-md); }
.cv3-row[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.cv3-row__icon { display: inline-flex; width: 28px; justify-content: center; color: var(--pb-ink-mute); }
.cv3-row__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cv3-row__title { font-weight: 600; font-size: var(--fs-sm); }
.cv3-row__detail { font-size: var(--fs-xs); color: var(--pb-ink-soft); }
.cv3-row__verb { font-size: var(--fs-xs); font-weight: 700; color: var(--pb-accent-deep); white-space: nowrap; }
.cv3-row__chev { color: var(--pb-ink-mute); font-size: var(--fs-md); }

/* identity */
.cv3-identity { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.cv3-identity__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cv3-identity__title { font-weight: 700; font-size: var(--fs-sm); color: var(--pb-ink); }
.cv3-identity--lg .cv3-identity__title { font-family: var(--pb-display); font-size: var(--fs-md); }
.cv3-identity__sub { font-size: var(--fs-xs); color: var(--pb-ink-soft); }
.cv3-chip { --cv3-chip-brand: var(--pb-ink-mute); display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-md); background: var(--pb-lozenge-bg); border: 1px solid var(--pb-lozenge-border); align-items: center; justify-content: center; position: relative; overflow: hidden; }
.cv3-identity--lg .cv3-chip { width: 48px; height: 48px; }
.cv3-chip::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 4px; height: 2px; border-radius: var(--radius-pill); background: var(--cv3-chip-brand); }
.cv3-chip__initials { font-family: var(--pb-display); font-size: var(--fs-xs); font-weight: 700; color: var(--pb-ink); }
.cv3-chip__logo { width: 70%; height: auto; }

/* amounts + progress */
/* Money sets its own size and colour inline; these classes only place it. */
.cv3-amount { display: inline-block; }
.cv3-amount--hero { line-height: 1; }
/* The wash track measures 1.10:1 on white: the bar had no visible extent, and
   the empty track was a paler tint of its own fill. The hairline every other
   edge uses leaves the green fill at ~3.5:1, past the 3:1 floor. */
.cv3-progress { height: 6px; border-radius: var(--radius-pill); background: var(--pb-line); overflow: hidden; }
.cv3-progress__fill { height: 100%; background: var(--pb-accent); border-radius: var(--radius-pill); transition: width 0.4s var(--ease-standard); }

/* tab bar */
.cv3-tabbar { position: fixed; left: var(--sp-4); right: var(--sp-4); bottom: calc(env(safe-area-inset-bottom) + var(--sp-4)); z-index: 50; display: flex; justify-content: space-around; background: var(--tabbar-bg); border: 1px solid var(--pb-line); border-radius: var(--radius-capsule); box-shadow: var(--shadow-float); padding: var(--sp-1) var(--sp-2); }
@supports (backdrop-filter: blur(6px)) { .cv3-tabbar { backdrop-filter: var(--tabbar-blur); } }
.cv3-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-0-5); min-width: 64px; min-height: 52px; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-md); color: var(--tabbar-inactive); text-decoration: none; font-size: var(--fs-2xs); font-weight: 600; }
.cv3-tab--active { color: var(--tabbar-active); background: var(--pb-plate); }
.cv3-tab__icon { display: inline-flex; width: 22px; height: 22px; }
.cv3-tab__icon svg { width: 22px; height: 22px; }
.cv3-tab__badge { position: absolute; top: var(--sp-0-5); right: var(--sp-2-5); min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--pb-accent); color: var(--pb-card); font-size: var(--fs-2xs); display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .cv3-tabbar { position: sticky; top: 0; left: auto; right: auto; bottom: auto; justify-content: center; gap: var(--sp-2); border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; background: var(--pb-card); }
  .cv3-tab { flex-direction: row; gap: var(--sp-2); min-height: 44px; font-size: var(--fs-sm); }
}

/* focus + motion */
/* The design system already gives links a 2px navy outline (dd-design-system
   .css:524). This selector is (0,2,0) against that (0,1,1), so the portal was
   REPLACING a compliant ring with --focus-ring, measured in the browser at
   1.61:1 on the card and 1.57:1 on the app ground where 3:1 is the floor.
   --pb-accent-deep measures 8.05:1 and 7.21:1 on those same two surfaces. */
.cv3-app :focus-visible { outline: 2px solid var(--pb-accent-deep); outline-offset: 2px; }
/* Kill the residual haze the design system paints on buttons, without a blanket
   box-shadow:none, which would strip --shadow-float from a focused debt card. */
.cv3-app button:focus-visible, .cv3-app .btn:focus-visible, .cv3-app .pb-btn:focus-visible { box-shadow: none; }
/* The route-change focus target must not paint a box around the whole column.
   It wins on specificity, (0,3,0) against (0,2,0); this is not order-dependent. */
.cv3-app .cv3-main:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .cv3-progress__fill { transition: none; } }
.cv3-loading { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ── train 1: home + debts ─────────────────────────────────────────────── */
.cv3-stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.cv3-deck { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 640px) { .cv3-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cv3-debt { display: flex; flex-direction: column; gap: var(--sp-3); background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-wallet); box-shadow: var(--shadow-float); padding: var(--sp-4); color: var(--pb-ink); text-decoration: none; transition: transform .18s var(--ease-standard), box-shadow .18s var(--ease-standard); }
.cv3-debt:hover { transform: translateY(-1px); box-shadow: var(--shadow-floating); }
.cv3-debt__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.cv3-debt__chev { color: var(--pb-ink-mute); font-size: var(--fs-md); }
.cv3-debt__figures { display: flex; flex-direction: column; gap: var(--sp-2); }
.cv3-debt__lead { display: flex; align-items: baseline; gap: var(--sp-2); }
.cv3-debt__leadnote { font-size: var(--fs-xs); font-weight: 600; color: var(--pb-ink-mute); }
.cv3-debt__sub { font-size: var(--fs-xs); color: var(--pb-ink-soft); }
.cv3-debt__status { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.cv3-debt__signal { display: inline-flex; align-items: center; gap: var(--sp-1-5); font-size: var(--fs-xs); font-weight: 600; color: var(--pb-ink-soft); }
.cv3-debt__signal--mute { color: var(--pb-ink-mute); font-weight: 500; }
.cv3-debt__dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--pb-accent); }

.cv3-hero { background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-wallet); box-shadow: var(--shadow-float); padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.cv3-hero__lead { display: flex; flex-direction: column; gap: var(--sp-1); }
.cv3-hero__label { font-size: var(--fs-sm); font-weight: 600; color: var(--pb-ink-soft); }
.cv3-hero__quiet { font-family: var(--pb-serif); font-size: var(--fs-h3); color: var(--pb-ink); }
.cv3-hero__ground { display: flex; flex-direction: column; gap: var(--sp-2); }
.cv3-hero__note { font-size: var(--fs-xs); color: var(--pb-ink-mute); font-weight: 600; letter-spacing: 0.02em; }
.cv3-hero__serif { font-family: var(--pb-serif); font-size: var(--fs-lead); line-height: 1.3; color: var(--pb-ink); margin: 0; }
/* The sentence that makes the big number honest was the least legible text on
   the card. --pb-ink-soft measures ~9:1 against 4.84:1. */
.cv3-hero__fine { font-size: var(--fs-xs); color: var(--pb-ink-soft); line-height: 1.5; margin: 0; }
.cv3-hero--compact { padding: var(--sp-4); }

.cv3-list { list-style: none; margin: 0; padding: 0; background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-wallet); box-shadow: var(--shadow-float); overflow: hidden; }
.cv3-list__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--pb-line); }
.cv3-list__row:first-child { border-top: 0; }
.cv3-list__lead { display: flex; flex-direction: column; min-width: 0; }
.cv3-list__title { font-size: var(--fs-sm); font-weight: 600; }
.cv3-list__sub { font-size: var(--fs-xs); color: var(--pb-ink-soft); }

.cv3-filters { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-2) var(--sp-1); margin-inline: calc(var(--sp-1) * -1); }
.cv3-filter { flex-shrink: 0; min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--radius-pill); border: 1px solid var(--pb-line); background: var(--pb-card); color: var(--pb-ink-soft); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.cv3-filter--on { background: var(--pb-ink); color: var(--pb-card); border-color: var(--pb-ink); }
.cv3-empty, .cv3-muted { font-size: var(--fs-sm); color: var(--pb-ink-soft); margin: 0; }
.cv3-foot { font-size: var(--fs-xs); color: var(--pb-ink-mute); margin: 0; text-align: right; }
.cv3-engine { background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-wallet); padding: var(--sp-2); }
.cv3-rail__next { display: flex; flex-direction: column; gap: var(--sp-1); }
.cv3-rail__when { font-size: var(--fs-xs); color: var(--pb-ink-soft); display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.cv3-identity--sm .cv3-chip { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.cv3-identity--sm .cv3-chip__initials { font-size: var(--fs-2xs); }
.cv3-identity--sm .cv3-identity__title { font-size: var(--fs-xs); }

/* The portal's own identification, and the agreements a person accepted. */
.cv3-footer { padding: var(--sp-6) var(--sp-4) calc(var(--sp-16) + env(safe-area-inset-bottom)); text-align: center; color: var(--pb-ink-soft); font-size: var(--fs-xs); line-height: 1.6; }
.cv3-footer p { margin: 0 0 var(--sp-2); }
.cv3-footer a { color: var(--pb-ink-soft); text-decoration: underline; padding: var(--sp-1); display: inline-block; }
@media (min-width: 900px) { .cv3-footer { padding-bottom: var(--sp-8); } }

/* account menu + screen-reader-only text */
.cv3-menu { position: relative; }
.cv3-menu__pop { position: absolute; right: 0; top: calc(100% + var(--sp-1)); min-width: 180px; background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--radius-md); box-shadow: var(--shadow-floating); padding: var(--sp-1); z-index: 60; display: flex; flex-direction: column; }
.cv3-menu__item { text-align: left; background: none; border: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--pb-ink); cursor: pointer; min-height: 44px; }
.cv3-menu__item:hover { background: var(--pb-plate); }
.cv3-menu__item--quiet { color: var(--pb-ink-soft); }
.cv3-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the laptop rail carries the hero and the next payment; hide the in-column copies there */
@media (min-width: 900px) { .cv3-canvas--rail .cv3-main > .cv3-narrow-only { display: none; } }
/* the page ground stays warm below the shell, whatever the legacy html sets */
html.cv3-on, html.cv3-on body { background: var(--pb-app); color-scheme: only light; }

/* ---------------------------------------------------------------------------
   Trains 2 to 4: one debt, payments, help and rights, account.
   The engines mounted inside these screens carry their own styles; the classes
   here only host them, so a hosted engine never sits inside two card frames.
   --------------------------------------------------------------------------- */
.cv3-detail { display: flex; flex-direction: column; gap: var(--sp-4); }
.cv3-engine--page { padding: 0; background: transparent; border: 0; }
.cv3-engine--table { padding: 0; overflow-x: auto; }
.cv3-list--flat { box-shadow: none; border-radius: var(--radius-md); }
.cv3-muted { color: var(--pb-ink-soft); font-size: var(--fs-sm); margin: 0; }
.cv3-month { display: flex; flex-direction: column; gap: var(--sp-2); }
.cv3-month__label { font-family: var(--pb-display); font-size: var(--fs-xs); font-weight: 700; color: var(--pb-ink-mute); letter-spacing: 0.04em; }

/* Profile: the person, once, at the top of their own account. */
.cv3-profile { display: flex; align-items: center; gap: var(--sp-3); }
.cv3-profile__avatar { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-pill); background: var(--pb-lozenge-bg); border: 1px solid var(--pb-line); font-family: var(--pb-display); font-size: var(--fs-md); font-weight: 700; color: var(--pb-ink); }
.cv3-profile__text { display: flex; flex-direction: column; min-width: 0; }
.cv3-profile__name { font-family: var(--pb-display); font-size: var(--fs-md); font-weight: 700; color: var(--pb-ink); }
.cv3-profile__sub { font-size: var(--fs-xs); color: var(--pb-ink-soft); }
