.donation-page {
    width: min(100%, 1040px);
    margin: 0 auto;
    color: #17130c;
}

.donation-hero {
    margin-bottom: 28px;
    padding: clamp(24px, 5vw, 48px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 350px);
    gap: 30px;
    align-items: center;
    border: 3px solid #e0ad31;
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 12%, rgb(224 173 49 / 28%), transparent 38%),
        linear-gradient(135deg, #fffdf0 0%, #f5e8cb 100%);
    box-shadow: 0 18px 44px rgb(111 78 22 / 14%);
}

.donation-hero h1,
.donation-checkout-heading h1,
.donation-status-card h1 {
    margin: 6px 0 12px;
    color: #214f97;
}

.donation-hero__intro {
    max-width: 700px;
    margin-bottom: 0;
    font-size: 1.08rem;
    line-height: 1.65;
}

.donation-security-notice,
.donation-method-note,
.donation-unavailable,
.donation-thank-you {
    padding: 20px;
    border: 2px solid #e0ad31;
    border-radius: 18px;
    background: #fffdf0;
    color: #332711;
    line-height: 1.55;
}

.donation-security-notice {
    border-color: #214f97;
    background: #214f97;
    color: #fffdf0;
}

.donation-security-notice strong,
.donation-method-note strong,
.donation-thank-you strong {
    display: block;
    margin-bottom: 6px;
}

.donation-security-notice strong {
    color: #f5e8cb;
}

.donation-method-note {
    margin: 0 0 24px;
    background: #f5e8cb;
}

.donation-unavailable {
    max-width: 760px;
    margin: 30px auto;
    padding: 30px;
    text-align: center;
}

.donation-unavailable h2 {
    margin-top: 0;
    color: #214f97;
}

.donation-form {
    display: grid;
    gap: 24px;
}

.donation-form .questionnaire-section {
    border-color: #e0ad31;
    background: #fffdf0;
    box-shadow: 0 12px 30px rgb(111 78 22 / 10%);
}

.donation-form .questionnaire-section legend {
    color: #214f97;
}

.donation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.donation-amount-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    border: 2px solid #b87e0f;
    border-radius: 10px;
    background: #ffffff;
}

.donation-amount-input:focus-within {
    border-color: #214f97;
    outline: 3px solid #e0ad31;
    outline-offset: 2px;
}

.donation-amount-input span {
    padding-left: 14px;
    color: #214f97;
    font-size: 1.1rem;
    font-weight: 900;
}

.donation-amount-input input {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.donation-message-field {
    grid-column: 1 / -1;
}

.donation-message-field textarea {
    min-height: 120px;
}

.donation-submit-button {
    justify-self: start;
}

.donation-form__fine-print {
    margin: -12px 0 0;
    color: #5e4c2a;
    font-size: .9rem;
}

.donation-checkout-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.donation-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
    gap: 26px;
    align-items: start;
}

.donation-checkout-frame,
.donation-checkout-summary,
.donation-status-card {
    border: 2px solid #e0ad31;
    border-radius: 22px;
    background: #fffdf0;
    box-shadow: 0 14px 36px rgb(111 78 22 / 12%);
}

.donation-checkout-frame {
    min-height: 420px;
    padding: clamp(12px, 2vw, 22px);
}

#donation-checkout-config {
    display: none;
}

.donation-checkout-loading {
    padding: 70px 20px;
    color: #214f97;
    font-weight: 800;
    text-align: center;
}

.donation-checkout-error {
    margin: 12px;
    padding: 16px;
    border: 2px solid #8b2f24;
    border-radius: 12px;
    background: #fff1ed;
    color: #6d2119;
}

.donation-checkout-summary {
    position: sticky;
    top: 20px;
    padding: 24px;
}

.donation-checkout-summary h2 {
    margin-top: 0;
    color: #214f97;
}

.donation-checkout-summary dl {
    margin: 0 0 20px;
}

.donation-checkout-summary dl div {
    padding: 12px 0;
    border-bottom: 1px solid #ebd9b2;
}

.donation-checkout-summary dt {
    color: #6f4e16;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.donation-checkout-summary dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 750;
}

.donation-status-card {
    max-width: 760px;
    margin: 30px auto;
    padding: clamp(28px, 6vw, 54px);
    text-align: center;
}

.donation-thank-you {
    margin-bottom: 22px;
    background: #f5e8cb;
    text-align: center;
}

