/* Fees and payments. Built on the shared patterns in app.css (.ph, .figures, .toolbar, .group, .fields, .split). */
.money-gap { margin-bottom: 1rem; }
.money-gap-top { margin-top: 1rem; }
.money-amt, .money-owes { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-owes { font-weight: 600; }
.money-note { display: block; color: var(--muted); font-size: .875rem; margin-top: .15rem; }

/* Member Fees page */
.money-bill .kv { margin-bottom: .25rem; }
.money-sub { font-size: .95rem; font-weight: 600; margin: 1.25rem 0 .1rem; }
.money-choices > * + * { margin-top: .7rem; }
.money-due { font-family: var(--sys-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.money-home p { margin: 0; }
.money-home { flex-wrap: wrap; }

/* Payments: the expanded "Record payment" row */
.money-payrow td { background: var(--fill); }
.money-payrow:hover { background: none; }
.money-payform { align-items: end; }
.money-payform .money-save { flex: 0 0 auto; }
.money-paylist { margin: 0; }
.money-paylist > li { padding-inline-start: 0 !important; padding-inline-end: 0; gap: 1rem; }
.money-paylist > li::before { inset-inline-start: 0 !important; }

/* Fee setup: repeatable rows */
.money-editor:empty { display: none; }
.money-editor:not(:empty) + .money-none { display: none; }
.money-editrow { align-items: end; }
.money-remove { flex: 0 0 auto !important; padding-bottom: .55rem; }
.money-default { min-height: 44px; align-items: center; }

/* Reduced fees */
.money-request.stack > * + * { margin-top: .7rem; }
.money-reason { margin: 0; padding: .7rem .9rem; background: var(--fill); border-radius: var(--r-ctl); white-space: pre-wrap; line-height: 1.5; }
.money-decide { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.money-decide .help { margin: 0; }

/* Deposits */
.money-refund input { width: 6.5rem; min-height: 36px; padding: .35rem .6rem; }
.money-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }

@media (max-width: 680px) {
  .money-table .row-actions { flex-direction: column; align-items: flex-end; gap: .5rem; }
}

/* Repeated rows: labels show once, on the first row; later rows keep them for screen readers. */
.money-editrow + .money-editrow > div > label:not(.check) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 680px) {
  .money-editrow + .money-editrow > div > label:not(.check) { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .money-editrow + .money-editrow { padding-top: .9rem; box-shadow: inset 0 .5px 0 var(--sep); }
}

/* app.css styles checkboxes but not radios; without this a radio stretches like a text box. */
.money-choices input[type=radio], .money-default input[type=radio] { width: 1.3rem; height: 1.3rem; min-height: 0; padding: 0; flex: none; accent-color: var(--tint); }
.money-bill + .group { margin-top: 1.5rem; }

/* Payments: the check-first panel for the bulk fee reminder */
.money-remind .money-sub { margin-top: 0; }
.money-remindlist { max-height: 18rem; overflow-y: auto; margin: .75rem 0 1rem; }
.money-remindlist .chip { margin-inline-start: .4rem; }
.money-remind h2:focus { outline: none; }

/* Fee setup: a repeated row stays on one line above phone width, so later rows (labels hidden) line up under the first. */
@media (min-width: 681px) {
  .money-editrow { flex-wrap: nowrap; }
  .money-editrow > * { flex: 2 1 0; min-width: 0; }
  .money-editrow > .narrow { flex: 1 1 0; min-width: 4.5rem; max-width: 7.5rem; }
}

/* Phones: payment and deposit tables become one block per member, so the actions never sit off to the side. */
@media (max-width: 560px) {
  .money-table thead, .money-deposits thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .money-table, .money-table tbody, .money-deposits, .money-deposits tbody { display: block; }
  .money-table tbody tr:not([hidden]), .money-deposits tbody tr { display: grid; gap: .5rem .75rem; padding: .8rem 1.25rem; border-top: .5px solid var(--sep); }
  .money-table tbody tr:first-child, .money-deposits tbody tr:first-child { border-top: 0; }
  .table.money-table td, .table.money-deposits td { display: block; padding: 0; border: 0; width: auto; min-width: 0; }
  .money-table tbody tr:not([hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .money-table td:first-child { grid-column: 1 / 3; }
  .money-table td:nth-child(2) { grid-column: 3; justify-self: end; }
  .table.money-table td.num { text-align: start; }
  .money-table td.num::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); }
  .money-table td:last-child { grid-column: 1 / -1; }
  .money-table .row-actions { flex-direction: row; justify-content: flex-start; align-items: center; gap: 1.25rem; }
  .money-table .row-actions button { min-height: 44px; }
  .money-table tbody tr.money-payrow:not([hidden]) { display: block; background: var(--fill); }
  .money-deposits tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .money-deposits td:nth-child(3) { grid-column: 1; }
  .money-deposits td:nth-child(4) { grid-column: 1 / -1; }
  .money-deposits td:empty { display: none; }
  .money-refund { justify-content: flex-start; }
}

/* Phones: the Money tabs sit in one even row (wrapping into even rows only if they can't fit), so every tab shows. */
@media (max-width: 600px) {
  body:has(.money-ph) .ad-tabs-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr)); width: 100%; }
  body:has(.money-ph) .ad-tabs a { text-align: center; }
  /* the three figures on one row, so the table starts higher */
  .money-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .45rem 0; }
  .money-figures > div { padding: .3rem .9rem; }
  .money-figures dt { font-size: .75rem; }
  .money-figures dd { font-size: 1.15rem; }
  /* row buttons are thumb-sized */
  .money-table .row-actions button, .money-refund button, .money-refund input, .money-paylist .quiet { min-height: 44px; }
  .money-ph .ph-actions .quiet.chev { min-height: 40px; display: inline-flex; align-items: center; }
  .money-ph ~ .toolbar .end .quiet { min-height: 44px; }
}
.money-ph .ph-actions .quiet.chev + .quiet.chev { margin-inline-start: .75rem; }

