.funding-page main { max-width: 1040px; }

.funding-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 1rem;
}

.funding-page h2 {
  margin: 0 0 .65rem;
  font-size: 1.2rem;
  letter-spacing: -.03em;
}

#funding-balance {
  color: var(--text);
  font-size: clamp(1.9rem, 6vw, 3.15rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
  margin: 0;
  line-height: 1.2;
}

#funding-mode { margin: .5rem 0 0; }
#funding-hold { margin-top: .8rem; }
#funding-notice:empty { display: none; }
#funding-notice { margin: 0 0 1rem; }
#funding-request-cap { margin-bottom: 1rem; scroll-margin-top: 1rem; }
#funding-request-cap-input { max-width: 18rem; }
#funding-request-cap-progress { display: block; width: min(100%, 24rem); margin: 0 0 1rem; accent-color: var(--mint); }
#funding-request-cap-status { margin: .75rem 0 0; }
#funding-request-cap-status:empty { display: none; }
#runtime-spending { margin-bottom: 1rem; scroll-margin-top: 1rem; }
#runtime-spending-form > input { max-width: 18rem; }
#runtime-spending-form .runtime-spending-confirm { display: flex; align-items: flex-start; gap: .6rem; max-width: 46rem; }
#runtime-spending-confirm { width: auto; margin-top: .2rem; flex-shrink: 0; }
#runtime-spending-notice:empty { display: none; }

#funding-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
#funding-choices legend { margin-bottom: .5rem; font-size: .87rem; font-weight: 600; }

.funding-amounts { display: flex; flex-wrap: wrap; gap: .6rem; }
.funding-amounts label {
  display: flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  padding: .55rem .7rem;
  cursor: pointer;
}

.funding-amounts label:has(:checked) { border-color: var(--mint); }
.funding-amounts input { width: auto; margin: 0; accent-color: var(--mint); }
.funding-amounts input:disabled { cursor: default; }
.funding-amount-label { display: grid; gap: .15rem; }
.funding-amount-label small { color: var(--muted); white-space: nowrap; }
.funding-ledger { margin-top: 1rem; overflow-x: auto; }
.funding-ledger table { width: 100%; border-collapse: collapse; }

.funding-ledger :is(th, td) {
  padding: .65rem .5rem .65rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.funding-ledger th { color: var(--muted); font-size: .85rem; font-weight: 600; }
.funding-ledger td { font-size: .94rem; }
.funding-ledger tr:last-child td { border-bottom: 0; }
.funding-ledger :is(th, td):last-child { padding-right: 0; text-align: right; }
.funding-ledger td:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.funding-ledger .funding-credit { color: var(--mint); }

@media (max-width: 660px) {
  .funding-grid { grid-template-columns: minmax(0, 1fr); }
}
