.monthly-page .section-heading {
  align-items: center;
  padding-block-end: 10px;
}

.monthly-page .section-heading h2 {
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .03em;
}

.monthly-audit-card {
  border: 1px solid var(--line);
  background: var(--wash);
}

.monthly-audit-list {
  padding: 0;
  list-style: none;
}

.monthly-audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-block: 7px;
}

.monthly-audit-row {
  margin-inline: 12px;
  border-top: 1px solid var(--line);
}

.monthly-audit-row:first-child { border-top: 0; }
.monthly-audit-copy { min-width: 0; overflow-wrap: anywhere; }
.monthly-audit-copy h3 { font-size: 14px; font-weight: 750; }
.monthly-audit-copy p { margin-block-start: 3px; }

.monthly-audit-value {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: end;
  white-space: nowrap;
}

.monthly-audit-copy p,
.monthly-audit-value,
.monthly-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.monthly-audit-value strong,
.monthly-expense-value strong,
.monthly-bill-row > strong,
.monthly-bill-preview-amount {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.monthly-audit-pending {
  border-block: 1px solid var(--line);
  padding: 7px 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.monthly-audit-card .empty-state { padding-inline: 12px; }

.monthly-routine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 4px;
  align-items: center;
}

.monthly-routine-row .button--icon { width: 44px; min-height: 44px; color: var(--muted); }
.monthly-routine-row .task-card.is-checked .monthly-detail { font-weight: 650; }

.monthly-money-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.monthly-money-actions .button--icon { width: 44px; min-height: 44px; }
.monthly-expense-group + .monthly-expense-group { margin-block-start: 16px; }

.monthly-expense-group > h3,
.monthly-template-group > h3 {
  border-block-end: 1px solid var(--line);
  padding-block: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
}

.monthly-expense-row,
.monthly-bill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding-block: 6px;
}

.monthly-expense-value { display: grid; justify-items: end; text-align: end; }
.monthly-expense-actions { display: flex; justify-content: end; min-width: 88px; }
.monthly-expense-actions .button--icon,
.monthly-bill-row .button--icon { width: 44px; min-height: 44px; }
.monthly-expense-status { font-weight: 650; }
.monthly-expense-status:not([data-expense-status="unverified"]) { color: var(--ink); }
.monthly-expense-row--due { box-shadow: inset 3px 0 var(--forced); padding-inline-start: 9px; }

.monthly-template-grid, .monthly-pack-choice-list {
  display: grid;
  gap: 6px;
}

.monthly-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block-start: 6px; }

.monthly-template-choice.button, .monthly-pack-choice.button {
  display: grid;
  justify-content: stretch;
  justify-items: start;
  gap: 2px;
  min-height: 48px;
  padding: 7px 9px;
  text-align: start;
}

.monthly-template-choice .monthly-detail, .monthly-pack-choice .monthly-detail { font-weight: 400; }
.monthly-pack-preview-list { margin: 0; padding: 0; list-style: none; }

.monthly-pack-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 0;
  border-block-end: 1px solid var(--line);
  cursor: pointer;
}

.monthly-pack-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.monthly-pack-amount { font-family: var(--mono); font-size: 13px; text-align: end; }
.monthly-pack-preview-list ~ .button-row .button[aria-disabled="true"] { opacity: .55; cursor: default; }

.monthly-bill-records { margin-block-start: 12px; }
.monthly-bill-records summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-block: 10px;
  font-size: 13px;
  font-weight: 650;
}

.monthly-bill-records .fold-arrow { grid-column: 3; }
.monthly-no-bills { padding-block: 4px 10px; }
.monthly-bill-row h3 { font-size: 14px; }

.monthly-bill-modes,
.monthly-bill-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.monthly-bill-modes .button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--wash);
}

.monthly-preview-summary:empty { display: none; }
.monthly-bill-preview-list {
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.monthly-bill-preview-row {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  font-size: 13px;
}

.monthly-bill-preview-row + .monthly-bill-preview-row { border-block-start: 1px solid var(--line); }
.monthly-bill-preview-row[data-bill-preview-error] { background: var(--wash); }
.monthly-bill-preview-row[data-bill-preview-error] .row-copy { grid-column: 2 / -1; }
.monthly-bill-preview-line { color: var(--muted); font-family: var(--mono); }
.monthly-bill-preview-amount { font-size: 13px; }
