/* CareBill Ally design system — calm, legible, built for older adults.
   Targets WCAG 2.2 AA: text contrast ≥ 4.5:1, large touch targets (≥ 48px, we use 56px),
   visible focus, no color-only meaning, reflow at 320px, respects reduced motion. */

:root {
  --cb-navy: #12294a;          /* primary text: 14.6:1 on white */
  --cb-navy-soft: #2d4466;     /* secondary text: 10:1 */
  --cb-teal: #0b6e7f;          /* actions: 5.9:1 on white */
  --cb-teal-dark: #08525e;
  --cb-teal-tint: #e3f2f4;
  --cb-bg: #f6f9fb;
  --cb-surface: #ffffff;
  --cb-border: #c9d6e2;
  --cb-warn-bg: #fff4d6;       /* paired with dark text + icon + words */
  --cb-warn-border: #8a5a00;
  --cb-warn-text: #5c3c00;
  --cb-ok-bg: #e6f4ea;
  --cb-ok-border: #1d6b34;
  --cb-ok-text: #134d24;
  --cb-info-bg: #e8f0fb;
  --cb-info-border: #2d5fa8;
  --cb-danger: #a61b1b;        /* 7.1:1 on white */
  --cb-danger-bg: #fdeceb;
  --cb-focus: #ffbf47;
  --cb-radius: 14px;
  --cb-scale: 1;               /* text size: 1 / 1.2 / 1.4 */
  --cb-font: "Segoe UI", "Atkinson Hyperlegible", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}

html { font-size: calc(125% * var(--cb-scale)); } /* 20px base */
html.cb-text-large { --cb-scale: 1.2; }
html.cb-text-xlarge { --cb-scale: 1.4; }

html.cb-contrast {
  --cb-navy: #000000; --cb-navy-soft: #000000; --cb-teal: #003f4a; --cb-teal-dark: #002a31;
  --cb-bg: #ffffff; --cb-border: #000000; --cb-teal-tint: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--cb-bg); color: var(--cb-navy); font-family: var(--cb-font);
  line-height: 1.55; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.25; color: var(--cb-navy); margin: 0 0 .6rem; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-top: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; max-width: 70ch; }
a { color: var(--cb-teal); text-decoration-thickness: .1em; text-underline-offset: .15em; }
a:hover { color: var(--cb-teal-dark); }
img { max-width: 100%; height: auto; }
small, .cb-muted { color: var(--cb-navy-soft); }
.cb-muted { font-size: .9rem; }

:focus-visible { outline: 4px solid var(--cb-focus); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.cb-skip { position: absolute; left: -999px; top: 0; background: var(--cb-navy); color: #fff; padding: .8rem 1.2rem; z-index: 100; }
.cb-skip:focus { left: 1rem; top: 1rem; }
.cb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ layout */
.cb-header { background: var(--cb-surface); border-bottom: 1px solid var(--cb-border); position: sticky; top: 0; z-index: 20; }
.cb-header-inner { max-width: 1100px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cb-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--cb-navy); font-weight: 700; font-size: 1.15rem; min-height: 56px; }
.cb-brand img { width: 44px; height: 44px; }
.cb-brand .cb-ally { color: var(--cb-teal); }
.cb-header-tools { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.cb-main { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 6rem; }
.cb-footer { border-top: 1px solid var(--cb-border); background: var(--cb-surface); padding: 1.5rem 1rem; font-size: .9rem; }
.cb-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 1.2rem; flex-wrap: wrap; }

.cb-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; list-style: none; }
.cb-nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 56px; padding: .5rem 1rem; border-radius: var(--cb-radius); text-decoration: none; color: var(--cb-navy); background: var(--cb-surface); border: 2px solid var(--cb-border); font-weight: 600; }
.cb-nav a.active, .cb-nav a[aria-current="page"] { background: var(--cb-teal); color: #fff; border-color: var(--cb-teal); }

/* bottom tab bar for phones */
.cb-tabbar { display: none; }
@media (max-width: 720px) {
  .cb-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--cb-surface); border-top: 1px solid var(--cb-border); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .cb-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; text-decoration: none; color: var(--cb-navy); font-size: .75rem; font-weight: 600; }
  .cb-tabbar a.active { color: var(--cb-teal); }
  .cb-tabbar svg { width: 28px; height: 28px; }
  .cb-header-tools .cb-hide-sm { display: none; }
  h1 { font-size: 1.55rem; }
}

