/*
 * css/app.css: the founder's money pages (owner: pay agent): /app dashboard, /links, /pay/:id checkout, /pro.
 * Lays out page sections only and reads tokens from css/tokens.css; primitives (buttons, inputs, chips, tables,
 * stepper, receipt, sheets, toasts, the gate) come from css/site.css (docs/SHELL.md). Class prefix: ap-.
 */

/* ------------------------------------------------------------------ shared bits */
.ap-page { position: relative; }
.ap-head { margin-bottom: 26px; }
.ap-head h1 { max-width: 22ch; }
.ap-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ap-root { min-height: 40vh; }
.ap-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.ap-h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.ap-key { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px -1px currentColor; }
.ap-amt { gap: 7px; }
.ap-amt .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ap-amt-sym { font-family: var(--font); font-size: 0.82em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ap-btn-wide { min-width: 160px; }
.ap-txlink { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--ice); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.ap-txlink .icon { width: 14px; height: 14px; }
.ap-section { margin-top: 28px; }
.ap-section .section-title { margin-bottom: 12px; }
.ap-empty-card { padding: 8px; }
.ap-table-card { padding: 6px 8px; overflow: hidden; }
.ap-table-card .table th:first-child, .ap-table-card .table td:first-child { padding-left: 16px; }
.ap-table-card .table th:last-child, .ap-table-card .table td:last-child { padding-right: 16px; }
.ap-table-card .table tbody tr:last-child td { border-bottom: 0; }
.ap-more { margin: 10px auto 0; display: flex; }
.ap-form { --gap: 16px; }
/* a quiet notice: an icon and a sentence (js/pages/_shared.js note()) */
.ap-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--glass-2); color: var(--body); font-size: 14px; line-height: 1.45; }
.ap-note .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ice); }
.ap-note-t { margin: 0; min-width: 0; }
.ap-note.is-warn { background: var(--warn-tint); color: var(--ink); }
.ap-note.is-warn .icon { color: var(--warn); }
.ap-note.is-ok { background: var(--ok-tint); color: var(--ink); }
.ap-note.is-ok .icon { color: var(--ok); }
.ap-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-quick .chip { min-height: 36px; height: auto; padding: 0 14px; font-family: var(--mono); }
.ap-gate { margin-top: 2vh; }
.ap-gate-wait { max-width: 460px; margin: 6vh auto 0; }

/* split chips (dot + label + amount) */
.ap-split-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-dest { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--pill); background: var(--glass); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ap-dest .ap-key { width: 8px; height: 8px; }
.ap-dest b { color: var(--ink); font-weight: 500; font-size: 12.5px; }

/* ------------------------------------------------------------------ dashboard */
.ap-kpis { margin-bottom: 18px; }
@media (max-width: 760px) { .ap-kpis > .kpi:first-child { grid-column: 1 / -1; } }
.ap-kpis .kpi-label .icon { width: 15px; height: 15px; color: var(--ice); }
.ap-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ap-col-main, .ap-col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ap-col-main .ap-section { margin-top: 10px; }
.ap-chart-head { align-items: flex-start; }
.ap-range > button { min-height: 34px; padding: 0 14px; font-family: var(--mono); font-size: 13px; }
.ap-chart { margin: 4px 0 12px; min-height: 190px; }
.ap-legend .ap-key { width: 9px; height: 9px; border-radius: 3px; box-shadow: none; }

