:root {
    --commerce-ink: #163f36;
    --commerce-copy: #60736c;
    --commerce-line: rgba(31, 91, 76, .13);
    --commerce-green: #285f51;
    --commerce-paper: rgba(255, 255, 252, .7);
}

body.commerce-page {
    min-width: 1180px;
    margin: 0;
    color: var(--commerce-ink);
    background: #f1f5ef;
    font-family: "Inter", sans-serif;
}

.commerce-main {
    min-height: calc(100vh - var(--shell-header, 74px));
    background:
        radial-gradient(ellipse at 84% 8%, rgba(131, 178, 157, .12), transparent 38%),
        linear-gradient(180deg, #faf9f5 0%, #f3f6f0 64%, #edf2eb 100%);
}

.commerce-shell {
    width: min(1420px, calc(100% - 128px));
    margin: 0 auto;
    padding: clamp(46px, 5.5vh, 74px) 0 80px;
}

.commerce-heading > a,
.commerce-empty > a,
.commerce-readiness > a,
.commerce-result-actions a {
    display: inline-flex;
    color: #38675b;
    font: 600 .8rem/1.3 "Manrope", sans-serif;
    text-decoration: none;
}

.commerce-heading > a.flow-back-link {
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid rgba(31, 87, 72, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .38);
    color: #315f53;
    font: 620 .72rem/1.2 "Manrope", sans-serif;
}

.commerce-heading h1,
.commerce-empty h1,
.commerce-readiness h1,
.commerce-paytr h1,
.commerce-result h1 {
    max-width: 12ch;
    margin: 22px 0 0;
    color: var(--commerce-ink);
    font: 590 clamp(3.25rem, 4.8vw, 5.65rem)/.94 "Manrope", sans-serif;
    letter-spacing: -.065em;
}

.commerce-heading > p,
.commerce-empty > p,
.commerce-readiness > p,
.commerce-paytr header > p,
.commerce-result > p {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--commerce-copy);
    font: 430 clamp(.9rem, 1vw, 1.04rem)/1.65 "Manrope", sans-serif;
}

.commerce-alert {
    margin-top: 28px;
    padding: 14px 18px;
    border: 1px solid rgba(142, 78, 58, .2);
    border-radius: 12px;
    color: #764b3f;
    background: rgba(255, 246, 239, .72);
    font-size: .78rem;
}

.commerce-layout {
    display: grid;
    grid-template-columns: minmax(650px, 1.34fr) minmax(340px, .66fr);
    align-items: start;
    gap: clamp(40px, 5vw, 76px);
    margin-top: clamp(38px, 5vh, 58px);
}

.commerce-form {
    display: grid;
    gap: 16px;
}

.commerce-form > section,
.commerce-summary {
    padding: clamp(24px, 2.4vw, 34px);
    border-radius: 20px;
    background: var(--commerce-paper);
    box-shadow: 0 20px 56px rgba(39, 74, 62, .065);
}

.commerce-form section > header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 26px;
}

.commerce-form section > header > span {
    padding-top: 5px;
    color: rgba(31, 95, 77, .4);
    font: 700 .6rem/1 "Manrope", sans-serif;
}

.commerce-form h2,
.commerce-summary h2 {
    margin: 0;
    color: #214c40;
    font: 590 clamp(1.45rem, 1.8vw, 2rem)/1 "Manrope", sans-serif;
    letter-spacing: -.045em;
}

.commerce-form header p {
    margin: 7px 0 0;
    color: rgba(55, 79, 71, .54);
    font-size: .7rem;
}

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

.commerce-fields label {
    display: grid;
    gap: 8px;
}

.commerce-fields label > span {
    color: #3c6057;
    font: 580 .7rem/1.2 "Manrope", sans-serif;
}

.commerce-fields input,
.commerce-fields select,
.commerce-fields textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--commerce-line);
    border-radius: 10px;
    outline: 0;
    color: #244d42;
    background: rgba(247, 249, 244, .76);
    font: 450 .78rem/1.45 "Inter", sans-serif;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.commerce-fields textarea { min-height: 88px; resize: vertical; }
.commerce-fields :is(input, select, textarea):focus { border-color: rgba(40, 95, 81, .55); box-shadow: 0 0 0 3px rgba(40, 95, 81, .07); }
.commerce-field-wide { grid-column: 1 / -1; }