/* ------------------------------------------------------------------ buttons */
.cb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 56px; min-width: 56px; padding: .65rem 1.4rem; border-radius: var(--cb-radius);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid var(--cb-teal); background: var(--cb-teal); color: #fff;
}
.cb-btn:hover { background: var(--cb-teal-dark); border-color: var(--cb-teal-dark); color: #fff; }
.cb-btn:disabled, .cb-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.cb-btn svg { width: 1.3em; height: 1.3em; flex: none; }
.cb-btn-secondary { background: var(--cb-surface); color: var(--cb-teal); }
.cb-btn-secondary:hover { background: var(--cb-teal-tint); color: var(--cb-teal-dark); }
.cb-btn-quiet { background: transparent; border-color: transparent; color: var(--cb-teal); text-decoration: underline; }
.cb-btn-quiet:hover { background: var(--cb-teal-tint); color: var(--cb-teal-dark); }
.cb-btn-danger { background: var(--cb-danger); border-color: var(--cb-danger); }
.cb-btn-danger:hover { background: #7f1414; border-color: #7f1414; }
.cb-btn-block { width: 100%; }
.cb-btn-big { min-height: 72px; font-size: 1.15rem; padding: 1rem 1.6rem; }
.cb-btn-small { min-height: 48px; padding: .4rem .9rem; font-size: .9rem; }
.cb-btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

/* big choice tiles (one question at a time) */
.cb-choices { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1rem 0; }
.cb-choice {
  display: flex; align-items: center; gap: .9rem; min-height: 80px; padding: 1rem 1.2rem; text-align: left;
  background: var(--cb-surface); border: 3px solid var(--cb-border); border-radius: var(--cb-radius);
  font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--cb-navy); cursor: pointer; text-decoration: none;
}
.cb-choice:hover { border-color: var(--cb-teal); background: var(--cb-teal-tint); }
.cb-choice[aria-pressed="true"], .cb-choice.selected { border-color: var(--cb-teal); background: var(--cb-teal-tint); box-shadow: inset 0 0 0 2px var(--cb-teal); }
.cb-choice svg { width: 36px; height: 36px; flex: none; color: var(--cb-teal); }
.cb-choice small { display: block; font-weight: 400; font-size: .85rem; color: var(--cb-navy-soft); }

/* ------------------------------------------------------------------ surfaces */
.cb-card { background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); padding: 1.25rem; margin: 0 0 1rem; }
.cb-card h2:first-child, .cb-card h3:first-child { margin-top: 0; }
.cb-card-link { display: block; text-decoration: none; color: inherit; }
.cb-card-link:hover .cb-card { border-color: var(--cb-teal); }
.cb-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cb-split { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .cb-split { grid-template-columns: 1fr; } }

.cb-callout { border-left: 8px solid var(--cb-info-border); background: var(--cb-info-bg); padding: 1rem 1.2rem; border-radius: 10px; margin: 0 0 1rem; }
.cb-callout.warn { border-color: var(--cb-warn-border); background: var(--cb-warn-bg); color: var(--cb-warn-text); }
.cb-callout.ok { border-color: var(--cb-ok-border); background: var(--cb-ok-bg); color: var(--cb-ok-text); }
.cb-callout.danger { border-color: var(--cb-danger); background: var(--cb-danger-bg); }
.cb-callout strong:first-child { display: block; margin-bottom: .2rem; }

