.cav-root {
  box-sizing: border-box;
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  color: #18232d;
  font: inherit;
}

.cav-root *,
.cav-root *::before,
.cav-root *::after {
  box-sizing: border-box;
}

.cav-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cav-title,
.cav-section-title,
.cav-state-title,
.cav-date-group h3,
.cav-balance-card h3 {
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cav-title {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.cav-section,
.cav-state,
.cav-date-group,
.cav-balance-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #d8e0e5;
  border-radius: 0.85rem;
  background: #fff;
}

.cav-section {
  display: grid;
  gap: 0.75rem;
}

.cav-section-title,
.cav-state-title,
.cav-date-group h3,
.cav-balance-card h3 {
  font-size: 1.1rem;
}

.cav-date-note,
.cav-state-message,
.cav-empty,
.cav-currency-note,
.cav-item-meta,
.cav-goal-progress {
  margin: 0;
  color: #52616c;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cav-date-note {
  margin-top: -0.6rem;
}

.cav-date-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
}

.cav-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.65rem 0;
  border-top: 1px solid #e6ebee;
}

.cav-item-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.cav-task-details {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.cav-task-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cav-task-action {
  min-width: 7rem;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #244c64;
  border-radius: 0.6rem;
  color: #fff;
  background: #244c64;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

.cav-task-action:disabled {
  border-color: #87949c;
  color: #46535b;
  background: #e1e6e9;
  cursor: not-allowed;
}

.cav-task-action:focus-visible {
  outline: 3px solid #d28b18;
  outline-offset: 2px;
}

.cav-hide-button {
  flex: 0 0 auto;
  min-width: 7.5rem;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #244c64;
  border-radius: 0.6rem;
  color: #fff;
  background: #244c64;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

.cav-hide-button:disabled {
  border-color: #87949c;
  color: #46535b;
  background: #e1e6e9;
  cursor: not-allowed;
}

.cav-hide-button:focus-visible {
  outline: 3px solid #d28b18;
  outline-offset: 2px;
}

.cav-currency-note {
  margin-top: -0.35rem;
}

.cav-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.cav-balance-card {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 0.85rem;
}

.cav-balance-amount {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.cav-goal {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e6ebee;
}

.cav-goal-name {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.cav-progress {
  width: 100%;
  min-height: 0.75rem;
  accent-color: #286d48;
}

@media (max-width: 420px) {
  .cav-section,
  .cav-state {
    padding: 0.8rem;
  }

  .cav-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cav-hide-button {
    width: 100%;
  }

  .cav-task-actions {
    width: 100%;
  }

  .cav-task-action {
    flex: 1 1 100%;
    width: 100%;
  }
}