/* Paying without card: the garden's pre-deadline way to pay, and "I've sent a payment" */
.money-meetup p, .money-sent p { margin: 0; }
.money-meetup > * + *, .money-sent > * + * { margin-top: .3rem; }
.money-sentform { padding-bottom: .9rem; box-shadow: inset 0 -.5px 0 var(--sep); }
.money-sentform p { margin: 0; }
.money-dates { margin-top: .5rem; }

/* Fees page status lines (a reduced-fee request waiting for review, a payment waiting for confirmation): body size,
   full ink, so they read as the page's headline rather than fine print. Amber on amber-soft is 4.7:1. */
.money-status p { margin: 0; font-size: 1rem; color: var(--ink); }
.money-status > * + * { margin-top: .3rem; }
.money-status .chip { font-size: 1rem; padding: .15rem .65rem; }
.money-status p.muted { color: var(--muted); }
.money-sent button.quiet { font-size: 1rem; min-height: 44px; }
.money-asked { padding-bottom: .9rem; box-shadow: inset 0 -.5px 0 var(--sep); }
.money-choices fieldset:disabled label, .money-choices:disabled label { cursor: default; }

/* Member Fees page: the season switcher (next season's bill, an earlier season's balance) */
.money-season { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: -.25rem 0 1rem; }
.money-season label { margin: 0; }
.money-season select { width: auto; max-width: 100%; }
.money-plotowes { margin: 0; }
.money-extras-closed p { margin: 0; }
.money-extras-closed > * + * { margin-top: .3rem; }