.cb-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 2px solid currentColor; }
.cb-pill.ok { color: var(--cb-ok-text); background: var(--cb-ok-bg); }
.cb-pill.warn { color: var(--cb-warn-text); background: var(--cb-warn-bg); }
.cb-pill.info { color: var(--cb-info-border); background: var(--cb-info-bg); }
.cb-pill.neutral { color: var(--cb-navy-soft); background: #eef2f6; }
.cb-pill.danger { color: var(--cb-danger); background: var(--cb-danger-bg); }

/* step list */
.cb-steps { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: s; }
.cb-steps li { counter-increment: s; position: relative; padding: .9rem 1rem .9rem 4rem; background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); margin-bottom: .7rem; }
.cb-steps li::before { content: counter(s); position: absolute; left: 1rem; top: .9rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--cb-teal); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* money table (separate values; "Unknown" never shown as $0) */
.cb-money { width: 100%; border-collapse: collapse; font-size: 1rem; }
.cb-money th, .cb-money td { padding: .7rem .5rem; border-bottom: 1px solid var(--cb-border); text-align: left; vertical-align: top; }
.cb-money td.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.cb-money tr.total td, .cb-money tr.total th { font-size: 1.15rem; border-top: 3px solid var(--cb-navy); }
.cb-unknown { font-style: italic; font-weight: 600; color: var(--cb-navy-soft); }

/* ------------------------------------------------------------------ forms */
.cb-field { margin: 0 0 1.2rem; }
.cb-field label, .cb-label { display: block; font-weight: 700; margin-bottom: .35rem; }
.cb-help { display: block; color: var(--cb-navy-soft); font-size: .9rem; margin-bottom: .4rem; }
.cb-input, .cb-select, .cb-textarea {
  width: 100%; max-width: 32rem; min-height: 56px; padding: .6rem .9rem; font: inherit; font-size: 1.05rem; color: var(--cb-navy);
  background: #fff; border: 2px solid #5b7089; border-radius: 10px;
}
.cb-textarea { max-width: 100%; min-height: 14rem; line-height: 1.5; }
.cb-input:focus, .cb-select:focus, .cb-textarea:focus { border-color: var(--cb-teal); }
.cb-input.invalid, .cb-select.invalid { border-color: var(--cb-danger); }
.cb-error { color: var(--cb-danger); font-weight: 700; margin-top: .3rem; display: flex; gap: .4rem; align-items: flex-start; }
.cb-check { display: flex; gap: .8rem; align-items: flex-start; min-height: 56px; padding: .6rem 0; cursor: pointer; }
.cb-check input { width: 32px; height: 32px; flex: none; margin: 0; accent-color: var(--cb-teal); }
.cb-money-input { position: relative; max-width: 20rem; }
.cb-money-input span { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); font-weight: 700; }
.cb-money-input .cb-input { padding-left: 2rem; }
.cb-error-summary { border: 4px solid var(--cb-danger); padding: 1rem 1.2rem; border-radius: var(--cb-radius); background: var(--cb-danger-bg); margin: 0 0 1rem; }

