/* cash-flow-review
   Transaction / Weekly / Monthly Review pages. Measurements from the Figma
   review frames (19080:66013, 19080:65926, 19080:67807, 19080:67713). */

/* Headings that replaced styled p elements (WCAG 1.3.1) keep the look of
   what they replaced. Zero specificity, so every class rule still wins. */
:where(.cfr-page) :where(h1, h2, h3, h4) {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.cfr-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.cfr-page.end {
  gap: 80px;
}

.cfr-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: 100%;
}

.cfr-muted {
  margin: 0;
  color: var(--light-gray);
}

.cfr-icon {
  display: inline-block;
  flex-shrink: 0;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* --- Header: back row, progress bar, step + title --- */

.cfr-header {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.cfr-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  font-family: "Geist", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-back-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 40px;
  background: var(--navy-card);
}

.cfr-progress {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 8px;
  background: var(--navy-card-secondary);
  overflow: hidden;
}

.cfr-progress-fill {
  height: 100%;
  border-radius: 8px;
  background: #D0AA62;
  transition: width 0.3s ease;
}

.cfr-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cfr-step {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-title {
  margin: 0;
  color: var(--white);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

/* --- Buttons --- */

.cfr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  max-width: 100%;
  padding: 8px 24px;
  border: 1px solid var(--navy-border);
  border-radius: 40px;
  background: var(--white);
  color: var(--navy-mid);
  font-family: "Geist", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 25px;
  white-space: nowrap;
}

.cfr-btn.outlined {
  border-color: var(--white);
  background: transparent;
  color: var(--white);
}

.cfr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Result / splash card --- */

.cfr-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 700px;
  max-width: 100%;
  padding: 40px;
  border-radius: 12px;
  background: var(--navy-card);
  text-align: center;
}

.cfr-result-title {
  margin: 0;
  color: var(--link-green);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-result-title.white {
  color: var(--white);
  font-size: 32px;
}

.cfr-result-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.cfr-result-text {
  margin: 0;
  color: var(--white);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.cfr-result-text.muted {
  color: var(--light-gray);
}

.cfr-splash-count {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfr-splash-count-label {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.cfr-splash-count-value {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

/* --- Transaction Review: receipt card --- */

.cfr-receipt {
  width: 830px;
  max-width: 100%;
}

.cfr-receipt-body {
  display: flex;
  flex-direction: column;
  gap: 49px;
  padding: 65px 64px 29px;
  border-radius: 19.2px 19.2px 0 0;
  background: var(--navy-card);
}

/* Scalloped bottom edge: the bottom 14px of the Figma "Subtract" shape. */
.cfr-receipt-edge {
  height: 14px;
  background: url(/icons/cash-flow/review/receipt.svg) no-repeat center bottom / 830px 1313.85px;
}

.cfr-txn-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cfr-txn-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfr-txn-date {
  margin: 0;
  color: var(--light-gray);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.cfr-txn-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cfr-txn-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 2px;
  border: 1px solid #C2C2C2;
  border-radius: 32px;
  background: var(--white);
  overflow: hidden;
}

.cfr-txn-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cfr-txn-logo.icon {
  padding: 0;
  border: 0;
}

.cfr-txn-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-txn-amount {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.cfr-txn-amount.green {
  color: var(--green-light);
}

/* --- Category picker --- */

.cfr-cat-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cfr-cat-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cfr-cat-label {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cfr-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  background: var(--navy-card-secondary);
  color: var(--white);
  font-family: "Geist", sans-serif;
}

.cfr-cat.selected {
  padding: 7px;
  border: 2px solid var(--figma-green);
}

.cfr-cat-check {
  position: absolute;
  top: 7px;
  right: 14px;
}

.cfr-cat-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.cfr-cat-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* --- Weekly Review: card stack --- */

.cfr-stack-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 730px;
  max-width: 100%;
  padding: 48px 40px;
  border-radius: 16px;
  background: var(--navy-card);
}

.cfr-stack {
  position: relative;
  width: 368px;
  max-width: 100%;
  padding: 0 10px 10px 0;
}

.cfr-stack-blank {
  position: absolute;
  width: 358px;
  max-width: calc(100% - 10px);
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: linear-gradient(to bottom, var(--white) calc(100% - 48px), #DDE3EB 0);
  box-shadow: 0 16px 20px rgba(0, 0, 0, 0.07);
}

.cfr-stack-blank.first {
  top: 5px;
  left: 5px;
  bottom: 5px;
}

.cfr-stack-blank.second {
  top: 10px;
  left: 10px;
  bottom: 0;
}

.cfr-stack-front {
  position: relative;
  z-index: 1;
}

.cfr-stack-front.leaving {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.1s ease-in, opacity 0.1s ease-in;
}

.cfr-wcard {
  overflow: hidden;
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 16px 20px rgba(0, 0, 0, 0.07);
  color: var(--navy-mid);
}

.cfr-wcard-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.cfr-wcard-logo {
  width: 56px;
  height: 56px;
  border-radius: 250px;
  object-fit: cover;
}

.cfr-wcard-logo.icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfr-wcard-heading {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.cfr-wcard-store {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.cfr-wcard-name {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfr-wcard-date {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.cfr-wcard-amount {
  align-self: center;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.cfr-wcard-amount.green {
  color: var(--green-light);
}

.cfr-wcard-category {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  background: #DDE3EB;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cfr-actions {
  display: flex;
  gap: 8px;
  width: 358px;
  max-width: 100%;
}

.cfr-actions .cfr-btn {
  flex: 1;
  min-width: 0;
}

/* --- Weekly insight box --- */

.cfr-insight {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 24px;
  border-radius: 8px;
  background: var(--navy-card-secondary);
  text-align: left;
}

.cfr-insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.cfr-insight-title {
  flex: 1;
  margin: 0;
  color: var(--gold);
  font-family: "Geist", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
}

.cfr-tag {
  padding: 4px 12px;
  border-radius: 40px;
  background: var(--navy-mid);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.cfr-insight-text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* --- Modal --- */

.cfr-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
}

.cfr-modal {
  width: 600px;
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0 24px 24px;
  border: 2px solid var(--navy-border);
  border-radius: 16px;
  background: var(--navy-mid);
}

.cfr-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--navy-border);
  background: var(--navy-mid);
}

.cfr-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.cfr-modal-close {
  display: flex;
  padding: 0;
  border: 0;
  background: none;
}

.cfr-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cfr-modal-text {
  margin: 0;
  color: var(--light-gray);
  line-height: 1.5;
}

/* --- Monthly Review --- */

.cfr-mr-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 700px;
  max-width: 100%;
}

.cfr-mr-column.full {
  width: 100%;
}

.cfr-mr-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.cfr-mr-tag {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.cfr-mr-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card-secondary);
  text-align: left;
}

.cfr-mr-goal-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cfr-mr-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  object-fit: cover;
}

.cfr-mr-goal-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cfr-mr-goal-name {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.cfr-mr-goal-sub {
  margin: 0;
  color: var(--light-gray);
  font-size: 12px;
  font-weight: 700;
}

.cfr-mr-subhead {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfr-mr-subhead > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--light-gray);
  font-size: 12px;
  font-weight: 700;
}

.cfr-mr-divider {
  width: 100%;
  height: 1px;
  background: var(--navy-border);
}

.cfr-mr-bar {
  position: relative;
  height: 12px;
  margin: 2px 0;
  border-radius: 6px;
  background: var(--navy-card);
}

.cfr-mr-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 6px;
}

.cfr-mr-bar-coin {
  position: absolute;
  top: -2px;
  width: 16px;
  height: 16px;
}

.cfr-mr-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
}

.cfr-mr-row.column {
  flex-direction: column;
}

.cfr-mr-lv .label {
  color: var(--light-gray);
  font-size: 14px;
}

.cfr-mr-lv .value {
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.cfr-mr-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--navy-card);
}

.cfr-mr-add-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.cfr-mr-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--navy-card-secondary);
}

.cfr-mr-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--white);
  font-family: "Geist", sans-serif;
  font-size: 16px;
}

