/* An invoice on paper and a payment on a phone, kept separate and readable. */
.ppc-panel--payments:focus { outline: none; }
.ps-layout.ps-layout--invoices { grid-template-columns: minmax(0, .85fr) minmax(0, 1.55fr); gap: clamp(32px, 4vw, 64px); }
.ps-layout--invoices .ppc-panel__headline { max-width: 17ch; }
.invoice-showcase { --invoice-ink: #19364b; --invoice-muted: #71808a; --invoice-line: #e3e8eb; position: relative; display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); align-items: center; gap: 30px; width: 100%; max-width: 790px; margin-inline: auto; color: var(--invoice-ink); font-variant-numeric: tabular-nums; }
.invoice-document { position: relative; isolation: isolate; padding-block: 18px; }
.invoice-document::before { content: ''; position: absolute; z-index: -1; inset: 24px 3px 12px 3px; border: 1px solid #e0e1da; border-radius: 3px; background: #f8f8f4; transform: rotate(-3deg); box-shadow: 0 18px 30px -18px rgb(29 49 60 / 18%); }
.invoice-paper { position: relative; padding: 29px 28px 22px; border: 1px solid #d9e0e3; border-radius: 3px; background: #fff; box-shadow: 0 20px 44px -26px rgb(27 45 55 / 26%); }
.invoice-paper__masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 22px; border-bottom: 2px solid #24475b; font-size: 12px; font-weight: 600; color: #526b7c; }
.invoice-paper__masthead i { font-size: 19px; color: #b9823a; }
.invoice-paper__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 22px; }
.invoice-showcase .invoice-paper__heading h4 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: .06em; }
.invoice-paper__heading > span { font-size: 11px; color: var(--invoice-muted); }
.invoice-paper__customer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 23px; }
.invoice-paper__customer > div { display: grid; gap: 5px; }
.invoice-paper__customer span { font-size: 10px; color: var(--invoice-muted); }
.invoice-paper__customer strong { font-size: 14px; font-weight: 500; }
.invoice-line-items { width: 100%; margin-top: 29px; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.invoice-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.invoice-line-items th { text-align: left; font-weight: 400; }
.invoice-line-items :is(th, td):last-child { text-align: right; white-space: nowrap; }
.invoice-line-items thead th { padding: 0 0 10px; border-bottom: 1px solid var(--invoice-line); color: var(--invoice-muted); font-size: 10px; }
.invoice-line-items tbody th { padding: 12px 10px 12px 0; color: #5a6d7a; }
.invoice-line-items tbody td { padding: 12px 0; }
.invoice-line-items tbody tr { border-bottom: 1px solid #eff1f2; }
.invoice-line-items tfoot :is(th, td) { padding-top: 19px; }
.invoice-line-items tfoot th { font-size: 13px; font-weight: 600; }
.invoice-line-items tfoot td { font-size: 28px; font-weight: 600; letter-spacing: -.04em; }
.invoice-paper__closing { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 25px; min-height: 32px; }
.invoice-paper__closing > span { display: flex; align-items: center; gap: 7px; color: var(--invoice-muted); font-size: 10px; }
.invoice-paid-stamp { padding: 3px 12px; border: 2px solid #438268; border-radius: 3px; font-size: 17px; line-height: 1.3; letter-spacing: .14em; color: #438268; transform: rotate(-7deg); font-weight: 600; }
.invoice-paper__thanks { margin-top: 20px; color: #8b969c; font-size: 9px; }
.invoice-payment { min-width: 0; padding-top: 30px; }
.invoice-phone { position: relative; border: 6px solid #1c2f3e; border-radius: 35px; background: #fff; box-shadow: 0 0 0 1px #85929a, 0 20px 35px -18px rgb(24 42 55 / 30%); padding: 11px 18px 17px; }
.invoice-phone__hardware { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 17px; font-family: Arial, sans-serif; font-size: 9px; font-weight: 600; color: #233b4a; }
.invoice-phone__hardware > span:last-child { display: flex; gap: 4px; }
.invoice-phone__island { position: absolute; width: 65px; height: 17px; top: 0; left: 50%; transform: translateX(-50%); border-radius: 14px; background: #1c2f3e; }
.invoice-phone__brand { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 27px 0 26px; color: #68808e; font-size: 10px; }
.invoice-phone__brand > i { font-size: 8px; }
.invoice-phone__brand-pro { font-weight: inherit; color: #25445a; }
.invoice-payment__success { display: grid; justify-items: center; gap: 16px; text-align: center; }
.invoice-payment__check { display: grid; place-items: center; width: 56px; height: 56px; border: 7px solid #edf6f0; border-radius: 50%; background: #2c7958; color: #fff; font-size: 20px; box-sizing: content-box; }
.invoice-showcase .invoice-payment__success h4 { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0; letter-spacing: -.025em; }
.invoice-showcase .invoice-payment__success p { margin: 5px 0 0; font-size: 11px; color: var(--invoice-muted); }
.invoice-payment__amount { display: grid; gap: 5px; margin-top: 24px; text-align: center; }
.invoice-payment__amount > strong { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.04em; }
.invoice-payment__amount > span { font-size: 9px; color: var(--invoice-muted); }
.invoice-payment__details { display: grid; gap: 13px; padding-top: 18px; margin-top: 23px; border-top: 1px solid var(--invoice-line); font-size: 11px; }
.invoice-payment__details > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.invoice-payment__details span { color: var(--invoice-muted); }
.invoice-payment__details strong { font-weight: 500; white-space: nowrap; }
.invoice-payment__details i { margin-right: 3px; }
.invoice-payment__status { color: #287051; }
.invoice-payment__receipt { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; padding: 11px 0; border-radius: 5px; background: #f4f7f6; font-size: 9px; color: #6a8074; }
.invoice-phone__home { width: 76px; height: 4px; margin: 21px auto 0; border-radius: 9px; background: #1c2f3e; }
@media (min-width: 1025px) and (max-height: 800px) {
    .ps-layout.ps-layout--invoices { padding-block: 12px; }
    .invoice-payment { padding-top: 0; }
    .invoice-paper { padding: 23px 24px 18px; }
    .invoice-paper__masthead { padding-bottom: 17px; }
    .invoice-paper__heading { margin-top: 18px; }
    .invoice-paper__customer { margin-top: 17px; }
    .invoice-line-items { margin-top: 20px; }
    .invoice-line-items tbody :is(th, td) { padding-block: 10px; }
    .invoice-paper__closing { margin-top: 17px; }
    .invoice-paper__thanks { margin-top: 15px; }
    .invoice-phone { padding-inline: 15px; }
    .invoice-phone__brand { margin-block: 21px; }
    .invoice-payment__success { gap: 11px; }
    .invoice-payment__amount { margin-top: 20px; }
    .invoice-payment__details { margin-top: 18px; padding-top: 15px; }
    .invoice-payment__receipt { margin-top: 16px; }
    .invoice-phone__home { margin-top: 17px; }
}
@media (max-width: 1024px) {
    .ppc-panel--payments .ppc-mobile { max-width: 730px; padding-block: 16px; gap: 20px; }
    .ppc-panel--payments .ppc-mobile__points { display: none; }
    .invoice-showcase { gap: 24px; max-width: 690px; }
    .invoice-document { padding-block: 6px; }
    .invoice-paper { padding: 24px 23px 18px; }
    .invoice-paper__masthead { padding-bottom: 17px; font-size: 14px; }
    .invoice-paper__heading { margin-top: 17px; }
    .invoice-paper__heading > span { font-size: 13px; }
    .invoice-paper__customer { margin-top: 18px; }
    .invoice-paper__customer span { font-size: 13px; }
    .invoice-paper__customer strong { font-size: 16px; line-height: 1.4; }
    .invoice-line-items { margin-top: 20px; font-size: 14px; line-height: 1.5; }
    .invoice-line-items thead th { font-size: 13px; }
    .invoice-line-items tbody :is(th, td) { padding-block: 10px; }
    .invoice-line-items tfoot th { font-size: 16px; }
    .invoice-line-items tfoot td { font-size: 30px; }
    .invoice-paper__closing { margin-top: 18px; }
    .invoice-paper__closing > span { font-size: 13px; }
    .invoice-paper__thanks { margin-top: 15px; font-size: 13px; }
    .invoice-payment { padding-top: 0; }
    .invoice-phone__brand { margin-block: 19px; font-size: 13px; }
    .invoice-payment__success { gap: 12px; }
    .invoice-showcase .invoice-payment__success h4 { font-size: 18px; }
    .invoice-showcase .invoice-payment__success p { font-size: 14px; line-height: 1.4; }
    .invoice-payment__amount { margin-top: 18px; }
    .invoice-payment__amount > span { font-size: 13px; line-height: 1.4; }
    .invoice-payment__details { margin-top: 18px; padding-top: 15px; font-size: 14px; line-height: 1.4; }
    .invoice-payment__details > div { align-items: baseline; }
    .invoice-payment__details span { font-size: 13px; }
    .invoice-payment__details strong { white-space: normal; text-align: right; }
    .invoice-payment__receipt { margin-top: 17px; font-size: 13px; line-height: 1.4; }
    .invoice-phone__home { margin-top: 16px; }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .invoice-payment__details > div { display: grid; justify-items: start; gap: 4px; }
    .invoice-payment__details strong { display: flex; align-items: center; gap: 5px; text-align: left; white-space: nowrap; }
    .invoice-payment__details i { margin: 0; }
}
@media (max-width: 600px) {
    .ppc-panel--payments .ppc-mobile { max-width: 440px; padding-block: 18px; gap: 20px; }
    .invoice-showcase { display: grid; grid-template-columns: 1fr; gap: 16px; }
    .invoice-document { padding: 0; }
    .invoice-document::before { inset: 5px 8px -5px; transform: rotate(-1.5deg); }
    .invoice-paper { padding: 18px; }
    .invoice-paper__masthead { padding-bottom: 12px; }
    .invoice-paper__masthead i { font-size: 18px; }
    .invoice-paper__heading { margin-top: 14px; }
    .invoice-showcase .invoice-paper__heading h4 { font-size: 28px; }
    .invoice-paper__customer { margin-top: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .invoice-paper__customer > div { gap: 4px; }
    .invoice-paper__customer > div:last-child { text-align: right; }
    .invoice-paper__customer strong { font-size: 14px; }
    .invoice-line-items { margin-top: 16px; }
    .invoice-line-items thead { display: none; }
    .invoice-line-items tbody :is(th, td) { padding-block: 9px; }
    .invoice-line-items tfoot :is(th, td) { padding-top: 15px; }
    .invoice-paper__closing { margin-top: 14px; min-height: 30px; }
    .invoice-paid-stamp { margin-inline: 2px; font-size: 16px; padding: 2px 10px; transform: rotate(-4deg); }
    .invoice-paper__thanks { display: none; }
    .invoice-payment { padding: 0; }
    .invoice-phone { padding: 16px 18px; border: 1px solid #d7e6dd; border-radius: 10px; box-shadow: 0 8px 18px -14px rgb(22 57 43 / 20%); background: #f2f8f4; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
    .invoice-phone__hardware, .invoice-phone__brand, .invoice-phone__home, .invoice-payment__receipt { display: none; }
    .invoice-payment__success { display: flex; min-width: 0; align-items: center; justify-content: start; gap: 10px; text-align: left; }
    .invoice-payment__check { flex: 0 0 32px; width: 32px; height: 32px; border: 0; font-size: 14px; }
    .invoice-showcase .invoice-payment__success h4 { font-size: 16px; line-height: 1.3; letter-spacing: -.02em; }
    .invoice-showcase .invoice-payment__success p { font-size: 13px; margin-top: 4px; }
    .invoice-payment__amount { margin: 0; justify-content: end; align-content: center; gap: 4px; text-align: right; }
    .invoice-payment__amount > strong { font-size: 26px; }
    .invoice-payment__project { display: none; }
    .invoice-payment__details { grid-column: 1/-1; display: grid; margin: 0; padding-top: 12px; border-color: #dce9df; gap: 8px; }
    .invoice-payment__details > div { gap: 12px; }
}
@media (max-width: 360px) {
    .invoice-paper, .invoice-phone { padding-inline: 14px; }
    .invoice-payment__success { align-items: flex-start; }
}
/* Density follows available slide space, without scaling or inner scrolling. */
@media (max-width: 600px) {
    .ppc-mobile--compact .invoice-showcase { gap: 14px; }
    .ppc-mobile--compact .invoice-paper { padding: 14px 16px; }
    .ppc-mobile--compact .invoice-paper__masthead { padding-bottom: 9px; font-size: 14px; line-height: 1.3; }
    .ppc-mobile--compact .invoice-paper__heading { margin-top: 10px; }
    .ppc-mobile--compact .invoice-paper__heading h4 { font-size: 28px; }
    .ppc-mobile--compact .invoice-paper__heading > span,
    .ppc-mobile--compact .invoice-paper__customer span { font-size: 12px; line-height: 1.35; }
    .ppc-mobile--compact .invoice-paper__customer { margin-top: 12px; }
    .ppc-mobile--compact .invoice-paper__customer > div { gap: 2px; }
    .ppc-mobile--compact .invoice-paper__customer strong { line-height: 1.3; }
    .ppc-mobile--compact .invoice-line-items { margin-top: 12px; font-size: 14px; line-height: 1.4; }
    .ppc-mobile--compact .invoice-line-items tbody :is(th, td) { padding-block: 5px; }
    .ppc-mobile--compact .invoice-line-items tfoot :is(th, td) { padding-top: 10px; }
    .ppc-mobile--compact .invoice-line-items tfoot th { font-size: 14px; }
    .ppc-mobile--compact .invoice-line-items tfoot td { font-size: 28px; line-height: 1.25; }
    .ppc-mobile--compact .invoice-paper__closing { margin-top: 10px; min-height: 26px; }
    .ppc-mobile--compact .invoice-paper__closing > span { font-size: 12px; }
    .ppc-mobile--compact .invoice-paid-stamp { font-size: 14px; padding: 1px 9px; }
    .ppc-mobile--compact .invoice-phone { padding: 12px 16px; gap: 10px; }
    .ppc-mobile--compact .invoice-payment__success { gap: 8px; }
    .ppc-mobile--compact .invoice-payment__check { flex-basis: 28px; width: 28px; height: 28px; }
    .ppc-mobile--compact .invoice-payment__success h4 { font-size: 16px; }
    .ppc-mobile--compact .invoice-payment__success p { font-size: 12px; line-height: 1.3; margin-top: 3px; }
    .ppc-mobile--compact .invoice-payment__amount { gap: 2px; }
    .ppc-mobile--compact .invoice-payment__amount > strong { font-size: 26px; }
    .ppc-mobile--compact .invoice-payment__amount > span { font-size: 12px; line-height: 1.3; }
    .ppc-mobile--compact .invoice-payment__details { display: flex; justify-content: space-between; padding-top: 8px; gap: 8px; font-size: 13px; line-height: 1.3; }
    .ppc-mobile--compact .invoice-payment__details > div { gap: 6px; }
    .ppc-mobile--compact .invoice-payment__details span { font-size: 12px; }
    .ppc-mobile--compact .invoice-payment__details > div:last-child > span { display: none; }
    .ppc-mobile--compact .invoice-payment__details strong { white-space: nowrap; }
    .ppc-mobile--short .invoice-showcase { gap: 12px; }
    .ppc-mobile--short .invoice-paper { padding: 10px 14px; }
    .ppc-mobile--short .invoice-paper__masthead { padding-bottom: 8px; font-size: 12px; }
    .ppc-mobile--short .invoice-paper__heading { margin-top: 8px; }
    .ppc-mobile--short .invoice-paper__heading h4 { font-size: 24px; }
    .ppc-mobile--short .invoice-paper__customer { margin-top: 8px; }
    .ppc-mobile--short .invoice-paper__customer strong { font-size: 13px; }
    .ppc-mobile--short .invoice-line-items { margin-top: 10px; }
    .ppc-mobile--short .invoice-line-items tbody :is(th, td) { padding-block: 4px; }
    .ppc-mobile--short .invoice-line-items tfoot :is(th, td) { padding-top: 8px; }
    .ppc-mobile--short .invoice-paper__closing { display: none; }
    .ppc-mobile--short .invoice-phone { padding: 10px 14px; }
    .ppc-mobile--short .invoice-payment__details > div:first-child > span { display: none; }
}
@media print { .invoice-paper, .invoice-phone { box-shadow: none; } }

@media (max-width: 1024px) and (max-height: 820px) {
    body:has(.ppc--pinned .ppc-panel--payments.is-active) #backToTop { visibility: hidden; }
}