.ap-rule .card-head { margin-bottom: 10px; }
.ap-rule-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.ap-rule-donut { display: grid; place-items: center; }
.ap-rule-sliders { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-slider .field-label { margin: 0; }
.ap-slider-l { display: inline-flex; align-items: center; gap: 8px; }
.ap-slider .range { height: 36px; }
.ap-rule-wallet { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.ap-rule-wallet .ap-dest { background: transparent; padding: 0; font-size: 13.5px; color: var(--body); font-weight: 600; }
.ap-rule-wallet .ap-dest .ap-key { width: 10px; height: 10px; }
.ap-rule-wallet b { color: var(--ink); font-weight: 500; }
.ap-rule-example { margin: 16px 0 6px; padding: 12px 14px; border-radius: 14px; background: rgba(6, 8, 40, 0.5); color: var(--body); font-size: 13.5px; line-height: 1.5; }
.ap-rule-hint { margin: 4px 0 0; }
.ap-rule-team { margin: 8px 0 2px; line-height: 1.45; }
.ap-rule-team a, .ap-pro-paused a { color: var(--ice); font-weight: 600; white-space: nowrap; }
.ap-payout-toggle { margin-top: 6px; font-size: 14px; }
.ap-payout-field { margin-top: 2px; }
.ap-rule .stepper { margin-top: 12px; }
.ap-rule-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 14px; }

.ap-side { display: flex; flex-direction: column; }
.ap-side .divider { margin: 18px 0; }
.ap-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ap-side-head h3 { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; font-weight: 600; color: var(--body); letter-spacing: -0.01em; }
.ap-side-head h3 .icon { width: 16px; height: 16px; color: var(--ice); }
.ap-side-head .link-quiet { font-size: 13.5px; }
.ap-big { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; }
.ap-big .asset-amount { font-weight: 500; letter-spacing: -0.03em; }
.ap-big .ap-amt-sym { font-size: 14px; }
.ap-side-sub { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.ap-side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ap-basket { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.ap-basket-item { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 5px; border-radius: var(--pill); background: var(--glass-2); font-size: 13px; }
.ap-basket-item b { color: var(--ink); font-weight: 600; }
.ap-basket-item .num { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.ap-limit { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--body); }

/* payments list */
.ap-plist { list-style: none; margin: 0; padding: 0; }
.ap-plist-card { padding: 4px 22px; }
.ap-prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid rgba(170, 182, 255, 0.08); }
.ap-prow:last-child { border-bottom: 0; }
.ap-prow-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ap-prow-title { color: var(--ink); font-weight: 600; }
.ap-pay-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12.5px; }
.ap-memo { display: block; max-width: 48ch; color: var(--body); font-size: 13px; font-style: italic; overflow-wrap: anywhere; }
.ap-paidwith { display: inline-flex; align-items: center; gap: 5px; }
.ap-paidwith .asset-chip { font-size: 12px; color: var(--body); }
.ap-prow-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.ap-prow-amt .asset-amount { font-size: 16px; }
.ap-prow-tx { min-height: 32px; font-size: 12.5px; }
.ap-prow .ap-split-chips { grid-column: 1 / -1; }
.ap-dest.is-fee { background: transparent; padding-left: 4px; }

@media (max-width: 1020px) {
  .ap-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-col-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 760px) {
  .ap-head { margin-bottom: 18px; }
  .ap-head-actions { width: 100%; }
  .ap-head-actions > .btn { flex: 1 1 0; }
  .ap-col-side { display: flex; }
  .ap-chart-head { flex-wrap: wrap; }
  .ap-rule-top { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .ap-rule-donut { justify-self: center; }
  .ap-rule-actions > .btn { flex: 1 1 auto; }
  /* the table card becomes a plain list of row cards (no box inside a box) */
  .ap-table-card { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; overflow: visible; }
  .ap-table-card .table td:first-child, .ap-table-card .table td:last-child { padding-left: 0; padding-right: 0; }
  .ap-table-card .table.is-cards td.cell-main { padding-top: 2px; }
  .ap-plist-card { padding: 2px 16px; }
  .ap-prow { padding: 14px 0; }
}

/* ------------------------------------------------------------------ links */
.ap-limit-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px 40px; margin: 0 0 22px; padding: 16px 22px; border-radius: var(--radius-l); background: var(--grad-soft); border: 1px solid var(--line); }
.ap-strip-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-strip-meter { flex: 1 1 260px; max-width: 460px; }
.ap-strip-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.ap-strip-v { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 500; }
.ap-strip-bar { display: flex; flex-direction: column; gap: 8px; }
.ap-strip-bar .link-quiet { font-size: 13.5px; align-self: flex-start; }
.ap-links { margin-top: 0; }
.ap-tabs { margin-bottom: 14px; }
.ap-link-what { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ap-link-ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; color: var(--ice); background: radial-gradient(circle at 35% 30%, rgba(109, 123, 255, 0.4), rgba(17, 27, 196, 0.18)); }
.ap-link-ic .icon { width: 17px; height: 17px; }
.ap-link-ic.is-invoice { color: var(--dest-credits); background: radial-gradient(circle at 35% 30%, rgba(67, 223, 174, 0.3), rgba(67, 223, 174, 0.06)); }
.ap-link-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-link-text strong { color: var(--ink); font-weight: 600; max-width: 30ch; }
.ap-link-sub { color: var(--muted); font-size: 13px; max-width: 36ch; }
.ap-link-row.is-paused .ap-link-text strong, .ap-link-row.is-expired .ap-link-text strong { color: var(--muted); }
.ap-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.ap-row-actions-td { width: 1%; }
.ap-link-table td.num { white-space: nowrap; }
@media (max-width: 1080px) { .ap-hide-sm { display: none; } }
@media (max-width: 760px) {
  .ap-limit-strip { padding: 14px 16px; gap: 14px 24px; border-radius: 20px; }
  .ap-strip-meter { max-width: none; }
  .ap-link-text strong, .ap-link-sub { max-width: 100%; }
  .ap-row-actions-td { width: 100% !important; padding-top: 10px !important; }
  .ap-row-actions { justify-content: flex-start; gap: 8px; width: 100%; }
  .ap-row-actions .btn-sm { --btn-h: 44px; }
  .ap-row-actions > .btn:first-child { flex: 1 1 auto; }
  .ap-hide-sm { display: inline; }
}

.ap-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 28px; align-items: start; }
.ap-settings .field { margin-bottom: 14px; }
.ap-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.ap-card-actions .link-quiet { font-size: 13.5px; }
.ap-settings .stepper { margin-top: 6px; }
.ap-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-swatch { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sw, var(--brand-hi)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 16px -4px var(--sw, var(--brand-hi)); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ap-swatch.is-none { background: conic-gradient(from 210deg, #3442ff, #111bc4, #6d7bff, #3442ff); }
.ap-swatch:hover:not(:disabled) { transform: scale(1.08); }
.ap-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff, 0 0 18px -2px var(--sw, var(--brand-hi)); }
.ap-swatch:disabled { cursor: not-allowed; opacity: 0.45; }
.ap-brand-prev { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: rgba(6, 8, 40, 0.5); }
.ap-brand-bar { display: block; height: 6px; border-radius: var(--pill); background: linear-gradient(90deg, var(--accent, var(--brand-hi)), color-mix(in srgb, var(--accent, var(--brand-hi)) 40%, transparent)); box-shadow: 0 0 14px -2px var(--accent, var(--brand-hi)); }
.ap-team-locked { margin: 0 0 16px; font-size: 14.5px; }
.ap-team-rows { display: flex; flex-direction: column; gap: 10px; }
.ap-team-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px 44px; gap: 8px; align-items: center; }
.ap-team-pctwrap.has-affix > .input { padding-right: 34px; }
.ap-team-pctwrap .input-affix { right: 14px; }
.ap-team-empty { margin: 0; font-size: 14px; }
.ap-team-foot { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.ap-team-foot .num { font-family: var(--mono); }
/* the team stored on chain while Pro is off: paused, listed, clearable */
.ap-team { scroll-margin-top: calc(var(--nav-h) + 16px); }
.ap-team-paused { margin-bottom: 6px; }
.ap-team-stored { list-style: none; margin: 0; padding: 0; }
.ap-team-stored li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid rgba(170, 182, 255, 0.08); }
.ap-team-stored li:last-child { border-bottom: 0; }
.ap-team-addr { font-size: 13px; line-height: 1.45; color: var(--body); }
.ap-team-stored b { color: var(--ink); font-size: 14px; font-weight: 600; }
.ap-team-sum { margin: 2px 0 0; }
@media (max-width: 860px) { .ap-settings { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .ap-team-row { grid-template-columns: minmax(0, 1fr) 84px 44px; } }

/* sheets: QR, composer, created, Pro pitch */
.ap-qr-body, .ap-created { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 6px 0 4px; }
.ap-qr { --qr: 216px; }
.ap-created .ap-qr { --qr: 196px; }
.ap-qr-amount { margin: 4px 0 0; font-size: 22px; color: var(--ink); }
.ap-created h3 { margin: 8px 0 0; font-size: 22px; font-weight: 600; }
.ap-created p { margin: 0; }
.ap-url { display: flex; align-items: center; width: 100%; max-width: 380px; min-height: 44px; padding: 0 16px; border-radius: var(--pill); background: rgba(6, 8, 40, 0.6); border: 1px solid var(--line); color: var(--ice); font-size: 14px; }
.ap-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.sheet.ap-sheet-wide { max-width: 920px; }
.ap-composer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
.ap-composer-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 22px; background: radial-gradient(120% 80% at 50% 0%, rgba(52, 66, 255, 0.22), transparent 70%), rgba(3, 4, 26, 0.55); }
.ap-composer-preview .field-hint { text-align: center; }
.ap-composer-submit { padding-top: 4px; }
@media (max-width: 760px) {
  .ap-composer { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ap-composer-preview { position: static; order: -1; gap: 8px; padding: 12px; }
  .ap-composer-preview > .field-hint, .ap-composer-preview .ap-mini-seg, .ap-composer-preview .ap-mini-about, .ap-composer-preview .ap-mini-powered { display: none; }
  .ap-composer-preview .ap-mini { padding: 14px; gap: 8px; }
  .ap-composer-preview .ap-mini-amount { font-size: 20px; }
  .ap-composer-preview .ap-mini-pay { min-height: 40px; font-size: 14px; }
  .ap-composer-submit { position: sticky; bottom: calc(-20px - var(--safe-b)); margin: 0 -20px calc(-20px - var(--safe-b)); padding: 12px 20px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(7, 10, 46, 0), #070a2e 30%); z-index: 1; }
}

/* the mini checkout (composer preview) */
.ap-mini { --accent: var(--brand-hi); display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)); border: 1px solid var(--line); min-width: 0; }
.ap-mini-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); font-weight: 600; font-size: 14px; }
/* text on the founder accent wears --accent-ink (white or the dark ink, whichever reaches 4.5:1: accentVars() in
   js/pages/_shared.js); --accent-2 is the far stop of the accent gradients (it moves away from the ink) */