.receipt-document-page {
    min-width: 320px;
    margin: 0;
    background: #f3efe5;
    color: #17130c;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

.receipt-document-page *,
.receipt-document-page *::before,
.receipt-document-page *::after {
    box-sizing: border-box;
}

.receipt-document-main {
    min-height: 100vh;
    padding: clamp(20px, 4vw, 48px);
}

.receipt-document-page button,
.receipt-document-page a {
    font: inherit;
}

.receipt-document-page .primary-button,
.receipt-document-page .secondary-button {
    min-height: 44px;
    padding: 11px 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #214f97;
    border-radius: 999px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.receipt-document-page .primary-button {
    background: #214f97;
    color: #ffffff;
}

.receipt-document-page .secondary-button {
    background: #ffffff;
    color: #214f97;
}

.receipt-document-page .primary-button:hover,
.receipt-document-page .primary-button:focus-visible,
.receipt-document-page .secondary-button:hover,
.receipt-document-page .secondary-button:focus-visible {
    border-color: #6f4e16;
    outline: 3px solid #e0ad31;
    outline-offset: 2px;
}

.donation-receipt-page {
    width: min(100%, 920px);
}

.donation-receipt {
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid #cbbf9e;
    border-top: 8px solid #214f97;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgb(54 42 20 / 14%);
}

.donation-receipt__header {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
}

.donation-receipt__brand {
    display: flex;
    min-width: 0;
    gap: 18px;
    align-items: center;
}

.donation-receipt__mark {
    width: 64px;
    height: 64px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid #214f97;
    border-radius: 50%;
    color: #214f97;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: .06em;
}

.donation-receipt__document-type,
.donation-receipt__section-label {
    margin: 0 0 6px;
    color: #6f4e16;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.donation-receipt__header h1 {
    margin: 0;
    color: #17130c;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1.08;
}

.donation-receipt__legal-name {
    margin: 7px 0 0;
    color: #5e4c2a;
    font-size: .92rem;
}

.donation-receipt__number {
    min-width: 185px;
    text-align: right;
}

.donation-receipt__number span,
.donation-receipt__number strong {
    display: block;
}

.donation-receipt__number span {
    margin-bottom: 5px;
    color: #6f4e16;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.donation-receipt__number strong {
    color: #214f97;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.donation-receipt__rule {
    height: 3px;
    margin: 28px 0;
    background: linear-gradient(90deg, #214f97 0 72%, #e0ad31 72% 100%);
}

.donation-receipt__summary {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr);
    gap: 34px;
    align-items: start;
}

.donation-receipt__issuer h2,
.donation-receipt__donor h2 {
    margin: 0 0 8px;
    color: #17130c;
    font-size: 1.08rem;
    line-height: 1.3;
}

.donation-receipt__issuer address {
    margin: 0;
    color: #4f4639;
    font-size: .9rem;
    font-style: normal;
    line-height: 1.55;
}

.donation-receipt__issuer a,
.donation-receipt__footer a {
    color: #214f97;
    overflow-wrap: anywhere;
}

.donation-receipt__metadata {
    margin: 0;
}

.donation-receipt__metadata div {
    padding: 0 0 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    border-bottom: 1px solid #ddd4bb;
}

.donation-receipt__metadata div + div {
    padding-top: 10px;
}

.donation-receipt__metadata dt,
.donation-receipt__line-items dt {
    color: #5e4c2a;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.donation-receipt__metadata dd {
    margin: 0;
    color: #17130c;
    font-size: .88rem;
    font-weight: 800;
    text-align: right;
}

.donation-receipt__gift {
    margin: 30px 0 0;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
    border: 1px solid #d7c89d;
    background: #fffdf5;
}

.donation-receipt__donor p:not(.donation-receipt__section-label) {
    margin: 2px 0;
    color: #5e4c2a;
    font-size: .9rem;
}

.donation-receipt__amount {
    min-width: 220px;
    text-align: right;
}

.donation-receipt__amount span,
.donation-receipt__amount strong {
    display: block;
}

.donation-receipt__amount span {
    margin-bottom: 4px;
    color: #5e4c2a;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.donation-receipt__amount strong {
    color: #214f97;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1;
}

.donation-receipt__line-items {
    margin: 0;
    border-bottom: 1px solid #ddd4bb;
}

.donation-receipt__line-items div {
    padding: 15px 4px;
    display: grid;
    grid-template-columns: minmax(170px, .65fr) minmax(0, 1.35fr);
    gap: 24px;
    border-top: 1px solid #ddd4bb;
}

.donation-receipt__line-items dd {
    margin: 0;
    color: #17130c;
    font-weight: 750;
    text-align: right;
}

.donation-receipt__acknowledgment {
    margin: 30px 0;
    padding: 22px 24px;
    border-left: 5px solid #e0ad31;
    background: #f7f3e7;
}

.donation-receipt__acknowledgment p {
    margin: 10px 0 0;
    color: #332b20;
    font-size: .92rem;
    line-height: 1.55;
}

.donation-receipt__acknowledgment .donation-receipt__section-label {
    margin-top: 0;
    color: #6f4e16;
}

.donation-receipt__footer {
    padding-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: end;
    border-top: 2px solid #214f97;
    color: #5a5144;
    font-size: .78rem;
    line-height: 1.5;
}

.donation-receipt__footer strong {
    color: #214f97;
    font-size: .9rem;
}

.donation-receipt__footer p {
    max-width: 560px;
    margin: 5px 0 0;
}

.donation-receipt__footer-contact {
    display: grid;
    gap: 4px;
    text-align: right;
}

.receipt-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.receipt-print-hint {
    margin: 10px 0 0;
    color: #5e4c2a;
    font-size: .86rem;
    text-align: center;
}

.receipt-history-page {
    width: min(100%, 900px);
}

.receipt-history-heading {
    max-width: 700px;
    margin-bottom: 28px;
}

.receipt-history-heading h1 {
    margin: 6px 0 12px;
    color: #214f97;
}

.receipt-history-heading > p:last-child {
    color: #4f4639;
    line-height: 1.6;
}

.receipt-history-list {
    display: grid;
    gap: 18px;
}

.receipt-history-card {
    padding: 22px;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 22px;
    border: 1px solid #d7c89d;
    border-left: 6px solid #214f97;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgb(54 42 20 / 9%);
}

.receipt-history-card__date {
    width: 72px;
    height: 82px;
    display: grid;
    align-content: center;
    border: 1px solid #d7c89d;
    border-radius: 10px;
    background: #fffdf5;
    color: #214f97;
    text-align: center;
}

.receipt-history-card__date span,
.receipt-history-card__date small {
    color: #6f4e16;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.receipt-history-card__date strong {
    font-size: 1.6rem;
    line-height: 1.05;
}

.receipt-history-card__heading {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: start;
}

.receipt-history-card__label {
    margin: 0 0 3px;
    color: #6f4e16;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.receipt-history-card__heading h2 {
    margin: 0;
    color: #17130c;
    font-size: 1.2rem;
}

.receipt-history-card__amount {
    color: #214f97;
    font-size: 1.2rem;
    white-space: nowrap;
}

.receipt-history-card__details {
    margin: 16px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(120px, .6fr);
    gap: 18px;
}

.receipt-history-card__details dt {
    color: #6f4e16;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.receipt-history-card__details dd {
    margin: 3px 0 0;
    color: #332b20;
    font-weight: 750;
}

.receipt-history-card__action {
    min-height: 40px;
    padding: 8px 16px;
    font-size: .88rem;
}

.receipt-history-empty {
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid #d7c89d;
    border-radius: 16px;
    background: #fffdf5;
    text-align: center;
}

.receipt-history-empty h2 {
    margin-top: 0;
    color: #214f97;
}

.receipt-history-footer {
    margin-top: 26px;
}

@media (max-width: 780px) {
    .donation-hero,
    .donation-form-grid,
    .donation-checkout-grid {
        grid-template-columns: 1fr;
    }

    .donation-checkout-summary {
        position: static;
        grid-row: 1;
    }

    .donation-submit-button {
        width: 100%;
    }

    .donation-receipt {
        padding: 26px 22px;
    }

    .donation-receipt__header,
    .donation-receipt__summary,
    .donation-receipt__gift,
    .donation-receipt__footer {
        grid-template-columns: 1fr;
    }

    .donation-receipt__header {
        display: grid;
    }

    .donation-receipt__number,
    .donation-receipt__amount,
    .donation-receipt__footer-contact {
        min-width: 0;
        text-align: left;
    }

    .donation-receipt__line-items div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .donation-receipt__line-items dd {
        text-align: left;
    }

    .receipt-history-card__heading,
    .receipt-history-card__details {
        grid-template-columns: 1fr;
    }

    .receipt-history-card__heading {
        display: grid;
    }

    .receipt-history-card__amount {
        white-space: normal;
    }
}

@media (max-width: 520px) {
    .donation-receipt__brand {
        align-items: flex-start;
    }

    .donation-receipt__mark {
        width: 48px;
        height: 48px;
        font-size: .9rem;
    }

    .donation-receipt__gift,
    .donation-receipt__acknowledgment {
        padding: 18px;
    }

    .receipt-history-card {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: letter portrait;
        margin: .45in;
    }

    .site-header,
    .site-footer,
    .donation-thank-you,
    .receipt-actions,
    .receipt-print-hint {
        display: none !important;
    }

    html,
    body,
    main,
    .donation-page {
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .receipt-document-page {
        min-width: 0;
    }

    .donation-receipt {
        padding: 0;
        border: 0;
        border-top: 6px solid #214f97;
        border-radius: 0;
        box-shadow: none;
        color: #000000;
        break-inside: avoid;
    }

    .donation-receipt__header,
    .donation-receipt__gift,
    .donation-receipt__acknowledgment,
    .donation-receipt__mark,
    .donation-receipt__rule {
        color-adjust: exact;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .donation-receipt__header {
        padding-top: .24in;
    }

    .donation-receipt__rule {
        margin: .18in 0;
    }

    .donation-receipt__summary {
        gap: .3in;
    }

    .donation-receipt__gift {
        margin-top: .22in;
        padding: .18in;
    }

    .donation-receipt__line-items div {
        padding: .1in .03in;
    }

    .donation-receipt__acknowledgment {
        margin: .22in 0;
        padding: .16in .18in;
    }

    .donation-receipt__footer {
        padding-top: .14in;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}