/* progress */
.cb-progress { height: 14px; background: #dde6ee; border-radius: 99px; overflow: hidden; margin: .4rem 0 1rem; }
.cb-progress > div { height: 100%; background: var(--cb-teal); }
.cb-stepcount { font-weight: 700; color: var(--cb-navy-soft); }
.cb-spinner { width: 2rem; height: 2rem; border: 4px solid #cfdbe6; border-top-color: var(--cb-teal); border-radius: 50%; animation: cbspin 1s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes cbspin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ assistant chat */
.cb-chat { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1rem; }
.cb-msg { max-width: 46rem; padding: 1rem 1.2rem; border-radius: 18px; white-space: pre-line; font-size: 1.05rem; }
.cb-msg.assistant { background: var(--cb-surface); border: 2px solid var(--cb-border); align-self: flex-start; }
.cb-msg.user { background: var(--cb-teal); color: #fff; align-self: flex-end; }
.cb-composer { display: flex; gap: .6rem; flex-wrap: wrap; align-items: stretch; position: sticky; bottom: 0; background: var(--cb-bg); padding: .6rem 0; }
.cb-composer .cb-input { flex: 1 1 14rem; max-width: none; }

/* document viewer */
.cb-viewer { background: #2b3a4d; border-radius: var(--cb-radius); padding: .6rem; min-height: 320px; display: flex; flex-direction: column; gap: .5rem; }
.cb-viewer canvas, .cb-viewer img { width: 100%; height: auto; background: #fff; border-radius: 6px; }
.cb-viewer-bar { display: flex; gap: .5rem; align-items: center; color: #fff; flex-wrap: wrap; }
.cb-viewer-bar .cb-btn { min-height: 48px; }

.cb-field-row { border: 2px solid var(--cb-border); border-radius: var(--cb-radius); padding: .9rem 1rem; margin-bottom: .8rem; background: var(--cb-surface); }
.cb-field-row.low { border-color: var(--cb-warn-border); background: var(--cb-warn-bg); }
.cb-field-row.done { border-color: var(--cb-ok-border); }
.cb-field-row .cb-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-source { font-family: Consolas, "Courier New", monospace; font-size: .85rem; background: #eef2f6; padding: .3rem .5rem; border-radius: 6px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

/* timeline */
.cb-timeline { list-style: none; margin: 0; padding: 0; border-left: 4px solid var(--cb-border); }
.cb-timeline li { position: relative; padding: 0 0 1.2rem 1.4rem; }
.cb-timeline li::before { content: ""; position: absolute; left: -12px; top: .35rem; width: 20px; height: 20px; border-radius: 50%; background: var(--cb-surface); border: 4px solid var(--cb-teal); }

/* dialog */
.cb-dialog-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 35, .55); display: grid; place-items: center; z-index: 60; padding: 1rem; }
.cb-dialog { background: var(--cb-surface); border-radius: var(--cb-radius); max-width: 34rem; width: 100%; padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); max-height: 90vh; overflow: auto; }

/* stop button always reachable */
.cb-stop { border: 3px solid var(--cb-danger); background: var(--cb-danger-bg); border-radius: var(--cb-radius); padding: 1rem 1.2rem; margin: 1rem 0; }

.cb-hero { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; padding: 1.5rem 0 2rem; }
.cb-hero h1 { font-size: 2.3rem; }
@media (max-width: 900px) { .cb-hero { grid-template-columns: 1fr; } .cb-hero h1 { font-size: 1.8rem; } }
.cb-demo-banner { background: #3b2f00; color: #fff3c4; text-align: center; padding: .4rem 1rem; font-weight: 700; font-size: .85rem; }
.cb-toast { position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%); background: var(--cb-navy); color: #fff; padding: 1rem 1.5rem; border-radius: var(--cb-radius); z-index: 70; max-width: 92vw; font-weight: 600; }

@media print {
  .cb-header, .cb-footer, .cb-tabbar, .cb-btn-row, .cb-nav, .no-print { display: none !important; }
  body { background: #fff; }
  .cb-card { border: none; padding: 0; }
}

/* ------------------------------------------------------------------ legal documents (web and app) */
.cb-legal { max-width: 52rem; }
.cb-legal-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--cb-navy-soft); font-size: .9rem; margin: 0 0 1rem; }
.cb-legal-body { overflow-wrap: anywhere; }
.cb-legal-body h2 { scroll-margin-top: 6rem; padding-top: .6rem; border-top: 1px solid var(--cb-border); }
.cb-legal-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.cb-legal-body h3, .cb-legal-body h4 { scroll-margin-top: 6rem; margin-top: 1.2rem; }
.cb-legal-body li { margin-bottom: .4rem; }
.cb-legal-body p, .cb-legal-body li { max-width: 70ch; }
.cb-legal-summary { border-left-color: var(--cb-teal); background: var(--cb-teal-tint); }
.cb-legal-summary ul { margin: .2rem 0 0; padding-left: 1.3rem; }
.cb-legal-summary p:last-child, .cb-legal-summary ul:last-child { margin-bottom: 0; }
.cb-legal-toc { margin: 0 0 1.2rem; }
.cb-legal-toc summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.cb-legal-toc ol { margin: .4rem 0 0; padding-left: 1.4rem; columns: 2 18rem; column-gap: 2rem; }
.cb-legal-toc li { break-inside: avoid; margin-bottom: .35rem; }
.cb-legal-index { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); margin: 0 0 1.5rem; padding: 0; list-style: none; }
.cb-legal-index li { margin: 0; }
.cb-legal-index a { display: block; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--cb-border); border-radius: var(--cb-radius); background: var(--cb-surface); text-decoration: none; color: var(--cb-navy); min-height: 56px; }
.cb-legal-index a:hover { border-color: var(--cb-teal); }
.cb-legal-index strong { display: block; color: var(--cb-teal); text-decoration: underline; text-underline-offset: .15em; }
.cb-legal-index span { display: block; font-size: .9rem; color: var(--cb-navy-soft); margin-top: .25rem; }
.cb-legal-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.cb-table-wrap { margin: 0 0 1.2rem; }
.cb-legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--cb-surface); }
.cb-legal-table th, .cb-legal-table td { border: 1px solid var(--cb-border); padding: .55rem .6rem; text-align: left; vertical-align: top; }
.cb-legal-table thead th { background: var(--cb-teal-tint); }
@media (max-width: 760px) {
  .cb-legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cb-legal-table, .cb-legal-table tbody, .cb-legal-table tr, .cb-legal-table td { display: block; width: 100%; }
  .cb-legal-table tr { border: 1px solid var(--cb-border); border-radius: 10px; margin-bottom: .8rem; overflow: hidden; }
  .cb-legal-table td { border: none; border-bottom: 1px solid var(--cb-border); }
  .cb-legal-table td:last-child { border-bottom: none; }
  .cb-legal-table td[data-label]::before { content: attr(data-label); display: block; font-weight: 700; font-size: .8rem; color: var(--cb-navy-soft); }
  .cb-legal-table td:first-child { background: var(--cb-teal-tint); font-weight: 700; }
}