/* Payments: earlier seasons' balances, renewal, credits, deleted payments, the overpayment check, Remind preview */
.money-carried { color: var(--ink); }
.money-blocks { margin-inline-start: .35rem; font-size: .8rem; font-weight: 600; color: var(--amber); white-space: nowrap; }
.money-credit { color: var(--muted); font-weight: 600; }
.money-overpay { flex: 1 0 100%; padding: .7rem .9rem; background: var(--surface); border-radius: var(--r-ctl); box-shadow: inset 0 0 0 .5px var(--sep); }
.money-overpay p { margin: 0 0 .5rem; }
.money-overpay .actions { margin: 0; }
.money-deleted .row-meta { white-space: normal; }
.money-struck { text-decoration: line-through; color: var(--muted); }
.money-preview .money-reason { font-size: .9rem; max-height: 16rem; overflow-y: auto; }
.money-preview p { margin: 0 0 .4rem; }
.money-payform .help { margin: .2rem 0 0; }
button[aria-busy="true"] { cursor: progress; }
/* credit held from an overpayment (owner decision 3) and deposit refund dates (decision 9) */
.money-credit-note { margin: 0; padding: .6rem .8rem; background: var(--surface); border-radius: var(--r-ctl); box-shadow: inset 0 0 0 .5px var(--sep); }
.money-credit-held { margin: 0; }
.money-credit-held button { margin-inline-start: .35rem; }
.money-refunddate { align-items: flex-end; gap: .6rem; flex-wrap: wrap; }
.money-refunddate + .money-refunddate { margin-top: .4rem; }

/* Accepted ways to pay: the member's list and the fee-setup checklist */
.money-ways { margin-top: .5rem; }
.money-ways-title { font-size: 1rem; margin: 0 0 .25rem; }
.money-ways-list { list-style: none; margin: 0; padding: 0; }
.money-ways-list li { padding: .2rem 0; overflow-wrap: anywhere; }
.money-ways-detail { color: var(--muted, inherit); margin-inline-start: .35rem; }
.money-accepted { border: 0; margin: 0; padding: 0; min-width: 0; }
.money-accepted legend { font-weight: 600; padding: 0; margin-bottom: .25rem; }
.money-accept-row { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .5rem; align-items: center; padding: .2rem 0; }
.money-accept-row input:not([type]) { width: 100%; }
@media (max-width: 560px) { .money-accept-row { grid-template-columns: 1fr; gap: .15rem; } }

/* Payments: the quiet line under the three figures (who owes, renewal, sent, requests, deposits) */
.money-facts { margin: -.4rem 0 1rem; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.money-facts a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--sep); text-underline-offset: .2em; }
.money-facts a:hover { color: var(--tint); text-decoration-color: currentColor; }

/* Payments: each row shows one action; the rest open from a small "More" menu */
.money-more { position: relative; }
.money-more > summary { list-style: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  color: var(--muted); cursor: pointer; }
.money-more > summary::-webkit-details-marker { display: none; }
.money-more > summary:hover, .money-more[open] > summary { background: var(--fill); color: var(--ink); }
.money-more > summary svg { width: 20px; height: 20px; fill: currentColor; }
.money-menu { position: fixed; z-index: 30; min-width: 13rem; padding: .35rem;
  display: flex; flex-direction: column; align-items: stretch; background: var(--surface); border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14), 0 0 0 1px var(--card-edge); }
.money-menu button { text-align: start; justify-content: flex-start; padding: .55rem .75rem; min-height: 40px; border-radius: 8px; white-space: nowrap; }
.money-menu button:hover { background: var(--fill); }
@media (max-width: 560px) { .money-more > summary { width: 44px; height: 44px; } }