.commerce-approvals > label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid rgba(40, 95, 81, .08);
    color: #526d65;
    font: 430 .72rem/1.55 "Manrope", sans-serif;
}

.commerce-approvals input { margin: 3px 0 0; accent-color: var(--commerce-green); }
.commerce-approvals a { color: #285f51; text-decoration: none; font-weight: 620; }

.commerce-summary {
    position: sticky;
    top: calc(var(--shell-header, 74px) + 24px);
}

.commerce-summary > header > span,
.commerce-readiness > span,
.commerce-paytr header > span,
.commerce-result > span,
.commerce-empty > span {
    display: block;
    margin-bottom: 12px;
    color: rgba(31, 87, 72, .48);
    font: 720 .61rem/1 "Manrope", sans-serif;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.commerce-summary-lines {
    display: grid;
    gap: 11px;
    margin-top: 28px;
    padding: 18px 0;
    border-block: 1px solid rgba(40, 95, 81, .09);
}

.commerce-summary-lines > div,
.commerce-summary dl > div,
.commerce-readiness dl > div,
.commerce-result dl > div {
    display: flex;
    justify-content: space-between;
    gap: 22px;
}

.commerce-summary-lines :is(span, strong),
.commerce-summary :is(dt, dd),
.commerce-readiness :is(dt, dd),
.commerce-result :is(dt, dd) {
    margin: 0;
    color: #4d6a62;
    font: 500 .72rem/1.4 "Manrope", sans-serif;
}
.commerce-summary-lines > small {
    color: rgba(55, 79, 71, .68);
    font: 450 .62rem/1.45 "Manrope", sans-serif;
}

.commerce-summary dl { display: grid; gap: 10px; margin: 20px 0 0; }
.commerce-summary-total { margin-top: 7px; padding-top: 16px; border-top: 1px solid var(--commerce-line); }
.commerce-summary-total dd { color: #145b49; font-size: 1.25rem; font-weight: 680; letter-spacing: -.035em; }

.commerce-monthly {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    margin-top: 22px;
    padding: 17px;
    border-radius: 12px;
    color: #43645b;
    background: rgba(219, 232, 222, .6);
    font: 520 .69rem/1.35 "Manrope", sans-serif;
}
.commerce-monthly strong { color: #235749; white-space: nowrap; }
.commerce-monthly small { grid-column:1 / -1; color: rgba(55, 79, 71, .66); font-size: .62rem; }

.commerce-pay-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    color: #f8f7f2;
    background: var(--commerce-green);
    font: 620 .78rem/1 "Manrope", sans-serif;
}
.commerce-pay-button:disabled { opacity: .58; }
.commerce-secure-note { display: block; margin-top: 12px; color: rgba(55, 79, 71, .48); font: 420 .59rem/1.5 "Manrope", sans-serif; }

.commerce-summary-card {
    display: grid;
    gap: 15px;
    margin-top: 14px;
    padding: 20px 18px 17px;
    border-radius: 14px;
    background: rgba(231, 237, 231, .48);
}

.commerce-summary .summary-vat-note {
    margin: 10px 0 0;
    color: rgba(55, 79, 71, .5);
    font: 450 .58rem/1.45 "Manrope", sans-serif;
}

.commerce-summary-key-total,
.commerce-summary-monthly-row,
.commerce-summary-due {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    color: #315c50;
    font: 500 .82rem/1.35 "Manrope", sans-serif;
}

.commerce-summary-key-total strong,
.commerce-summary-due strong {
    color: #145b49;
    font: 600 clamp(1.18rem, 1.28vw, 1.38rem)/1 "Manrope", sans-serif;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.commerce-summary-monthly-row strong {
    color: #145b49;
    font: 600 clamp(1.05rem, 1.18vw, 1.28rem)/1 "Manrope", sans-serif;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.commerce-summary-monthly-row > span {
    color: #315c50;
    font-size: .78rem;
    font-weight: 540;
}

.commerce-summary-details {
    margin-top: 3px;
    padding-top: 11px;
    border-top: 1px solid rgba(40, 95, 81, .15);
}

.commerce-summary-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(49, 92, 80, .72);
    font: 470 .78rem/1.4 "Manrope", sans-serif;
    cursor: pointer;
    list-style: none;
}

.commerce-summary-details summary::-webkit-details-marker { display: none; }
.commerce-summary-details summary::after { content: "+"; color: #2d6a5a; font-size: 1.05rem; font-weight: 400; }
.commerce-summary-details[open] summary::after { content: "−"; }
.commerce-summary-details > div { display: grid; gap: 7px; margin-top: 11px; }
.commerce-summary-details p { display: flex; justify-content: space-between; gap: 14px; margin: 0; color: #526f66; font: 440 .76rem/1.4 "Manrope", sans-serif; }
.commerce-summary-details p strong { color: #315d51; font-weight: 540; white-space: nowrap; }

.commerce-summary-note {
    width: 100%;
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    padding: 10px 0;
    color: rgba(39, 76, 66, .76);
    background: transparent;
    font: 390 .72rem/1.48 "Manrope", sans-serif;
}

.commerce-summary-note > span {
    text-align: center;
}

.commerce-summary-note::after {
    content: "";
    width: 15px;
}

.commerce-summary-note > i {
    position: static;
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border: 1px solid rgba(31, 87, 72, .38);
    border-radius: 50%;
    color: #285f51;
    font: 700 .52rem/1 "Manrope", sans-serif;
    font-style: normal;
    transform: none;
}

.commerce-summary-due {
    margin-top: 1px;
    padding-top: 12px;
    border-top: 1px solid rgba(40, 95, 81, .15);
}

.commerce-pay-button { justify-content: center; }

.commerce-content-modal {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(1120px, calc(100vw - 80px));
    height: min(840px, calc(100vh - 64px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(33, 76, 64, .14);
    border-radius: 22px;
    color: var(--commerce-ink);
    background: #f6f7f2;
    box-shadow: 0 30px 100px rgba(20, 49, 41, .24);
}

.commerce-content-modal[open] {
    display: flex;
    flex-direction: column;
}

.commerce-content-modal::backdrop {
    background: rgba(12, 32, 27, .46);
    backdrop-filter: blur(7px);
}

.commerce-content-modal__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 0 20px 0 26px;
    border-bottom: 1px solid rgba(33, 76, 64, .1);
    background: rgba(250, 250, 247, .92);
}

.commerce-content-modal__header h2 {
    margin: 0;
    color: #244d42;
    font: 600 1rem/1.2 "Manrope", sans-serif;
    letter-spacing: -.025em;
}

.commerce-content-modal__header button {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #315d51;
    background: rgba(40, 95, 81, .07);
    cursor: pointer;
}

.commerce-content-modal__header button::before,
.commerce-content-modal__header button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
}

.commerce-content-modal__header button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.commerce-content-modal__header button:focus-visible {
    outline: 2px solid #0f8071;
    outline-offset: 3px;
}

.commerce-content-modal iframe {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #f6f7f2;
}

@media (max-width: 860px) {
    .commerce-content-modal {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        border-radius: 18px;
    }

    .commerce-content-modal__header {
        min-height: 60px;
        padding: 0 10px 0 16px;
    }

    .commerce-content-modal__header h2 {
        min-width: 0;
        overflow: hidden;
        font-size: 1rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .commerce-content-modal__header button {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
    }
}

.commerce-empty,
.commerce-readiness,
.commerce-result {
    width: min(920px, calc(100% - 128px));
    min-height: calc(100vh - var(--shell-header, 74px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    padding: 72px 0;
}
.commerce-empty > a,
.commerce-readiness > a { margin-top: 34px; }
.commerce-readiness dl,
.commerce-result dl { width: min(620px, 100%); display: grid; gap: 12px; margin: 34px 0 0; padding: 20px 0; border-block: 1px solid var(--commerce-line); }

.commerce-payment-main,
.commerce-result-main { display: grid; min-height: calc(100vh - var(--shell-header, 74px)); }
.commerce-payment-shell { width: 100%; }
.commerce-paytr { width: min(1040px, calc(100% - 128px)); margin: 0 auto; padding: 54px 0 80px; }
.commerce-paytr h1 { font-size: clamp(2.8rem, 4vw, 4.8rem); }
.commerce-paytr iframe { display: block; width: 100%; min-height: 620px; margin-top: 36px; border: 0; border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: 0 20px 56px rgba(39,74,62,.065); }
.commerce-result-actions { margin-top: 32px; }

body.commerce-page {
    background: var(--site-background);
}

.commerce-main {
    background: transparent;
}