/* SMS program page: example of the opt-in screen and sample texts */
.cb-optin-example { border: 3px dashed var(--cb-border); border-radius: var(--cb-radius); padding: 1rem 1.1rem; background: var(--cb-bg); }
.cb-optin-example .cb-check { pointer-events: none; }
.cb-sms-samples { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.cb-sms-samples li { background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: 18px 18px 18px 4px; padding: .7rem 1rem; max-width: 34rem; }
.cb-sms-samples li > span { display: block; font-size: .8rem; font-weight: 700; color: var(--cb-navy-soft); margin-bottom: .2rem; }
.cb-keywords { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; margin: 0 0 1rem; }
.cb-keywords li { border: 1px solid var(--cb-border); border-radius: 10px; padding: .7rem .9rem; background: var(--cb-surface); }
.cb-keywords code { font-size: 1.05rem; font-weight: 700; }
@media print {
  .cb-legal-toc, .cb-legal-index { display: none !important; }
  .cb-legal-table thead { position: static; }
}

/* ------------------------------------------------------------------ journey: case progress tracker, home page flow, case tabs (UX workstream) */
.cb-track { background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); padding: 1rem 1.1rem; margin: 0 0 1rem; }
.cb-track-compact { border: none; padding: 0; background: transparent; margin: .6rem 0 0; }
.cb-track-count { margin: 0 0 .2rem; }
.cb-track-headline { font-size: 1.1rem; margin: .4rem 0 .8rem; overflow-wrap: anywhere; }
.cb-track-compact .cb-track-headline { font-size: 1rem; margin: .2rem 0 .6rem; }
.cb-track-needs .cb-btn { margin-top: .6rem; }
.cb-track-needs strong svg, .cb-track-next svg { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
.cb-track-next { margin: 0 0 .6rem; font-weight: 600; overflow-wrap: anywhere; }
.cb-stepper { list-style: none; margin: .4rem 0 1rem; padding: 0; }
.cb-stepper li { display: flex; gap: .8rem; align-items: flex-start; position: relative; padding: 0 0 1rem; }
.cb-stepper li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 3px; background: var(--cb-border); }
.cb-stepper li > div { min-width: 0; flex: 1; }
.cb-stepper-mark { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--cb-border); background: var(--cb-surface); color: var(--cb-navy-soft); }
.cb-stepper-mark svg { width: 24px; height: 24px; }
.cb-stepper-title { margin: .45rem 0 .1rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.cb-stepper-state { font-size: .85rem; font-weight: 700; padding: .05rem .55rem; border-radius: 99px; border: 1px solid currentColor; }
.cb-stepper-detail { margin: 0; color: var(--cb-navy-soft); overflow-wrap: anywhere; }
.cb-stepper-done .cb-stepper-mark { background: var(--cb-ok-bg); border-color: var(--cb-ok-border); color: var(--cb-ok-text); }
.cb-stepper-done:not(:last-child)::after { background: var(--cb-ok-border); }
.cb-stepper-done .cb-stepper-state { color: var(--cb-ok-text); }
.cb-stepper-active .cb-stepper-mark { background: var(--cb-info-bg); border-color: var(--cb-info-border); color: var(--cb-info-border); }
.cb-stepper-active .cb-stepper-state { color: var(--cb-info-border); }
.cb-stepper-needs .cb-stepper-mark { background: var(--cb-warn-bg); border-color: var(--cb-warn-border); color: var(--cb-warn-text); }
.cb-stepper-needs .cb-stepper-state { color: var(--cb-warn-text); background: var(--cb-warn-bg); }
.cb-stepper-needs .cb-stepper-title strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.cb-stepper-blocked .cb-stepper-mark { background: var(--cb-danger-bg); border-color: var(--cb-danger); color: var(--cb-danger); }
.cb-stepper-blocked .cb-stepper-state { color: var(--cb-danger); }
.cb-stepper-todo .cb-stepper-state { color: var(--cb-navy-soft); border-style: dashed; }
.cb-recording { border-top: 1px solid var(--cb-border); margin-top: .8rem; padding-top: .8rem; }
.cb-recording svg { width: 1.2em; height: 1.2em; vertical-align: -.2em; }

/* case sections: main tabs + "More" disclosure */
.cb-casetabs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; margin: 0 0 1rem; }
.cb-casetabs .cb-nav { margin: 0; }
.cb-casetabs-more { position: relative; }
.cb-casetabs-more > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 56px; padding: .5rem 1rem; border-radius: var(--cb-radius); border: 2px solid var(--cb-border); background: var(--cb-surface); font-weight: 600; cursor: pointer; color: var(--cb-navy); }
.cb-casetabs-more > summary::-webkit-details-marker { display: none; }
.cb-casetabs-more > summary svg { width: 1.2em; height: 1.2em; }
.cb-casetabs-more[open] > summary { border-color: var(--cb-teal); background: var(--cb-teal-tint); }
.cb-casetabs-more.has-current > summary { border-color: var(--cb-teal); }
.cb-casetabs-more .cb-nav { margin-top: .4rem; }
@media (max-width: 720px) {
  .cb-casetabs > .cb-nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .cb-casetabs > .cb-nav a { width: 100%; justify-content: flex-start; }
  .cb-casetabs-more { width: 100%; }
  .cb-casetabs-more > summary { width: 100%; }
  .cb-casetabs-more .cb-nav { display: grid; grid-template-columns: 1fr; }
}