.ap-brand-disc { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: var(--accent-ink, #fff); font-weight: 700; font-size: 14px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent, var(--brand-hi)) 86%, #fff), var(--accent, var(--brand-hi)) 55%, color-mix(in srgb, var(--accent, var(--brand-hi)) 55%, #000)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--brand-hi)) 18%, transparent), 0 0 22px -4px var(--accent, var(--brand-hi)); }
.ap-mini-title { color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ap-mini-sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.ap-mini-about { margin: 0; color: var(--body); font-size: 13.5px; overflow-wrap: anywhere; }
.ap-mini-amount { font-size: 24px; color: var(--ink); }
.ap-mini-open { color: var(--muted); font-size: 15px; }
.ap-mini-seg { pointer-events: none; }
.ap-mini-seg > [aria-checked="true"] { color: var(--accent-ink, #fff); background: linear-gradient(135deg, var(--accent), var(--accent-2, color-mix(in srgb, var(--accent) 55%, #000))); }
.ap-mini-seg > button { min-height: 34px; font-size: 13px; }
.ap-mini-pay { pointer-events: none; min-height: 46px; color: var(--accent-ink, #fff); background: linear-gradient(135deg, var(--accent), var(--accent-2, color-mix(in srgb, var(--accent) 55%, #000))); }
.ap-mini-powered { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 11.5px; }
.ap-mini-powered svg { width: auto; height: 10px; }

.ap-pro-sheet { --gap: 14px; }
.ap-pro-sheet p { margin: 0; }
.ap-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-perks li { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 15px; }
.ap-perk-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--ice); background: rgba(52, 66, 255, 0.2); }
.ap-perk-ic .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ checkout /pay/:id */
.ap-page-pay { padding-top: calc(var(--nav-h) + 20px); }
.ap-pay-wrap { max-width: 560px; }
.ap-pay { --accent: var(--brand-hi); position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.ap-pay::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: -60px; height: 360px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent); pointer-events: none; }
.ap-pay-card { position: relative; display: flex; flex-direction: column; gap: 20px; padding: 26px; }
.ap-pay-root > .ap-pay-card { gap: 12px; }
.ap-pay-brand { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.ap-pay-brand .ap-brand-disc { width: 44px; height: 44px; font-size: 18px; }
.ap-pay-brand-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ap-pay-brand-t strong { color: var(--ink); font-size: 16px; font-weight: 600; }
/* the sub line sits on the card glow (a brighter ground): --body, where --muted measured 4.3:1 */
.ap-pay-brand-t span { color: var(--body); font-size: 13px; }
.ap-pay-chain { gap: 7px; }
.ap-pay-chain .dot { width: 6px; height: 6px; }
.ap-pay-copy { display: flex; flex-direction: column; gap: 8px; }
.ap-pay-title { margin: 0; font-size: clamp(24px, 4.4vw, 32px); font-weight: 600; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.ap-pay-about { margin: 0; color: var(--body); font-size: 15.5px; white-space: pre-line; overflow-wrap: anywhere; }
.ap-pay-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 6px 0 0; font-size: 14px; }
.ap-pay-facts dt { color: var(--muted); }
.ap-pay-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ap-pay-amount { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 20px; background: rgba(3, 4, 26, 0.5); }
.ap-pay-amount-l { color: var(--muted); font-size: 13px; font-weight: 600; }
.ap-pay-big { font-size: clamp(32px, 8vw, 44px); font-weight: 500; letter-spacing: -0.035em; gap: 10px; flex-wrap: wrap; white-space: normal; }
.ap-pay-big .ap-amt-sym { font-size: 16px; }
.ap-pay-amount-in .input-group.has-affix > .input { padding-right: 120px; }
.ap-pay-seg > button { min-height: 46px; font-size: 15px; }
.ap-pay-seg > button img, .ap-pay-seg > button .logo-disc { border-radius: 50%; }
.ap-pay-quote { margin: 2px 0 0; color: var(--body); font-size: 13.5px; line-height: 1.5; }
.ap-pay-quote b { color: var(--ink); font-weight: 600; }
.ap-quote-skel { display: inline-block; width: 220px; max-width: 100%; height: 12px; vertical-align: middle; }
.ap-pay-bal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--muted); font-size: 13px; }
.ap-pay-low { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; color: var(--warn); }
.ap-pay-low .icon { width: 14px; height: 14px; }
.ap-pay-on { display: none; }
.ap-pay-bal .asset-amount { font-size: 13px; }
.ap-pay-steps { padding: 4px 2px; }
.ap-pay-who { display: flex; align-items: center; gap: 8px; margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.ap-pay-who .icon { width: 15px; height: 15px; color: var(--ok); }
.ap-pay-who .mono { color: var(--ink); }
.ap-pay-bar { padding-top: 2px; }
.ap-pay-bar .ap-pay-btn { flex: 1 1 auto; min-width: 0; }
/* the ETH path: "Pay with ETH" over the USDG total the page understood; the bar repeats it with the ETH figure */
.ap-pay-btn-t { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ap-pay-btn-t small { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 500; letter-spacing: 0; opacity: 0.9; }
.ap-pay-bar-eth { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ap-pay-card.is-branded .btn-primary, .ap-pay-done .btn-primary { color: var(--accent-ink, #fff); background: linear-gradient(135deg, var(--accent), var(--accent-2, color-mix(in srgb, var(--accent) 55%, #000))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 28px -8px var(--accent); }
.ap-pay-card.is-branded .seg > [aria-checked="true"] { color: var(--accent-ink, #fff); background: linear-gradient(135deg, var(--accent), var(--accent-2, color-mix(in srgb, var(--accent) 55%, #000))); }
.ap-pay-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--glass-2); color: var(--body); font-size: 14.5px; }
.ap-pay-note .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ice); }
.ap-pay-note.is-paid { background: var(--ok-tint); color: var(--ink); }
.ap-pay-note.is-paid .icon { color: var(--ok); }
.ap-pay-missing { padding: 12px; }
.ap-powered { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; min-height: 44px; padding: 0 14px; color: var(--faint); font-size: 13px; font-weight: 500; }
.ap-powered svg { height: 11px; width: auto; color: var(--muted); }
.ap-powered:hover { color: var(--ice); }
.ap-pay-done .receipt { width: 100%; }
@media (min-width: 761px) {
  .ap-pay-bar { display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
  .ap-pay-bar .ap-pay-btn { flex: 0 1 auto; min-width: 220px; }
}
@media (max-width: 760px) {
  .ap-page-pay { padding-top: calc(var(--nav-h) + 12px); }
  /* backdrop-filter would make the card the containing block of the fixed pay bar: drop it on phones */
  .ap-pay-card { padding: 20px 18px; gap: 18px; -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, rgba(20, 26, 92, 0.55), rgba(8, 11, 48, 0.72)); }
  .ap-pay-brand { grid-template-columns: auto minmax(0, 1fr); }
  .ap-pay-chain { display: none; }
  .ap-pay-on { display: inline; }
  .ap-pay-bar .action-bar-info strong { font-size: 16px; }
  .ap-pay-bar .ap-pay-btn { flex: 1 1 60%; }
}
@media (max-width: 360px) {
  .ap-pay-card { padding: 18px 14px; }
  .ap-pay-amount { padding: 14px; }
  .ap-pay-bar .action-bar-info { display: none; }
}

/* ------------------------------------------------------------------ Pro */
.ap-pro-hero { position: relative; text-align: center; max-width: 760px; margin: 8px auto 30px; }
.ap-pro-hero::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: -80px; height: 380px; background: radial-gradient(closest-side, rgba(52, 66, 255, 0.35), transparent); pointer-events: none; }
.ap-pro-hero h1 { margin: 10px 0 12px; }
.ap-pro-hero .lead { margin: 0 auto; }
.ap-pro-status { max-width: 980px; margin: 0 auto 22px; }
.ap-pro-status-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-l); background: var(--glass); border: 1px solid var(--line); }
.ap-pro-status-row .grow { display: flex; flex-direction: column; gap: 2px; }
.ap-pro-status-row strong { color: var(--ink); font-size: 15px; }
.ap-pro-status-row span { color: var(--muted); font-size: 13.5px; }
.ap-pro-status-row .ap-pro-paused { margin-top: 4px; color: var(--body); line-height: 1.45; }
.ap-pro-status-row.is-pro { background: var(--grad-soft); border-color: rgba(109, 123, 255, 0.35); }
.ap-pro-status-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--ice); background: rgba(52, 66, 255, 0.2); }
.ap-pro-status-ic .icon { width: 18px; height: 18px; }
.ap-pro-status-row.is-pro .ap-pro-status-ic { color: #fff; background: var(--grad); box-shadow: 0 0 20px -2px rgba(52, 66, 255, 0.8); }
.ap-pro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; align-items: start; }
.ap-compare .ap-h2 { margin: 6px 0 14px; }
.ap-compare-grid { display: flex; flex-direction: column; }
.ap-compare-head, .ap-compare-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 110px; align-items: center; gap: 10px; }
.ap-compare-head { padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.ap-compare-head > span { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.ap-compare-head > span.ap-compare-feat { align-items: flex-start; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ap-compare-head b { color: var(--ink); font-size: 16px; }
.ap-compare-head small { color: var(--muted); font-size: 12px; }
.ap-compare-head .is-pro b { background: linear-gradient(90deg, #fff, var(--ice)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-compare-row { min-height: 52px; padding: 6px 0; border-bottom: 1px solid rgba(170, 182, 255, 0.07); }
.ap-compare-row > span:not(.ap-compare-feat) { display: flex; justify-content: center; text-align: center; }
.ap-compare-row > .is-pro { position: relative; }
.ap-compare-feat { display: flex; align-items: center; gap: 12px; color: var(--body); font-size: 14.5px; min-width: 0; }
.ap-compare-feat .icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
.ap-yes { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--ok); background: var(--ok-tint); }
.ap-yes .icon { width: 15px; height: 15px; }
.ap-no { display: grid; place-items: center; width: 26px; height: 26px; color: var(--faint); }
.ap-no .icon { width: 15px; height: 15px; }
.ap-val { color: var(--ink); font-family: var(--mono); font-size: 13.5px; }
.ap-compare-row > .is-pro .ap-val { color: #fff; font-weight: 600; }
.ap-pro-buy { display: flex; flex-direction: column; gap: 16px; }
.ap-pro-buy .card-head { margin-bottom: 0; }
.ap-months > button { font-family: var(--mono); font-size: 13.5px; padding: 0 8px; }
.ap-pro-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: rgba(3, 4, 26, 0.5); }
.ap-pro-total-l { color: var(--muted); font-size: 14px; font-weight: 600; }
.ap-pro-total strong { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.ap-pro-note { margin: -6px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-breakeven { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.ap-breakeven .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ice); }
.ap-faq { max-width: 760px; margin: 56px auto 0; }
.ap-faq .ap-h2 { margin-bottom: 10px; }
.ap-faq-item { border-bottom: 1px solid var(--line); }
.ap-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; cursor: pointer; list-style: none; color: var(--ink); font-size: 16px; font-weight: 600; }
.ap-faq-item summary::-webkit-details-marker { display: none; }
.ap-faq-item summary .icon { width: 18px; height: 18px; color: var(--muted); flex: none; transition: transform var(--dur) var(--ease); }
.ap-faq-item[open] summary .icon { transform: rotate(180deg); }
.ap-faq-item p { margin: 0 0 18px; color: var(--body); font-size: 15px; max-width: 64ch; }
@media (max-width: 900px) {
  .ap-pro-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-pro-buy { position: static; }
}
@media (max-width: 760px) {
  .ap-pro-hero { margin-bottom: 22px; }
  .ap-pro-status-row { flex-wrap: wrap; padding: 14px 16px; }
  .ap-pro-status-row .grow { flex: 1 1 180px; }
  .ap-compare-head, .ap-compare-row { grid-template-columns: minmax(0, 1fr) 58px 82px; gap: 6px; }
  .ap-compare-feat { gap: 10px; font-size: 14px; }
  .ap-compare-head small { display: none; }
  .ap-val { font-size: 12.5px; }
}
@media (max-width: 360px) {
  .ap-compare-feat .icon { display: none; }
  .ap-compare-head, .ap-compare-row { grid-template-columns: minmax(0, 1fr) 54px 66px; }
}

/* ------------------------------------------------------------------ print: the checkout receipt */
@media print {
  .ap-page-pay { padding: 0 !important; }
  .ap-pay::before, .ap-powered, .receipt-actions { display: none !important; }
  .ap-pay-done .receipt { border: 1px solid #bbb; color: #000; background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ap-pay-done .receipt * { color: #000 !important; }
  .ap-pay-done .receipt a { text-decoration: none; }
  .ap-pay-done .receipt-badge { box-shadow: none; background: #e9f9f2 !important; }
  .ap-pay-done .receipt-badge .icon { color: #0c7a55 !important; }
}

/* .card-glow paints its glow 10% past the card sides; keep it inside so full-width cards never scroll sideways */
.ap-rule.card-glow, .ap-pro-buy.card-glow, .ap-pay-card.card-glow { overflow: clip; }

/* phones: every control at least 44 px tall */
@media (max-width: 760px) {
  .ap-side-actions .btn-sm, .ap-card-actions .btn, .ap-team-foot .btn-sm, .ap-more { --btn-h: 44px; }
  .ap-range > button, .ap-quick .chip { min-height: 44px; }
  .ap-swatches { gap: 12px; }
  .ap-swatch { width: 44px; height: 44px; }
  .ap-txlink { min-height: 44px; }
}
