/* Financial sources and GEN fields share Fund operator's native form rhythm. */
[data-addition-summary] .stake-addition-value { display:inline-flex; align-items:baseline; gap:4px; flex-wrap:wrap; }
.stake-addition-result-label { white-space:normal; }
.stake-addition-result-label > .help { display:block; white-space:normal; }
[data-addition-summary] :is([data-addition-value],[data-result-timing])[hidden] { display:none; }
.stake-addition-pending-main { display:none; }
.stake-addition-strip-pending { gap:8px; margin-top:16px; }
.funding-action { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:20px; align-items:start; min-width:0; }
.vp-card + .funding-action, .funding-action ~ .vp-card { margin-block-start:24px; }
.funding-action > :is(.funding-action__form,.funding-action__summary) { min-width:0; padding:18px 20px; background:var(--white); border:1px solid var(--line); border-radius:var(--r-card); }
.funding-action h2 { margin:0; font:600 15px/1.4 var(--font-b); letter-spacing:-.01em; }
.funding-action p { font-size:13.5px; line-height:1.6; }
.funding-action__form > .form { max-width:none; }
.funding-action__summary { overflow-wrap:anywhere; }
.funding-action .setup-total { margin:4px 0 20px; }
.funding-action .setup-total .kv { grid-template-columns:minmax(0,1fr); gap:6px; }
.funding-action__summary [data-stake-summary] .vp-facts { grid-template-columns:minmax(0,1fr); gap:2px 0; }
.funding-action__summary [data-stake-summary] .vp-facts dd + dt { margin-top:10px; }
.funding-action [data-stake-preview] { display:flex; flex-direction:column; gap:var(--section-gap); }
.funding-action [data-stake-preview] > :not([hidden]) { margin-block:0; }
@media(max-width:960px) { .funding-action { grid-template-columns:minmax(0,1fr); } }
.funding-picker, .funding-fixed { container-type:inline-size; }
.funding-picker { min-width:0; margin:0; padding:0; border:0; }
.funding-label, .funding-fixed > .funding-label { display:block; margin:0 0 8px; font:600 12.5px/1.5 var(--font-b); letter-spacing:normal; color:var(--ink); }
.funding-card { display:grid; grid-template-columns:18px minmax(0,1fr) minmax(0,28%); grid-template-areas:"radio main balance" "signer signer signer"; align-items:start; gap:4px 12px; min-width:0; margin-top:8px; padding:14px; border:1px solid var(--line); border-radius:10px; }
.funding-card:has(input:checked), .funding-card.is-fixed { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.funding-card > input { grid-area:radio; width:16px; height:16px; margin:3px 0 0; accent-color:var(--ink); }
.funding-card__identity { grid-area:main; min-width:0; }
.funding-card__main { display:flex; flex-direction:column; gap:3px; min-width:0; cursor:pointer; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.funding-card__kind, .funding-card__caption { display:block; color:var(--mute); font:500 11px/1.5 var(--font-b); }
.funding-card__address { display:block; min-width:0; font:500 12px/1.6 var(--font-m); overflow-wrap:anywhere; }
.funding-card__balance { grid-area:balance; min-width:0; max-width:100%; text-align:right; font-size:14px; }
.funding-card__balance .gen-balance { text-align:inherit; }
.funding-card__unknown { display:block; margin-top:6px; font-size:13px; }
.funding-card .funding-card__access { margin:4px 0 0; color:var(--mute); font:500 11px/1.5 var(--font-b); }
.funding-card__signer-label { display:block; margin-top:4px; }
.funding-card__address-row { display:flex; align-items:center; gap:6px; width:fit-content; max-width:100%; min-width:0; margin-top:4px; }
.funding-card__address-row .funding-card__address { flex:0 1 auto; }
.funding-card__address-row .wallet-ref__address { font:500 12px/1.6 var(--font-m); color:inherit; }
.funding-card__address-row .wallet-ref--full .wallet-ref__line:last-child { align-items:center; gap:6px; }
.funding-card__address-choice { flex:0 1 auto; min-width:0; cursor:pointer; }
.funding-card__address-row .copy-btn { flex:0 0 44px; min-width:44px; min-height:44px; margin:0; }
.funding-card__signer { grid-area:signer; border-top:1px solid var(--line); margin-top:8px; padding-top:10px; font-size:13px; overflow-wrap:anywhere; }
.funding-card__signer .funding-card__caption:not(:first-child) { margin-top:8px; }
.funding-card.is-disabled .funding-card__main { color:var(--mute); cursor:not-allowed; }
.funding-card.is-disabled .funding-card__address-choice { color:var(--mute); cursor:not-allowed; }
.funding-card__reason { font-size:12px; color:var(--mute); }
.funding-card.is-fixed { grid-template-columns:minmax(0,1fr) minmax(0,28%); grid-template-areas:"main balance" "signer signer"; }
.funding-card.is-fixed .funding-card__main { cursor:default; }
/* A listed wallet (Your GEN linked wallets, task-20261103-101508): the fixed layout, not drawn as selected. */
.funding-card.is-listing { border-color:var(--line); box-shadow:none; }
.gen-input { min-width:0; margin-block:18px; }
.form > .gen-input { margin-block:0; } /* Grid forms already provide the shared field gap. */
.gen-input__control { display:flex; align-items:center; gap:8px; min-width:0; max-width:320px; min-height:48px; padding-inline:14px; border:1px solid var(--ink); border-radius:10px; }
.gen-input__control:has(input[aria-invalid="true"]) { border-color:var(--crit); }
.gen-input__control input { flex:1 1 auto; width:0; min-width:0; max-width:100%; height:46px; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:var(--ink); font:500 22px var(--font-m); outline:none; box-shadow:none; }
.gen-input__control input[type="number"] { appearance:textfield; }
.gen-input__control input::-webkit-inner-spin-button,
.gen-input__control input::-webkit-outer-spin-button { appearance:none; margin:0; }
.gen-input__control > span { color:var(--mute); font:500 13px var(--font-b); }
.gen-input__presets { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.gen-input__presets button { min-height:44px; padding:6px 14px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--ink); font:500 12px var(--font-b); cursor:pointer; }
.gen-input__presets button[aria-pressed="true"] { border-color:var(--ink); background:var(--fog); box-shadow:none; }
.gen-input__presets button:disabled,.gen-input__presets button[aria-disabled="true"] { color:var(--mute); opacity:.55; cursor:not-allowed; }
@media(max-width:560px) {
  .funding-card { grid-template-columns:18px minmax(0,1fr); grid-template-areas:"radio main" ". balance" "signer signer"; gap:8px; padding:12px; }
  .funding-card__balance { text-align:left; max-width:100%; }
  .funding-card.is-fixed { grid-template-columns:minmax(0,1fr); grid-template-areas:"main" "balance" "signer"; }
  .gen-input__control { max-width:none; }
}

/* Balance mode never changes the address track. Narrow cards put balances below the identity. */
@container (max-width:600px) {
  .funding-card { grid-template-columns:18px minmax(0,1fr); grid-template-areas:"radio main" ". balance" "signer signer"; }
  .funding-card__balance { text-align:left; }
  .funding-card.is-fixed { grid-template-columns:minmax(0,1fr); grid-template-areas:"main" "balance" "signer"; }
}

/* A previous quote never looks current while changed inputs are being checked. */
/* Shared Create/action summary: old fees remain an estimate, input-dependent totals do not. */
[data-funds-values][data-funds-stale] [data-order-payers] { display:none; }
.funds-inline { overflow-wrap:anywhere; }
/* The estimate qualifier belongs to its amount. Labels retain normal wrapping. */
.funds-fee-estimate { display:inline-flex; align-items:baseline; gap:.25em; white-space:nowrap; }

/* Keep the last network-fee estimate visible during edits; it never authorizes Continue.
   The input-dependent total and separate payer requirements wait for their matching quote. */
.funds-pending-total { display:none; }
:is([data-order-funds-values], [data-funds-values])[data-funds-stale] .funds-pending-total { display:inline; }
:is([data-order-funds-values], [data-funds-values])[data-funds-stale] .funds-quoted-total,
:is([data-order-funds-values], [data-funds-values])[data-funds-stale] [data-order-payers] { display:none; }

.funds-inline:empty { display:none; }

/* A shared amount field shows its own status while edited; action/summary status stays visible. */
.gen-input:not(:focus-within) + .funds-inline[data-funds-field] { display:none; }

/* A quoted funding error is distinct from the checked radio and keyboard focus. */
.funding-card[data-funding-error]:has(input:checked), .funding-card.is-fixed[data-funding-error] { border-color:var(--crit); box-shadow:inset 0 0 0 1px var(--crit); }
.funding-card__balance .feedback-cue { justify-content:flex-end; }
@container (max-width:600px) { .funding-card__balance .feedback-cue { justify-content:flex-start; } }

/* Both quote summaries use the same retry action and native hidden state. */
.funds-retry[hidden] { display:none; }

/* Stacked summary rows: one common renderer for entry facts and fee rows. */
.funding-action .setup-total .funding-summary-facts.kv { grid-template-columns:minmax(0,1fr); align-items:start; gap:6px; }
.funding-action .funding-summary-facts > :is([data-preview-rows],[data-funds-values],[data-sign-static-summary]):not([hidden]) { display:contents; }
.funding-action .setup-total .funding-summary-facts dt { padding:0; margin:10px 0 0; line-height:18px; white-space:normal; }
.funding-action .setup-total .funding-summary-facts > dt:first-child { margin-top:0; }
.funding-action .setup-total .funding-summary-facts > [data-sign-static-summary]:first-child > dt:first-child { margin-top:0; }
.funding-action .setup-total .funding-summary-facts.kv dd { margin:0; text-align:left; justify-content:flex-start; line-height:22px; }
.funding-action .funding-summary-facts .gen-balance > summary { line-height:inherit; }
.funding-action .funding-summary-facts .funds-fee-estimate { display:flex; align-items:baseline; gap:4px; }
.funding-action .funding-summary-facts > [data-withdrawal-empty] { margin:10px 0 0; }
.funding-action .setup-total .funding-summary-facts.kv [data-withdrawal-empty-text] { font-size:13.5px; line-height:1.6; }

.funding-action .funding-summary-facts .gen-balance { vertical-align:baseline; }
.funding-action .funding-summary-facts .funds-fee-estimate > .help { margin:0; line-height:inherit; }

.funding-action .funding-summary-facts [data-stake-source-group],
.funding-action .funding-summary-facts [data-stake-source-panel]:not([hidden]) { display:contents; }
.funding-action .setup-total .funding-summary-facts [data-stake-source-panel] > dt:first-of-type { margin-top:0; }
.funding-action .funding-summary-facts > [data-preview-rows][hidden] { display:none; }

/* The shared money overview gives one-line badges a full phone row. */
@media (max-width:640px) {
 .funding-stake-overview .vp-stats.vp-stats--summary { grid-template-columns:minmax(0,1fr); }
 .funding-stake-overview .vp-stat { border-left:0; }
}

/* Shared order summary keeps its payer labels while a quote is unavailable. */
:is([data-order-funds-values], [data-funds-values])[data-money-summary][data-funds-stale] [data-order-payers] { display:revert; }

/* Shared money frame heading, also used on legacy money pages. */
.vp-card-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:4px 10px; margin-bottom:12px; }
.vp-hint { font-size:12px; color:var(--mute); }
a.vp-hint { color:var(--ink); }
.funding-picker-select { max-width:100%; }

/* Neutral forms retain their binding without showing a fee check or signing action. */
[data-funds-active][hidden], [data-funds-idle][hidden] { display:none; }
