.calculator-views { display: flex; align-items: end; gap: 1.5rem; border-bottom: 1px solid var(--rule); padding-top: 1rem; }
.calculator-views a { color: var(--muted); border-bottom: 3px solid transparent; text-decoration: none; padding: .68rem .1rem .8rem; font-size: .95rem; font-weight: 620; }
.calculator-views a:hover, .calculator-views a[aria-current] { color: var(--violet-deep); }
.calculator-views a[aria-current] { border-color: var(--violet); }
.monthly-workspace { padding-top: 1.6rem; }
.wallet-panel { min-width: 0; }
#optimal-wallet, #card-rankings, #spend-heading { scroll-margin-top: 1rem; }
@media (min-width: 651px) { #optimal-wallet, #card-rankings { scroll-margin-top: 4.5rem; } }
.wallet-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.wallet-panel-head p, .wallet-method p { margin-top: .38rem; font-size: .94rem; line-height: 1.5; color: var(--muted); }
.wallet-panel-head a { color: var(--violet-deep); font-size: .9rem; font-weight: 620; flex-shrink: 0; }
#wallet-controls { margin: 1.05rem 0; border: 1px solid var(--rule); border-radius: .7rem; background: white; }
.wallet-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; padding: 1rem 1.15rem .65rem; }
.wallet-filter-grid label, .wallet-select-label, .owned-search { display: grid; align-content: start; gap: .3rem; font-size: .85rem; font-weight: 610; }
.wallet-filter-grid select, .wallet-select-label select, .owned-search input { font: inherit; font-size: .95rem; font-weight: 470; padding: .52rem .65rem; border: 1px solid #c7bdcf; border-radius: .38rem; min-width: 0; width: 100%; background-color: white; color: var(--ink); }
.wallet-panel input:focus-visible, .wallet-panel select:focus-visible, .wallet-panel summary:focus-visible, .calculator-views a:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wallet-profile-note { color: var(--muted); font-size: .86rem; line-height: 1.4; }
#wallet-controls .wallet-profile-note { margin: 0 1.15rem .85rem; }
.wallet-extra, .wallet-method { font-size: .91rem; }
.wallet-extra { border-top: 1px solid var(--rule); padding: .7rem 1.15rem; }
.wallet-extra summary, .wallet-method summary, .wallet-card summary { cursor: pointer; color: var(--violet-deep); font-weight: 620; }
.wallet-extra-body { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: .8rem 1rem; margin-top: 1rem; }
.wallet-check { display: flex; align-items: center; gap: .55rem; font-size: .94rem; cursor: pointer; }
.wallet-check input { width: 1rem; height: 1rem; margin: 0; flex: 0 0 auto; accent-color: var(--violet); }
.wallet-check[hidden] { display: none; }
.owned-fieldset { grid-column: 1/-1; margin: .5rem 0 0; padding: .7rem .85rem; border: 1px solid var(--rule); border-radius: .5rem; min-width: 0; }
.owned-fieldset legend { font-weight: 650; padding: 0 .25rem; }
.owned-fieldset p { color: var(--muted); font-size: .86rem; line-height: 1.4; margin: 0 0 .6rem; }
.owned-search { margin: .8rem 0 .5rem; }
.owned-list { max-height: 9rem; overflow-y: auto; }
.owned-list .wallet-check { padding: .35rem .15rem; }
.wallet-feedback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wallet-feedback:has(+ [aria-busy="true"]) { position: static; width: auto; height: auto; overflow: visible; clip-path: none; padding: 1.7rem 1rem; color: var(--violet-deep); background: var(--tint); border-radius: .5rem; }
#wallet-results[aria-busy="true"] { opacity: .5; }
.wallet-outcome { border: 1px solid #cec0e2; border-radius: .85rem; background: white; overflow: hidden; }
.wallet-yield { color: white; background: var(--plum); padding: 1.15rem clamp(1.05rem,2.5vw,1.7rem); }
.wallet-kicker { color: #e5d5ff; font-weight: 620; font-size: .85rem; }
.wallet-yield-line { display: flex; flex-wrap: wrap; gap: .1rem .7rem; align-items: baseline; margin: .3rem 0; }
.wallet-yield-line strong { font-weight: 575; font-size: clamp(2.4rem,4vw,3.7rem); line-height: 1.1; letter-spacing: -.055em; overflow-wrap: anywhere; }
.wallet-yield-line span { font-size: .97rem; }
.wallet-gain, .wallet-mix { color: #eee6fa; font-size: .89rem; line-height: 1.45; }
.wallet-mix { margin-top: .5rem; }
.wallet-ledger { display: grid; grid-template-columns: repeat(3,1fr); background: #f1eaf9; border-bottom: 1px solid #dfd3eb; font-variant-numeric: tabular-nums; }
.wallet-ledger > div { padding: .85rem .8rem; min-width: 0; }
.wallet-ledger > div + div { border-left: 1px solid #dfd3eb; }
.wallet-ledger span, .wallet-card-line p, .wallet-card-amount span, .wallet-route small { display: block; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.wallet-ledger b { display: block; font-size: 1.15rem; font-weight: 645; margin-top: .18rem; overflow-wrap: anywhere; }
.wallet-contents { padding: 1rem clamp(.9rem,1.65vw,1.5rem) .2rem; }
.wallet-contents h3, .wallet-route h3 { font-size: 1.18rem; letter-spacing: -.025em; }
.wallet-card { padding: .85rem 0; }
.wallet-card + .wallet-card { border-top: 1px solid var(--rule); }
.wallet-card-line { display: grid; align-items: start; gap: .5rem 1rem; grid-template-columns: 1fr auto; }
.wallet-card-line h4 { margin: 0 0 .2rem; font-size: 1.08rem; line-height: 1.2; }
.wallet-card-amount { text-align: right; }
.wallet-card-amount strong { color: var(--violet-deep); font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.wallet-card details { margin-top: .45rem; font-size: .85rem; }
.wallet-card details p { color: var(--muted); margin-top: .35rem; line-height: 1.45; }
.wallet-card-guidance { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: .5rem; }
.wallet-card-guidance a { color: var(--violet-deep); }
.wallet-sources a { color: var(--violet-deep); }
.wallet-route { margin: 1.3rem 0 .8rem; }
.wallet-route p { margin: .25rem 0 .7rem; font-size: .9rem; color: var(--muted); }
.wallet-route table { width: 100%; border-collapse: collapse; text-align: left; font-size: .95rem; font-variant-numeric: tabular-nums; }
.wallet-route tr { border-bottom: 1px solid var(--rule); }
.wallet-route th, .wallet-route td { padding: .6rem .45rem .6rem 0; font-weight: 470; overflow-wrap: anywhere; }
.wallet-route th:first-child { width: 26%; }
.wallet-route :is(th,td):last-child { text-align: right; padding-right: 0; }
.wallet-route thead th { font-weight: 580; font-size: .8rem; color: var(--muted); }
.wallet-route small { margin-top: .15rem; }
.wallet-method { margin-top: 1.1rem; }
@media (max-width: 650px) {
  .calculator-views { padding-top: .35rem; }
  .wallet-panel-head { display: block; }
  .wallet-panel-head a { display: inline-block; margin-top: .42rem; }
  .wallet-filter-grid { gap: .7rem .55rem; padding: .8rem .7rem .6rem; }
  .wallet-filter-grid select { padding-inline: .35rem; }
  #wallet-controls .wallet-profile-note { margin-inline: .7rem; }
  .wallet-extra { padding-inline: .75rem; }
  .wallet-extra-body { grid-template-columns: 1fr; }
  .wallet-ledger > div { padding: .65rem .5rem; }
  .wallet-ledger span { font-size: .77rem; }
  .wallet-ledger b { font-size: 1.03rem; }
  .wallet-card-line { gap: .35rem .65rem; }
  .wallet-card-amount span { max-width: 6rem; margin-left: auto; }
  .wallet-route table { font-size: .87rem; }
}
@media (max-width: 370px) {
  .wallet-filter-grid { grid-template-columns: 1fr; }
}
