.bank-budget { padding-block: clamp(2.25rem, 4.8vw, 4.25rem); }
.bank-heading { max-width: 49rem; margin-bottom: 1.75rem; }
.bank-heading h1 {
  font-size: clamp(2.5rem, 5.9vw, 4.75rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.062em;
  text-wrap: balance;
}
.bank-heading > p { max-width: 39rem; margin-top: .9rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.bank-budget h2 { font-size: clamp(1.18rem, 2.1vw, 1.48rem); line-height: 1.22; letter-spacing: -.035em; }
.bank-connection, .bank-results { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; }
.bank-connection > div:first-child p { max-width: 48ch; margin-block: .65rem .85rem; color: var(--muted); line-height: 1.58; }
.bank-link { color: #255681; font-weight: 750; text-underline-offset: .19em; }
.bank-controls { align-self: center; padding: 1rem; border-radius: .55rem; background: var(--paper); color: var(--ink); }
.bank-controls p { line-height: 1.45; }
.bank-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.bank-actions:has(button:not([hidden])) { margin-top: .8rem; }
.bank-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .48rem .8rem;
  border: 1px solid var(--ink);
  border-radius: .42rem;
  color: var(--ink);
  background: var(--lime);
  font-weight: 800;
  text-decoration: none;
}
.bank-button:hover { background: var(--lime-hover); }
.bank-button-secondary { background: var(--white); }
.bank-button-secondary:hover { background: #e9eef3; }
.bank-button:disabled { opacity: .6; }
.bank-results { margin-top: 1rem; align-items: start; }
.bank-history { grid-row: span 2; }
.bank-note { margin-block: .65rem; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.bank-note:last-child { margin-bottom: 0; }
.bank-table-wrap { overflow-x: auto; }
.bank-table { width: 100%; min-width: 23rem; border-collapse: collapse; font-size: .87rem; font-variant-numeric: tabular-nums; }
.bank-table th, .bank-table td { padding: .7rem .45rem; border-bottom: 1px solid var(--line); text-align: end; }
.bank-table th:first-child { padding-inline-start: 0; text-align: start; }
.bank-table tr > :last-child { padding-inline-end: 0; }
.bank-table thead th, .bank-table tbody th { font-weight: 750; }
.bank-table thead th { border-bottom-width: 2px; }
.bank-amounts { margin-block: .75rem; }
.bank-amounts > div { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; padding-block: .5rem; border-bottom: 1px solid var(--line); }
.bank-amounts dt { font-size: .85rem; color: var(--muted); }
.bank-amounts dd { font-size: .98rem; font-weight: 800; text-align: end; white-space: nowrap; }
.bank-payment .field { margin-top: 1rem; }
.bank-detail-card { margin-top: 1rem; }
.bank-data-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .8rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}
.bank-data-list > li { min-width: 0; padding: .95rem; border: 1px solid var(--line); border-radius: .55rem; }
.bank-data-list h3 { font-size: 1rem; overflow-wrap: anywhere; }
.bank-data-list .bank-amounts dd { white-space: normal; overflow-wrap: anywhere; }
.bank-data-list .bank-amounts > div { margin: 0; }
.bank-manual { margin-top: 1.25rem; }

@media (max-width: 48rem) {
  .bank-connection, .bank-results { grid-template-columns: minmax(0, 1fr); }
  .bank-history { grid-row: auto; }
  .bank-table { min-width: 0; font-size: .8rem; }
  .bank-table th, .bank-table td { padding-inline: .3rem; }
}