.cfr-mr-info-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
}

.cfr-mr-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.cfr-mr-note.good {
  color: var(--green-light);
}

.cfr-mr-note.bad {
  color: #D62F7A;
}

.cfr-mr-allocate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card);
}

.cfr-mr-allocate .value {
  color: var(--green-light);
  font-size: 16px;
}

.cfr-mr-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
}

.cfr-mr-message {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.cfr-icon-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 520px;
}

.cfr-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--navy-card-secondary);
}

.cfr-mr-avg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--navy-card);
}

.cfr-mr-avg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.cfr-mr-gold-tag {
  padding: 4px 12px;
  border-radius: 25px;
  background: var(--gold);
  color: var(--navy-end);
  font-size: 12px;
  font-weight: 700;
}

.cfr-mr-avg-value {
  margin: 0;
}

.cfr-mr-avg-value .value {
  color: var(--green-light);
  font-size: 20px;
  font-weight: 500;
}

.cfr-mr-avg-value .value.white {
  color: var(--white);
}

.cfr-mr-avg-value .label {
  color: var(--light-gray);
  font-size: 12px;
  font-weight: 700;
}

.cfr-mr-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.cfr-mr-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.cfr-mr-legend .swatch {
  width: 12px;
  height: 4px;
}

.cfr-mr-legend .swatch.dashed {
  background: repeating-linear-gradient(90deg, var(--navy-border) 0 5px, transparent 5px 7px);
}

