/* Report chrome shares the app's surface and type scale. Period controls keep
   their compact geometry, and each report owns its plot and scroll layout. */
#app > :is(.cash-header, .wallet-header, .page-header) {
  background: var(--background-surface);
  color: var(--object-primary);
  border-bottom: var(--size-px) solid var(--border);
}
#app > :is(.wallet-header, .page-header) h1 {
  font-size: var(--text-heading-base-font-size);
  line-height: var(--text-heading-base-line-height);
  font-weight: var(--font-weight-bold);
}
.feature-screen > .dialog-head h2 { font-weight: var(--font-weight-bold); }
.cash-header .cash-ledger-title { font-weight: var(--font-weight-semibold); }

.cash-sheet :is(.card.cash-summary, .cash-calendar, .day-card, .budget-list-card),
.wallet-page main .wallet-folder,
.analysis-page > :is(.report-chart-pane, .report-list) {
  border: var(--size-px) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background-surface);
  box-shadow: none;
}
.cash-sheet .cash-period {
  border-bottom-color: var(--border-muted);
}
.cash-sheet .cash-net-value small,
.wallet-page .wallet-overview h2 {
  color: var(--object-secondary);
  font-size: var(--text-caption-font-size);
  line-height: var(--text-caption-line-height);
  font-weight: var(--font-weight-semibold);
}
.cash-sheet .cash-net-value strong,
.wallet-page .wallet-overview .wallet-net {
  font-size: var(--text-heading-lg-font-size);
  line-height: var(--text-heading-lg-line-height);
  font-weight: var(--font-weight-bold);
  font-variant-numeric: tabular-nums;
}
.cash-sheet .cash-flow-totals .cash-total-label {
  font-size: var(--text-title-xs-font-size);
  line-height: var(--text-title-xs-line-height);
  font-weight: var(--font-weight-semibold);
  color: var(--object-secondary);
}
.cash-sheet .day-card > summary,
.wallet-page .wallet-folder > summary {
  background: var(--section-surface);
  color: var(--object-secondary);
}
.cash-sheet .day-card .tx .symbol,
.wallet-page .wallet-folder .symbol {
  border-radius: var(--rounded-circle);
  background: var(--background-accent-muted);
  color: var(--object-accent);
}
.cash-sheet .day-card .tx .name,
.wallet-page .wallet-folder .account-title {
  font-size: var(--text-body-font-size);
  line-height: var(--text-body-line-height);
  font-weight: var(--font-weight-semibold);
}
.cash-sheet .day-card .tx :is(.sub, .right small),
.wallet-page .wallet-folder :is(.account-kind, .account-note, .wallet-account-value small) {
  font-size: var(--text-caption-font-size);
  line-height: var(--text-caption-line-height);
  color: var(--object-secondary);
}

.wallet-page main .wallet-overview {
  margin: var(--gap-3);
  padding: var(--card-padding);
  border: var(--size-px) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background-interactive-muted);
}
.wallet-page .wallet-net:not(.expense),
.wallet-page .wallet-totals strong {
  color: var(--object-primary);
}
.wallet-page .wallet-overview .wallet-totals {
  gap: var(--gap-2) var(--gap-3);
  padding-top: var(--gap-2);
  border-top: var(--size-px) solid var(--border);
}
.wallet-page .wallet-totals strong {
  font-size: var(--text-title-base-font-size);
  line-height: var(--text-title-base-line-height);
  font-weight: var(--font-weight-semibold);
}
.wallet-page .wallet-missing-rate {
  color: var(--object-interactive);
  background: var(--background-surface);
  border: var(--size-px) solid var(--border);
  border-radius: var(--radius-base);
}
.wallet-page .wallet-accounts { padding-top: 0; }
.wallet-page .wallet-search-field input {
  border-color: var(--border-emphasized);
  border-radius: var(--field-radius);
  min-height: var(--field-height);
  color: var(--object-primary);
  background: var(--background-surface);
}
.wallet-page .wallet-search-field input:focus-visible {
  outline-color: var(--border-interactive);
}
.wallet-page .wallet-folder .account-row {
  border-bottom-color: var(--border-muted);
}

.wallet-page .wallet-kind-tabs,
.cash-search .cash-search-kinds,
.analysis-page .analysis-dimensions {
  gap: var(--gap-0-5);
  padding: var(--gap-1);
  border-radius: var(--radius-lg);
  background: var(--background-emphasized);
}
.wallet-page .wallet-kind-tabs > button,
.cash-search .cash-search-kinds > button,
.analysis-page .analysis-dimensions > button {
  position: relative;
  border: 0;
  border-radius: var(--radius-base);
  background: var(--background-transparent);
  color: var(--object-secondary);
  padding-inline: var(--gap-0-5);
  font-size: var(--text-title-sm-font-size);
  line-height: var(--text-title-sm-line-height);
  font-weight: var(--font-weight-semibold);
}
.analysis-page .analysis-dimensions > button { min-height: var(--size-10); }
@media (max-height: 500px) {
  /* Reclaim the track's vertical inset above a phone keyboard while keeping
     each filter's touch target and the scrollable invoice area. */
  .cash-search .cash-search-kinds { padding-block: 0; }
  .cash-search .cash-search-kinds > button {
    padding-block: var(--gap-0-5);
    font-size: var(--text-caption-font-size);
    line-height: var(--text-caption-line-height);
  }
}
.wallet-page .wallet-kind-tabs > [aria-pressed=true],
.cash-search .cash-search-kinds > [aria-pressed=true],
.analysis-page .analysis-dimensions > .active {
  color: var(--object-primary);
  background: var(--background-surface);
  box-shadow: var(--elevation-low);
  font-weight: var(--font-weight-bold);
}
:is(.wallet-kind-tabs, .cash-search-kinds, .analysis-dimensions) > button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: var(--object-primary);
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  :is(.wallet-kind-tabs, .cash-search-kinds, .analysis-dimensions) > button:enabled:hover::after { opacity: var(--opacity-5); }
}
:is(.wallet-kind-tabs, .cash-search-kinds, .analysis-dimensions) > button:enabled:active::after { opacity: var(--opacity-10); }

.analysis-page .report-list > :is(.report-list-head, .report-table-head) {
  background: var(--background-subtle);
  color: var(--object-secondary);
  border-bottom: var(--size-px) solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size: var(--text-title-sm-font-size);
  line-height: var(--text-title-sm-line-height);
  font-weight: var(--font-weight-semibold);
}
.analysis-page .report-list :is(.report-rank, .report-data-row) {
  border-bottom-color: var(--border-muted);
}
.analysis-page .report-list :is(.report-rank.selected, .report-data-row.selected, .report-total) {
  background: var(--background-interactive-muted);
}
.analysis-page .timeline-pane :is(.report-insight, .report-legend small) {
  color: var(--object-secondary);
}
.analysis-page .timeline-pane .axis-label { fill: var(--object-secondary); }
.analysis-page .report-legend button {
  border-radius: var(--radius-sm);
  color: var(--object-secondary);
}
.analysis-page .report-legend button.active {
  color: var(--object-primary);
  border-color: var(--border);
  background: var(--background-subtle);
}