/* Member Fees page: the lead (what's left to pay and by when, or "Paid. You're all set"), how to pay, then the bill */
.money-lead p { margin: 0; }
.money-lead-label { font-size: .95rem; color: var(--muted); }
.money-lead-amount { font-family: var(--sys-display); font-size: 2.6rem; line-height: 1.1; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.money-lead-due { font-size: 1.05rem; color: var(--ink); margin-top: .15rem !important; }
.money-lead-sub { font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: .1rem !important; }
button.money-jump { margin: .3rem 0 0 -.4rem; padding-inline: .4rem; min-height: 36px; font-size: .95rem; }
@media (max-width: 720px) { button.money-jump { min-height: 44px; } }
.money-ask { margin: 0; }
.money-lead-paid { display: flex; align-items: flex-start; gap: .75rem; padding: .25rem 0; }
.money-lead-check { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; margin-top: .1rem; }
.money-lead-check circle { fill: var(--tint); }
.money-lead-check path { fill: none; stroke: var(--tint-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.money-lead-title { font-family: var(--sys-display); font-size: 1.45rem; line-height: 1.25; font-weight: 700; color: var(--ink); }
.money-how { padding: .9rem 1rem; background: var(--fill); border-radius: var(--r-ctl); overflow-wrap: anywhere; }
.money-how p { margin: 0; }
.money-how > * + * { margin-top: .4rem; }
.money-how-title { font-size: 1.05rem; margin: 0; }
.money-reassure { color: var(--muted); font-size: .95rem; }
.money-lead ~ .money-details { padding-top: .25rem; box-shadow: inset 0 .5px 0 var(--sep); }
.money-details > .money-sub:first-child { margin-top: .75rem; }
.money-details > * + * { margin-top: .5rem; }
.money-live { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.money-saved { font-weight: 400; color: var(--tint); font-size: .95rem; }

/* Fee setup: one save bar that stays in reach at the bottom, naming unsaved edits */
.money-savebar { position: sticky; bottom: 0; z-index: 5; margin: 1.5rem -1rem 0; padding: .6rem 1rem; justify-content: flex-end; align-items: center;
  flex-wrap: nowrap; background: var(--bar); box-shadow: 0 -.5px 0 var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.money-dirty:empty { display: none; }
.money-rates > .help, .money-rates > .money-editor { margin-top: .5rem; }
.money-scale { margin-top: .5rem; padding-top: .75rem; box-shadow: inset 0 .5px 0 var(--sep); }
.money-scale > * + * { margin-top: .5rem; }
@media (max-width: 720px) {
  body:has(.tabbar:not([hidden])) .money-savebar { bottom: calc(52px + max(6px, env(safe-area-inset-bottom))); }
  .money-savebar > .primary { flex: 1; }
}
.money-form .fields.money-top { align-items: start; }

/* "How" on a payment: the usual ways as one-tap chips (garden green when picked), the rest under Other */
.money-payform > .full { flex: 1 1 100%; }
.money-chips { border: 0; padding: 0; margin: 0; min-width: 0; }
.money-chips legend { font-size: .875rem; font-weight: 600; padding: 0; margin-bottom: .3rem; }
.money-chiprow { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.money-chip { position: relative; display: inline-flex; }
.money-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.money-chip span { display: inline-block; min-height: 44px; padding: .6rem .9rem; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep); color: var(--ink); font-size: .9rem; line-height: 1.2; }
.money-chip input:checked + span { background: var(--tint); color: var(--tint-ink); font-weight: 600; }
.money-chip input:focus-visible + span { outline: 2px solid var(--tint); outline-offset: 2px; }
.money-chiprow select { width: auto; min-width: 9rem; }
/* a member who left: kept in the books, shown quietly */
.money-inactive > td, .money-inactive .row-title { color: var(--muted); }
/* "Take several payments": an amount beside each name */
.money-takerow { align-items: center; gap: .6rem; flex-wrap: wrap; }
.money-takeamt { width: 7rem; flex: none; text-align: end; font-variant-numeric: tabular-nums; }

/* Paid up: the bill and the fee level / extras fold to one row each; the season picker moves to the foot. */
.money-bill-fold { box-shadow: inset 0 .5px 0 var(--sep); padding-top: .25rem; }
.money-bill-fold > summary { min-height: 48px; }
.money-bill-fold .money-details { box-shadow: none; padding-top: 0; }
details.money-choose-fold > summary { min-height: 44px; }
.group + .money-season, .money-season:last-child { margin: 1.5rem 0 0; }

/* S6: how each person paid (cash or check), and a check number */
.money-takehow { width: auto; flex: none; min-width: 7.5rem; }
.money-takeck { width: 7rem; flex: none; }
/* N2: "Is this the payment marked as sent?" */
.money-sentq { border: 0; padding: 0; margin: 0; }
.money-sentq legend { font-weight: 600; margin-bottom: .25rem; }
/* r23: why a payment is deleted (chips), opened under its line */
.money-paylist > li:has(.money-delform:not([hidden])) { flex-wrap: wrap; }
.money-delform { flex-basis: 100%; }
.money-accepted { margin: -.6rem 0 1rem; }
/* Take several payments: amounts carry their "$"; the Who box looks like the rest of the page, not a browser default. */
.money-in { position: relative; display: inline-flex; align-items: center; flex: none; }
.money-in > span { position: absolute; inset-inline-start: .7rem; color: var(--muted); pointer-events: none; }
.money-in > .money-takeamt { padding-inline-start: 1.6rem; }
#markpaid-form > fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .35rem; }
#markpaid-form > fieldset > legend { padding: 0; margin-bottom: .3rem; font-weight: 600; }
/* Each person's own "how" picker only when some paid a different way; otherwise everyone uses How below. */
#markpaid-form:not(:has(#mp-diffhow:checked)) .money-takehow { display: none; }
.money-diffhow { margin: .25rem 0 0; }

/* Record a payment (#/fees/record): find the member, then one form with one big button. */
.rp-card > label[for="rp-q"] { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.rp-hint { margin: .6rem 0 .1rem; }
.rp-hint:empty { display: none; }
.rp-list { margin-top: .35rem; }
.rp-list button.mg-row { width: 100%; background: none; border: 0; border-radius: 0; font: inherit; text-align: start; min-height: 56px; }
.rp-list button.mg-row:hover { background: var(--fill); }
.rp-list .mg-title .muted { font-weight: 400; }
.rp-owes { flex: none; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.rp-owes.due b { color: var(--ink); }
.rp-none { padding: .9rem 1.25rem; }
.rp-who { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rp-name { margin: 0; font-size: 1.3rem; }
.rp-name .muted { font-size: 1rem; font-weight: 400; }
.rp-meta { margin: .15rem 0 0; }
.rp-amt { display: flex; }
.rp-amt > .money-takeamt { width: 100%; max-width: 12rem; font-size: 1.6rem !important; font-weight: 600; min-height: 56px; text-align: start; font-variant-numeric: tabular-nums; }
.rp-amt > span { font-size: 1.3rem; }
.rp-amt > .money-takeamt { padding-inline-start: 2rem; }
.rp-form .actions > .primary { flex: 1 1 100%; min-height: 52px; font-size: 1.05rem; }
.rp-done { display: flex; gap: .9rem; align-items: flex-start; }
.rp-done .money-lead-check { width: 2.25rem; height: 2.25rem; flex: none; }
.rp-done p { margin: .35rem 0 0; }
.rp-card + .actions { margin-top: 1rem; }
.rp-form > .money-chips { margin-top: .35rem; }
/* Phones: the Record button stays in reach above the tab bar, like Confirm on My details. */
@media (max-width: 720px) {
  .rp-form { padding-bottom: 0; }
  .rp-form > .actions { position: sticky; bottom: calc(52px + max(6px, env(safe-area-inset-bottom))); z-index: 5; margin: .5rem -1.25rem 0;
    padding: .6rem 1.25rem; background: var(--surface); box-shadow: 0 -.5px 0 var(--sep); border-radius: 0 0 var(--r-group) var(--r-group); }
}
/* The page head: the season picker sits in the subtitle (it is the season name), the Treasurer's tools are one row of links */
.money-ph .subtitle select { width: auto; display: inline-block; min-height: 36px; padding-block: .3rem; font-size: .95rem; vertical-align: baseline; }
.money-tools-row { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; flex-basis: 100%; }
.money-tools-row > button.link { min-height: 44px; font-size: .95rem; }
@media (min-width: 721px) { .money-tools-row { flex-basis: auto; margin-inline-start: .5rem; } }

/* Fee setup: each section after Plot fee folds to its title and how it's set now (design review 2026-11-10) */
.money-fold > summary { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; min-height: 44px; cursor: pointer;
  list-style: none; padding-block: .35rem; }
.money-fold > summary::-webkit-details-marker { display: none; }
.money-fold > summary .group-title { margin: 0; padding: 0; font-family: var(--sys); font-size: 1.0625rem; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--ink); }
/* The save bar only rides along the screen once there's something to save */
.money-form:not(.dirty) .money-savebar { position: static; }
.money-fold > summary::after { content: ""; width: .45rem; height: .45rem; border: solid var(--muted); border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg); margin-inline-start: auto; align-self: center; transition: transform .2s ease-out; }
.money-fold[open] > summary::after { transform: rotate(-135deg); }
.money-fold-now { color: var(--muted); font-size: .95rem; }
.money-fold[open] > .card { margin-top: .4rem; }