.cfr-mr-bubbles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 5px;
}

.cfr-mr-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.cfr-mr-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card-secondary);
}

.cfr-mr-breakdown {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
}

.cfr-mr-breakdown > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cfr-mr-breakdown .name {
  color: var(--light-gray);
  font-size: 12px;
}

.cfr-mr-breakdown .value {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.cfr-mr-merchant {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.cfr-mr-merchant-logo {
  width: 32px;
  height: 32px;
  border-radius: 28px;
  object-fit: cover;
}

.cfr-mr-merchant-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.cfr-mr-merchant-amount {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.cfr-mr-card .groove-chart {
  width: 100%;
}

.cfr-mr-edit {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* --- Edit Goal modal (mobile EditGoalBottomsheet) --- */

.cfr-eg-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfr-eg-label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.cfr-eg-hint {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  color: var(--light-gray);
  font-size: 14px;
  line-height: 1.4;
}

.cfr-eg-hint .cfr-icon {
  flex-shrink: 0;
}

.cfr-eg-info {
  display: flex;
  gap: 4px;
  margin: 0;
  font-size: 14px;
}

.cfr-eg-info .label {
  color: var(--light-gray);
}

.cfr-eg-info .value {
  font-weight: 700;
}

.cfr-eg-account {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--navy-card);
}

.cfr-eg-account-logo {
  width: 24px;
  height: 24px;
  border-radius: 28px;
  object-fit: cover;
}

.cfr-eg-account-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.cfr-eg-account-meta {
  margin: 0;
  color: var(--light-gray);
  font-size: 10px;
}

.cfr-eg-plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--navy-card);
}

.cfr-eg-error {
  margin: 0;
  color: #FE8DC6;
  font-size: 12px;
}

.cfr-eg-muted {
  margin: 0;
  color: var(--light-gray);
  font-size: 14px;
}

.cfr-eg-or {
  margin: 0;
  font-size: 16px;
  text-align: center;
}

.cfr-eg-date {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  background: var(--navy-card-secondary);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.cfr-eg-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card-secondary);
}

.cfr-eg-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfr-eg-picker-year {
  font-size: 20px;
  font-weight: 600;
}

.cfr-eg-months {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cfr-eg-month {
  height: 40px;
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  background: var(--navy-card);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cfr-eg-month:hover:not(:disabled) {
  border-color: var(--gold);
}

.cfr-eg-month:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cfr-eg-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.cfr-eg-delete {
  align-self: center;
  padding: 0;
  border: 0;
  background: none;
  color: #D1817E;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Reflow (WCAG 1.4.10 / 1.4.4) --- desktop unchanged. */

@media (max-width: 767.98px) {
  .cfr-page,
  .cfr-group {
    gap: 24px;
  }

  .cfr-page.end {
    gap: 40px;
  }

  .cfr-btn {
    height: auto;
    min-height: 40px;
    white-space: normal;
    text-align: center;
  }

  .cfr-result {
    padding: 24px 16px;
  }

  .cfr-wcard-name {
    white-space: normal;
  }

  .cfr-result-title,
  .cfr-txn-name,
  .cfr-wcard-name,
  .cfr-mr-merchant-name {
    overflow-wrap: anywhere;
  }

  .cfr-receipt-body {
    gap: 32px;
    padding: 32px 16px 24px;
  }

  .cfr-stack-panel {
    padding: 24px 16px;
  }

  .cfr-insight {
    padding: 16px;
  }

  .cfr-insight-head {
    flex-wrap: wrap;
  }

  .cfr-tag {
    white-space: normal;
  }

  .cfr-modal-backdrop {
    padding: 16px;
  }

  .cfr-modal {
    padding: 0 16px 16px;
  }

  .cfr-mr-breakdowns {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .cfr-mr-allocate,
  .cfr-mr-avg-head,
  .cfr-mr-goal-head {
    flex-wrap: wrap;
  }

  .cfr-cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .cfr-cat {
    min-width: 0;
  }

  .cfr-cat-name {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .cfr-eg-months {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Loading skeleton nested in .cfr-page: span the column (not shrink-wrap)
   so the progress bar placeholder is full width like the real one and the
   700px result card can shrink to fit narrow screens. */
.cfr-page > .groove-skeleton {
  align-self: stretch;
  min-width: 0;
}
