/* Homepage "Processing fees" section and its calculator (assets/fees.js).
   Uses the shared tokens from style.css only; loaded by index.html alone, so
   other pages need no cache-bust when this changes (bump ?v= in index.html). */

.fees .sec-head .actions { margin-top: 18px; }
.fees-why { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.fees-why p { color: var(--muted); }
.fees-how { margin: 0; }
.fees-how .checks { margin: 10px 0 0; }
.fees-how .checks li { font-size: 14.5px; margin-bottom: 9px; }
@media (max-width: 820px) { .fees-why { grid-template-columns: 1fr; gap: 18px; } }

.fees-lead { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 32px 0 8px; padding: 22px 26px; border-radius: 16px; background: var(--grad-roof); color: #DDE6EF; }
.fees-lead b { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; color: var(--emerald-bright); white-space: nowrap; }
.fees-lead p { margin: 0; flex: 1 1 320px; color: #DDE6EF; font-size: 16.5px; }

.fees-h3 { font-size: clamp(19px, 2.4vw, 23px); letter-spacing: -0.015em; margin: 44px 0 6px; scroll-margin-top: 90px; }
.fees-sub { color: var(--muted); font-size: 15px; max-width: 80ch; }
.fees-cap { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }

/* Tables: scroll inside their own box on a phone, never the page. */
.fees-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.fees-table:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }
.fees-table table { display: table; margin: 0; min-width: 100%; font-size: 14.5px; }
.fees-table caption { text-align: left; font-weight: 650; padding: 12px 12px 4px; font-size: 14.5px; }
.fees-table th, .fees-table td { padding: 10px 12px; }
.fees-table tbody th { font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14.5px; }
.fees-table tbody tr:last-child th, .fees-table tbody tr:last-child td { border-bottom: 0; }
.fees-table tfoot th, .fees-table tfoot td { font-weight: 700; color: var(--text); border-top: 2px solid var(--border); border-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 14.5px; }
.fees-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fees-table .fees-cap { padding: 0 12px 12px; }
.fc-us th, .fc-us td { background: var(--brand-soft); }
.fc-sel th, .fc-sel td { background: color-mix(in srgb, var(--mist-blue) 55%, transparent); }
.fc-neg { color: #B42318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fc-neg { color: #FDA29B; } :root:not([data-theme="light"]) .fc-sel th, :root:not([data-theme="light"]) .fc-sel td { background: #1B3352; } }
:root[data-theme="dark"] .fc-neg { color: #FDA29B; }
:root[data-theme="dark"] .fc-sel th, :root[data-theme="dark"] .fc-sel td { background: #1B3352; }

.fees-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.fees-two-card { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); }
@media (max-width: 900px) { .fees-two, .fees-two-card { grid-template-columns: 1fr; gap: 0; } }

/* Calculator. */
.fees-calc-wrap { margin-top: 48px; padding: 28px; border: 1px solid #CDE7DB; border-radius: 20px; background: var(--tint-green-bg); }
.fees-calc-wrap > .fees-h3 { margin-top: 0; }
.fees-calc { display: grid; gap: 18px; margin-top: 14px; }
.fees-calc[hidden], [data-fc-nojs][hidden], .fc-block[hidden], .fc-custom[hidden], .fc-qbo[hidden] { display: none; }
.fc-block, .fc-result { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.fc-block h4, .fc-result h4 { margin: 0 0 6px; font-size: 16.5px; }
.fees-calc fieldset { border: 0; padding: 0; margin: 0; }
.fc-method { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fc-method legend { font-weight: 650; margin-bottom: 8px; padding: 0; width: 100%; }
.fc-method label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); cursor: pointer; font-weight: 600; font-size: 15px; }
.fc-method label:has(input:checked) { border-color: var(--emerald); box-shadow: 0 0 0 1px var(--emerald); background: var(--brand-soft); }
.fc-method input { accent-color: var(--emerald-deep); width: 18px; height: 18px; margin: 0; }
.fc-custom .fc-method { margin-top: 12px; }

.fees-calc input[type=text], .fees-calc input[type=number], .fees-calc select { font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid #B8C4D0; border-radius: 10px; padding: 9px 11px; width: 100%; box-sizing: border-box; min-height: 44px; }
.fees-calc select { max-width: 520px; }
.fees-calc input:focus-visible, .fees-calc select:focus-visible, .fees-calc button:focus-visible, .fc-method label:has(input:focus-visible) { outline: 3px solid var(--emerald); outline-offset: 2px; }
.fc-f label, .fc-lab { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

.fc-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.fc-shortcuts span { font-weight: 600; font-size: 14.5px; margin-right: 4px; }
.fc-shortcuts button, .fc-remove, .fc-link { font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; border-radius: 999px; min-height: 40px; padding: 7px 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.fc-shortcuts button:hover, .fc-remove:hover { border-color: var(--emerald); }
.fc-link { border-color: transparent; background: transparent; color: var(--emerald-deep); text-decoration: underline; }
.fc-remove { color: #B42318; }

.fc-rows { display: grid; gap: 10px; margin-top: 14px; }
.fc-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fc-sub output { display: block; min-height: 44px; line-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
  .fc-row { grid-template-columns: 1fr 1fr; }
  .fc-name { grid-column: 1 / -1; }
  .fc-sub output { line-height: 1.3; min-height: 0; padding-top: 4px; }
  .fc-remove { justify-self: end; align-self: end; }
}
.fc-row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.fc-row-actions .cta { margin: 0; font: inherit; font-weight: 650; cursor: pointer; }
.fc-totals { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; max-width: none; }
.fc-totals b { font-size: 18px; font-variant-numeric: tabular-nums; }

.fc-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; max-width: 640px; }

.fc-result { border-color: var(--emerald); box-shadow: 0 0 0 1px var(--emerald); }
.fc-headline { font-size: clamp(18px, 2.4vw, 22px); font-weight: 750; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--emerald-deep); }
.fc-headline.fc-neg { color: #B42318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fc-headline { color: var(--emerald-bright); } :root:not([data-theme="light"]) .fc-headline.fc-neg { color: #FDA29B; } }
.fc-per summary { cursor: pointer; font-weight: 650; padding: 6px 0; color: var(--emerald-deep); }
.fc-qbo { margin: 0; }
.fc-qbo h3 { font-size: 15.5px; }

.fees-foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; margin-top: 36px; }
.fees-foot h3 { font-size: 16.5px; margin: 0 0 8px; }
.fees-foot ul { padding-left: 20px; margin: 8px 0 0; }
.fees-foot li { color: var(--muted); font-size: 14.5px; margin-bottom: 6px; }
.fees-src li { margin-bottom: 4px; }
.fees-foot .actions { margin-top: 18px; }
@media (max-width: 820px) { .fees-foot { grid-template-columns: 1fr; gap: 20px; } .fees-calc-wrap { padding: 18px 14px; } .fc-block, .fc-result { padding: 14px; } }
:root[data-theme="dark"] .fc-headline { color: var(--emerald-bright); }
:root[data-theme="dark"] .fc-headline.fc-neg { color: #FDA29B; }
/* Grid items default to min-width:auto, so a wide table or a long <select>
   option would stretch the whole calculator past a phone's width. */
.fees-calc > *, .fees-two > *, .fees-why > *, .fees-foot > *, .fc-row > * { min-width: 0; }
.fees-calc select { min-width: 0; text-overflow: ellipsis; }
#processing-fees { scroll-margin-top: 72px; }