/* home page flow, compliance list, sample call, FAQ */
.cb-flow { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: f; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.cb-flow > li { counter-increment: f; background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.cb-flow-head { display: flex; align-items: center; gap: .6rem; margin: 0; }
.cb-flow-head::before { content: counter(f); flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--cb-teal); color: #fff; display: grid; place-items: center; font-weight: 700; }
.cb-flow-head svg { width: 28px; height: 28px; color: var(--cb-teal); flex: none; }
.cb-flow > li p { margin: 0; }
.cb-control { margin-top: auto !important; padding-top: .4rem; font-size: .92rem; font-weight: 600; color: var(--cb-ok-text); }
.cb-control svg { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.cb-rules { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.cb-rules li { display: flex; gap: .7rem; align-items: flex-start; background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); padding: .9rem 1rem; }
.cb-rules li > svg { width: 28px; height: 28px; flex: none; color: var(--cb-teal); margin-top: .1rem; }
.cb-rules li p { margin: 0; }
.cb-quote { margin: 0 0 1rem; padding: 1rem 1.2rem; border-left: 8px solid var(--cb-teal); background: var(--cb-teal-tint); border-radius: 10px; font-size: 1.1rem; }
.cb-quote p { margin: 0; }
.cb-faq details { background: var(--cb-surface); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); margin: 0 0 .6rem; }
.cb-faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; padding: .6rem 1rem; font-weight: 700; }
.cb-faq details > div { padding: 0 1rem 1rem; }
.cb-faq details > div p:last-child { margin-bottom: 0; }
.cb-cta-final { text-align: center; background: var(--cb-surface); border: 3px solid var(--cb-teal); border-radius: var(--cb-radius); padding: 1.5rem 1rem; margin: 2rem 0 1rem; }
.cb-cta-final p { margin-left: auto; margin-right: auto; }
.cb-cta-final .cb-btn { max-width: 28rem; }
.cb-trust { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: .8rem 0 0; font-weight: 600; }
.cb-trust li { display: inline-flex; align-items: center; gap: .35rem; }
.cb-trust svg { width: 1.2em; height: 1.2em; color: var(--cb-ok-border); }
/* default size for line icons placed inline in text (zero specificity: every component rule above still wins) */
:where(svg[aria-hidden="true"]) { width: 1.25em; height: 1.25em; vertical-align: -.22em; flex: none; }
.cb-inline-icon { width: 1.25em; height: 1.25em; vertical-align: -.22em; color: var(--cb-teal); }

/* ------------------------------------------------------------------ pricing, case plan, paywall (billing UI workstream) */
.cb-offer-price { font-size: 1.15rem; margin: .2rem 0 .6rem; }
.cb-offer-price strong { font-size: 1.6rem; color: var(--cb-navy); }
.cb-offer-terms { background: var(--cb-teal-tint); border: 1px solid var(--cb-border); border-radius: var(--cb-radius); padding: 1rem; margin: 1rem 0; }
.cb-offer-terms p { margin: .4rem 0; }
.cb-offer .cb-check { min-height: 56px; }
.cb-paywall { border: 3px solid var(--cb-teal); }
/* minutes meter: the words beside it always state the numbers; the bar is never the only signal */
.cb-meter { height: 18px; border: 1px solid var(--cb-navy-soft); }
.cb-meter.low > div { background: var(--cb-warn-border); background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.35) 6px 12px); }
.cb-purchases { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.cb-purchases > li { margin: 0; }
.cb-summary-link { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 700; color: var(--cb-teal); }
.cb-price-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); padding: 0; list-style: none; margin: 0 0 1rem; }
.cb-price-grid > li { margin: 0; }
.cb-price-grid .cb-price { font-size: 1.8rem; font-weight: 800; color: var(--cb-navy); margin: .2rem 0; }
@media (forced-colors: active) { .cb-meter > div { background: Highlight; } }
