/* Proposal page as a four-step walkthrough: Offer, Proposal, Milestones, Summary (ST_Proposal_Steps, 2026-11-22).
   Ink, paper and gold from the editorial milestone cards; the milestone menu copies the group Business Plan's
   chapters menu (projects psoo-bp-tab.css: paper side list, tablet bar, neon phone dropdown). */

.stp-steps {
    --st-ink: #0e0f12;
    --st-ink2: #17181d;
    --st-paper: #f6f4ef;
    --st-paper2: #fbfaf6;
    --st-line: #e5e0d2;
    --st-gold: #a88b57;
    --st-gold-d: #a5822f;
    --st-gold-l: #e6cf9a;
    --st-mute: #6d6a63;
    --st-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --st-sans: Inter, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    position: relative;
    margin-top: 0;
}
.stp-frontend-proposal.stp-fp-pre { margin: 0; }
.stp-frontend-proposal.stp-fp-pre:not(:has(.stp-payment-status-banner)) { display: contents; }

/* Only the active step shows (set on the server, so nothing flashes before the script runs). */
.stp-steps > .stp-step:not(.is-active) { display: none !important; }
.stp-steps > .stp-step { outline: none; }
.stp-steps > .stp-step--proposal,
.stp-steps > .stp-step--milestones,
.stp-steps > .stp-step--summary { min-height: calc(100vh - var(--stp-nav-h, 56px) - 40px); }

/* ── Offer ───────────────────────────────────────────────────────────────── */
.stp-steps:not([data-active="offer"]) > .stp-offer-slides,
.stp-steps:not([data-active="offer"]) > .stp-stepbar-top { display: none; }
.stp-offer-after { padding-bottom: 28px; }
.stp-offer-after:empty { display: none; }

/* The slide stage leaves room for the price bar and the step bar under it, so all three fit the first screen. */
@media (min-width: 901px) {
    body.single-st_proposal.stp-steps-on .quantum-gallery-frame:not(.is-fullscreen) {
        width: min(calc(100% - 2 * var(--stp-gutter)), calc((100dvh - 240px - var(--stp-bars-h, 150px)) * 16 / 9), 1600px);
        margin-bottom: calc(clamp(20px, 3vh, 40px) + 64px);
    }
}

/* ── Price bar: in the page under the slides (or at the top of the other steps), then stuck to the top.
   Its own rules (frontend-proposals.css .stp-buybar) make it sticky; here it is a child of .stp-steps. ── */
.stp-steps > .stp-buybar { margin-top: 10px; margin-bottom: 14px; }
.stp-steps[data-active="summary"] > .stp-buybar { display: none; }

/* ── Proposal ────────────────────────────────────────────────────────────── */
.stp-proposal-body { padding: clamp(12px, 2vh, 28px) 0 28px; }
/* The steps after the Offer start under the site header (signed out) or the floating corner buttons (phones). */
body.not-logged-in .stp-steps:not([data-active="offer"]) { padding-top: var(--stp-hdr, 72px); }
@media (max-width: 700px) {
    body.logged-in .stp-steps:not([data-active="offer"]) { padding-top: 62px; }
}

/* ── Step bar: under the price bar on the Offer while that spot is on screen; otherwise stuck to the bottom
   of the window, until the step's content ends (proposal-steps.js moves it between the two places). ── */
.stp-stepbar-top {
    display: flex;
    justify-content: center;
    min-height: var(--stp-nav-h, 56px);
    margin: 0 0 22px;
    padding: 0 12px;
}
.stp-dock {
    position: sticky;
    bottom: 0;
    z-index: 990;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    isolation: isolate;
}
.stp-dock.is-empty { padding: 0; }
.stp-dock::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(5, 6, 9, 0), rgba(5, 6, 9, 0.72) 55%, rgba(5, 6, 9, 0.88));
    pointer-events: none;
}
.stp-dock.is-empty::before { display: none; }
.stp-dock > * { pointer-events: auto; }

/* ── Up next: under the content; the next milestone or step loads when the step bar climbs to mid-screen ── */
.stp-upnext {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 62vh;
    padding: 28px 16px 40px;
    text-align: center;
}
.stp-upnext[hidden] { display: none; }
.stp-upnext__in { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 640px; }
.stp-upnext__k { color: #c9ad78; font: 700 11px/1 var(--st-sans); letter-spacing: 0.24em; text-transform: uppercase; }
.stp-upnext__t { color: #f6f4ef; font: 400 clamp(22px, 3vw, 34px)/1.2 var(--st-serif); }
.stp-upnext__line { position: relative; display: block; width: min(320px, 70vw); height: 2px; border-radius: 2px; overflow: hidden; background: rgba(246, 244, 239, 0.1); }
.stp-upnext__line i { position: absolute; inset: 0; background: linear-gradient(90deg, #a88b57, #e6cf9a); transform: scaleX(var(--p, 0)); transform-origin: left center; }
.stp-upnext__s { color: rgba(246, 244, 239, 0.5); font: 500 12px/1.4 var(--st-sans); letter-spacing: 0.04em; }

.stp-steps-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px;
    border-radius: 100px;
    background: rgba(14, 15, 18, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(246, 244, 239, 0.14);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-family: var(--st-sans);
}
.stp-steps-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; }
.stp-steps .stp-steps-tab {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 100px;
    background: transparent;
    color: rgba(246, 244, 239, 0.62);
    font: 700 11.5px/1 var(--st-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.stp-steps .stp-steps-tab:hover { color: #fff; background: rgba(246, 244, 239, 0.07); }
.stp-steps .stp-steps-tab:focus-visible { outline: 2px solid var(--st-gold-l); outline-offset: 2px; }
.stp-steps-tab__n {
    font: italic 400 14px/1 var(--st-serif);
    letter-spacing: 0;
    color: #c9ad78;
    text-transform: none;
}
.stp-steps-tab__sub {
    align-self: center;
    padding: 2px 6px;
    border-radius: 100px;
    background: rgba(201, 173, 120, 0.16);
    color: var(--st-gold-l);
    font: 600 10px/1.2 var(--st-sans);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.stp-steps .stp-steps-tab.is-done { color: rgba(246, 244, 239, 0.86); }
.stp-steps .stp-steps-tab.is-active { background: var(--st-paper); color: var(--st-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.stp-steps .stp-steps-tab.is-active .stp-steps-tab__n { color: var(--st-gold); }
.stp-steps .stp-steps-tab.is-active .stp-steps-tab__sub { background: rgba(168, 139, 87, 0.16); color: #7a6136; }

.stp-steps .stp-steps-arrow {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid rgba(246, 244, 239, 0.16);
    border-radius: 100px;
    background: transparent;
    color: #f6f4ef;
    font: 700 11px/1 var(--st-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.stp-steps .stp-steps-arrow.is-next { border-color: rgba(201, 173, 120, 0.6); background: linear-gradient(135deg, #c9ad78, #a88b57); color: var(--st-ink); }
.stp-steps .stp-steps-arrow:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--st-gold-l); }
.stp-steps .stp-steps-arrow.is-prev:hover:not(:disabled) { background: rgba(246, 244, 239, 0.08); }
.stp-steps .stp-steps-arrow:disabled { opacity: 0.28; cursor: default; }
.stp-steps .stp-steps-arrow.is-next:disabled { background: transparent; color: #f6f4ef; border-color: rgba(246, 244, 239, 0.16); }
.stp-steps .stp-steps-arrow:focus-visible { outline: 2px solid var(--st-gold-l); outline-offset: 2px; }
.stp-steps-arrow__l { display: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.stp-steps-arrow.is-prev .stp-steps-arrow__l { order: 2; }
.stp-steps-arrow.is-next svg { order: 2; }
@media (min-width: 1100px) {
    .stp-steps-arrow:not(:disabled) .stp-steps-arrow__l:not(:empty) { display: inline; }
    .stp-steps .stp-steps-arrow:not(:disabled) { padding: 0 14px; }
}
.stp-steps-progress {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 1px;
    height: 2px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(246, 244, 239, 0.06);
    pointer-events: none;
}
.stp-steps-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #a88b57, #e6cf9a);
    transform: scaleX(0.02);
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 700px) {
    .stp-dock { padding: 14px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
    /* The chat button keeps its corner: the bar leaves room for it. */
    body:has(.em-chat-widget) .stp-dock:not(.is-empty) { align-items: flex-start; padding-right: 80px; }
    .stp-stepbar-top { padding: 0 8px; }
    .stp-steps-nav { width: 100%; justify-content: space-between; gap: 2px; padding: 4px; }
    .stp-steps-tabs { flex: 1 1 auto; justify-content: space-between; }
    .stp-steps .stp-steps-tab { padding: 9px 9px; gap: 5px; font-size: 10px; letter-spacing: 0.08em; }
    .stp-steps .stp-steps-arrow { min-width: 36px; height: 36px; padding: 0; }
}
/* Narrow phones: the other steps show their number only. */
@media (max-width: 440px) {
    .stp-steps .stp-steps-tab:not(.is-active) .stp-steps-tab__l,
    .stp-steps .stp-steps-tab:not(.is-active) .stp-steps-tab__sub { display: none; }
    .stp-steps .stp-steps-tab:not(.is-active) { padding: 9px 11px; }
    .stp-steps .stp-steps-tab__sub { display: none; }
}

/* The chat button stays in its corner. The captcha badge and, where the bar reaches them, the member's cart and
   profile buttons (bottom left) sit above the step bar. */
body.stp-steps-on .grecaptcha-badge { bottom: calc(var(--stp-nav-h, 56px) + 34px) !important; }
@media (max-width: 1000px) {
    body.stp-steps-on .gs-float-dock { bottom: calc(var(--stp-nav-h, 56px) + 32px); }
}

/* ── Milestones: chapter menu + one card at a time ──────────────────────── */
.stp-ms-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    max-width: 1560px;
    margin: 0 auto;
    padding: clamp(24px, 4vh, 48px) clamp(16px, 3vw, 48px) 28px;
    box-sizing: border-box;
}
.stp-steps .stp-ms-nav {
    position: sticky;
    top: calc(var(--stp-pricebar-b, 80px) + 14px);
    align-self: start;
    max-height: calc(100vh - var(--stp-pricebar-b, 80px) - var(--stp-nav-h, 56px) - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    counter-reset: stp-toc;
    padding: 14px 0;
    background: #fbfaf6;
    border: 1px solid #e5e0d2;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.stp-steps .stp-ms-nav__eyebrow { margin: 0 18px 12px; font: 700 10px/1.3 system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.14em; color: #a5822f; }
.stp-steps .stp-ms-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.stp-steps .stp-ms-nav__list > li { margin: 0; padding: 0; list-style: none; }
.stp-steps .stp-ms-nav__list > li::before,
.stp-steps .stp-ms-nav__list > li::marker { content: none; }
.stp-steps .stp-ms-nav__link {
    counter-increment: stp-toc;
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 8px;
    padding: 9px 16px;
    border-radius: 8px;
    border-left: 2px solid transparent;
    color: #3a4152;
    font: 400 14.5px/1.35 Georgia, "Times New Roman", serif;
    text-decoration: none;
    transition: all 0.15s;
}
.stp-steps .stp-ms-nav__link::before { content: counter(stp-toc, decimal-leading-zero); flex: none; color: #a5822f; font: 700 11px system-ui, sans-serif; letter-spacing: 0.06em; }
.stp-steps .stp-ms-nav__link:hover { color: #14213a; background: #f0ecdf; }
.stp-steps .stp-ms-nav__link.is-active { color: #14213a; background: #f0ecdf; border-left-color: #c8a24a; }
.stp-steps .stp-ms-nav__link:focus-visible { outline: 2px solid #c8a24a; outline-offset: 1px; }
.stp-steps .stp-ms-nav__link.is-off .stp-ms-nav__t { opacity: 0.5; text-decoration: line-through; text-decoration-color: rgba(58, 65, 82, 0.45); }

.stp-ms-stage { position: relative; min-width: 0; perspective: 1800px; }
.stp-steps .stp-ms-stage > .stp-milestone-card { margin: 0; animation: none; will-change: auto; }
.stp-steps .stp-ms-stage > .stp-milestone-card:not(.is-current) { display: none; }
.stp-steps .stp-ms-stage > .stp-milestone-card .stp-product-card,
.stp-steps .stp-ms-stage > .stp-milestone-card .stp-milestone-intro { animation: none; }

/* A band of light crosses the card as it arrives. */
.stp-ms-sheen {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(230, 207, 154, 0.35) 45%, rgba(255, 255, 255, 0.55) 50%, rgba(230, 207, 154, 0.3) 55%, transparent 70%);
    background-size: 260% 100%;
    background-position: 130% 0;
    mix-blend-mode: soft-light;
}
.stp-milestone-card.is-entering > .stp-ms-sheen { animation: stpMsSheen 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
@keyframes stpMsSheen {
    0%   { opacity: 0; background-position: 130% 0; }
    20%  { opacity: 1; }
    100% { opacity: 0; background-position: -60% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .stp-milestone-card.is-entering > .stp-ms-sheen { animation: none; }
    .stp-steps-progress i { transition: none; }
}

/* Phone dropdown (copy of the Business Plan's neon chapters select). */
@property --stp-ms-neon-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes stpMsNeonSpin { to { --stp-ms-neon-ang: 360deg; } }
.stp-ms-select { display: none; }
.stp-steps .stp-ms-select__btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 13px 20px;
    border: 0;
    border-radius: 14px;
    background: rgba(10, 14, 24, 0.92);
    color: #e8f0ff;
    font: 800 13px/1.2 system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.stp-ms-select__btn::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: conic-gradient(from var(--stp-ms-neon-ang, 0deg), #b608c9, #6ec1e4, #00ff88, #ffcc00, #b608c9);
    z-index: -1;
    opacity: 0.55;
    animation: stpMsNeonSpin 4s linear infinite;
}
.stp-ms-select__btn::after { content: ""; position: absolute; inset: 0; border-radius: 14px; background: rgba(10, 14, 24, 0.92); z-index: -1; }
.stp-ms-select.is-open .stp-ms-select__btn::before { opacity: 1; }
.stp-ms-select__btn:focus { outline: none; }
.stp-ms-select__btn:focus-visible { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(110, 193, 228, 0.65), 0 0 24px rgba(182, 8, 201, 0.35); }
.stp-ms-select__n { flex: none; color: #c9ad78; font: italic 400 15px/1 var(--st-serif, Georgia, serif); letter-spacing: 0; }
.stp-ms-select__label { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 10px rgba(232, 240, 255, 0.25); }
.stp-ms-select__caret { flex: none; color: #b608c9; text-shadow: 0 0 8px rgba(182, 8, 201, 0.8); transition: transform 0.3s ease; }
.stp-ms-select.is-open .stp-ms-select__caret { transform: rotate(180deg); }
.stp-ms-select__list {
    position: fixed !important;
    left: -9999px;
    top: -9999px;
    z-index: 2147483647 !important;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(8, 11, 20, 0.96);
    border: 1px solid rgba(110, 193, 228, 0.25);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 30px rgba(182, 8, 201, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    max-height: min(380px, 52vh);
    overflow-y: auto;
    transform: rotateX(-14deg);
    transform-origin: top center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.stp-ms-select__list.is-open { display: flex !important; opacity: 1 !important; transform: rotateX(0deg); pointer-events: auto !important; }
.stp-ms-select__opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 11px 14px;
    border: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.03);
    color: #aebadb;
    font: 700 12px/1.3 system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease, box-shadow 0.25s ease;
}
.stp-ms-select__opt::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 12.5px;
    background: conic-gradient(from var(--stp-ms-neon-ang, 0deg), #b608c9, #6ec1e4, #00ff88, #b608c9);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.stp-ms-select__opt::after { content: ""; position: absolute; inset: 0; border-radius: 11px; background: rgba(10, 14, 24, 0.94); z-index: -1; }
.stp-ms-select__opt:hover { color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(110, 193, 228, 0.3); }
.stp-ms-select__opt:hover::before { opacity: 1; animation: stpMsNeonSpin 1.6s linear infinite; }
.stp-ms-select__opt:focus { outline: none; }
.stp-ms-select__opt:focus-visible { color: #fff; box-shadow: 0 0 0 2px rgba(110, 193, 228, 0.65); }
.stp-ms-select__opt.is-current { color: #fff; background: linear-gradient(135deg, rgba(182, 8, 201, 0.28) 0%, rgba(110, 193, 228, 0.2) 100%); text-shadow: 0 0 10px rgba(255, 255, 255, 0.35); }
.stp-ms-select__opt.is-current::before { opacity: 0.7; animation: stpMsNeonSpin 3s linear infinite; }
.stp-ms-select__opt.is-off { opacity: 0.55; text-decoration: line-through; }

/* Tablet (and a laptop with the chat sidebar open): the menu becomes a bar under the header, short titles. */
@media (min-width: 721px) and (max-width: 1100px) {
    .stp-ms-layout { display: block; }
    .stp-steps .stp-ms-nav { z-index: 20; max-height: none; overflow: visible; margin: 0 0 18px; padding: 8px; }
    .stp-steps .stp-ms-nav__eyebrow { display: none; }
    .stp-steps .stp-ms-nav__list { flex-flow: row wrap; gap: 4px; }
    .stp-steps .stp-ms-nav__list > li { flex: none; }
    .stp-steps .stp-ms-nav__link { margin: 0; padding: 8px 12px; white-space: nowrap; border-left: 0; }
    .stp-steps .stp-ms-nav__link[data-short] .stp-ms-nav__t { display: none; }
    .stp-steps .stp-ms-nav__link[data-short]::after { content: attr(data-short); }
    /* The bar sticks just under the site header (signed out) or under the floating corner buttons (signed in),
       and starts there too, so it never slides over the card at the top of the page. */
    /* sticks just under the stuck price bar (its top is set above from --stp-pricebar-b) */
}
@media (min-width: 721px) and (max-width: 1540px) {
    html.gend-uc-sidebar .stp-ms-layout { display: block; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav { z-index: 20; max-height: none; overflow: visible; margin: 0 0 18px; padding: 8px; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav__eyebrow { display: none; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav__list { flex-flow: row wrap; gap: 4px; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav__link { margin: 0; padding: 8px 12px; white-space: nowrap; border-left: 0; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav__link[data-short] .stp-ms-nav__t { display: none; }
    html.gend-uc-sidebar .stp-steps .stp-ms-nav__link[data-short]::after { content: attr(data-short); }
}
/* Phones: the dropdown. */
@media (max-width: 720px) {
    .stp-ms-layout { display: block; padding-top: 18px; }
    .stp-steps .stp-ms-nav { position: relative; top: auto; max-height: none; overflow: visible; margin: 0 0 16px; padding: 12px 10px 14px; }
    .stp-steps .stp-ms-nav__eyebrow { margin: 0 6px 10px; }
    .stp-steps .stp-ms-nav__list { display: none; }
    .stp-ms-select { display: flex; position: relative; perspective: 900px; }
}

/* ── Summary ─────────────────────────────────────────────────────────────── */
.stp-sum {
    max-width: 1100px;
    margin: clamp(24px, 4vh, 48px) auto 28px;
    padding: clamp(22px, 4vw, 52px);
    border-radius: 20px;
    background: var(--st-paper);
    color: var(--st-ink);
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
    font-family: var(--st-sans);
}
.stp-sum__head { margin: 0 0 18px; }
.stp-sum__k { display: block; margin: 0 0 10px; color: var(--st-gold); font: 700 11px/1 var(--st-sans); letter-spacing: 0.22em; text-transform: uppercase; }
.stp-steps .stp-sum__t { margin: 0 0 10px; padding: 0; border: 0; color: var(--st-ink); font: 400 clamp(26px, 3.4vw, 40px)/1.12 var(--st-serif); letter-spacing: -0.01em; }
.stp-sum__p { max-width: 70ch; margin: 0; color: #3b3934; font-size: 15px; line-height: 1.6; }
.stp-sum__before { margin: 22px calc(-1 * clamp(10px, 2vw, 24px)); }

.stp-sum__groups { margin-top: 8px; }
.stp-sum-ms { padding: 22px 0 18px; border-top: 1px solid #dcd8ce; }
.stp-sum-ms__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.stp-sum-ms__n { flex: none; color: var(--st-gold); font: 700 12px/1 var(--st-sans); letter-spacing: 0.08em; }
.stp-steps .stp-sum-ms__t { flex: 1 1 260px; min-width: 0; margin: 0; padding: 0; border: 0; font: 400 clamp(18px, 2vw, 22px)/1.25 var(--st-serif); color: var(--st-ink); }
.stp-steps .stp-sum-ms__t a { color: inherit; text-decoration: none; background: none; }
.stp-steps .stp-sum-ms__t a:hover { color: #7a6136; text-decoration: underline; text-decoration-color: var(--st-gold); text-underline-offset: 3px; }
.stp-sum-ms__tot { flex: none; color: var(--st-mute); font-size: 12.5px; }
.stp-sum-ms__tot b { color: var(--st-ink); font: 400 22px/1 var(--st-serif); font-variant-numeric: tabular-nums; }
.stp-sum-ms__off { display: none; padding: 4px 10px; border-radius: 100px; background: var(--st-ink); color: var(--st-paper); font: 700 10px/1.2 var(--st-sans); letter-spacing: 0.16em; text-transform: uppercase; }
.stp-sum-ms.is-off .stp-sum-ms__off { display: inline-block; }
.stp-sum-ms.is-off .stp-sum-ms__tot { display: none; }
.stp-sum-ms.is-off .stp-sum-rows { opacity: 0.5; }

.stp-steps .stp-sum-rows { list-style: none; margin: 12px 0 0; padding: 0; }
.stp-steps .stp-sum-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto minmax(120px, auto);
    grid-template-areas: "img name qty sum";
    align-items: center;
    gap: 6px 16px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e0d2;
    list-style: none;
    transition: opacity 0.2s ease;
}
.stp-steps .stp-sum-row:last-child { border-bottom: 0; }
.stp-steps .stp-sum-row::before, .stp-steps .stp-sum-row::marker { content: none; }
.stp-sum-row.is-zero { opacity: 0.5; }
.stp-sum-row__img { grid-area: img; width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: #ebe6da; }
.stp-sum-row__name { grid-area: name; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stp-steps .stp-sum-row__name a { color: var(--st-ink); font-size: 15px; font-weight: 500; line-height: 1.35; text-decoration: none; }
.stp-steps .stp-sum-row__name a:hover { color: #7a6136; text-decoration: underline; }
.stp-sum-row__name small { color: var(--st-mute); font-size: 12px; }
.stp-sum-row__qty { grid-area: qty; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; color: #3b3934; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stp-sum-row__sum { grid-area: sum; color: var(--st-ink); font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }

.stp-sum-step { display: inline-flex; align-items: center; gap: 6px; }
.stp-sum-step small { margin-right: 2px; color: var(--st-mute); font: 700 10px/1 var(--st-sans); letter-spacing: 0.12em; text-transform: uppercase; }
.stp-steps .stp-sum-step button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid #cfc8b6;
    border-radius: 50%;
    background: #fff;
    color: var(--st-ink);
    font: 600 16px/1 var(--st-sans);
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.stp-steps .stp-sum-step button:hover:not(:disabled) { border-color: var(--st-gold); background: #f0ecdf; }
.stp-steps .stp-sum-step button:disabled { opacity: 0.35; cursor: default; }
.stp-sum-step output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.stp-sum__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin-top: 18px;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 16px;
    background: var(--st-ink);
    color: var(--st-paper);
}
.stp-sum__total { display: flex; flex-direction: column; gap: 6px; }
.stp-sum__total-k { color: #c9ad78; font: 700 11px/1 var(--st-sans); letter-spacing: 0.22em; text-transform: uppercase; }
.stp-sum__foot .stp-template-purchase-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 6px 12px; margin: 0; padding: 0; background: none; border: 0; }
.stp-sum__foot .stp-template-total { color: #fff; font: 400 clamp(24px, 3vw, 34px)/1.1 var(--st-serif); text-shadow: none; }
.stp-sum__foot .stp-template-original-price { color: rgba(246, 244, 239, 0.5); font-size: 14px; text-decoration: line-through; }
.stp-sum__foot .stp-template-discount-badge { padding: 3px 8px; border-radius: 100px; font-size: 11px; }
.stp-sum__foot .stp-bill-then { display: block; flex-basis: 100%; color: var(--st-gold-l); font-size: 13px; }
.stp-sum__foot .stp-bill-then[hidden] { display: none !important; }
.stp-sum__cta { display: flex; align-items: center; }
.stp-sum__cta:has(#stp-signin) { flex: 1 1 100%; }
.stp-sum__cta #stp-signin { width: 100%; margin: 0; }
.stp-steps .stp-sum-pay {
    display: inline-block;
    min-height: 0;
    padding: 16px 34px !important;
    border: 0 !important;
    border-radius: 100px !important;
    background: linear-gradient(135deg, #e6cf9a, #a88b57) !important;
    color: var(--st-ink) !important;
    font: 800 13px/1.2 var(--st-sans) !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 14px 40px rgba(168, 139, 87, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stp-steps .stp-sum-pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 46px rgba(168, 139, 87, 0.5); }
.stp-steps .stp-sum-pay:disabled { opacity: 0.45; cursor: not-allowed; }
.stp-sum__cta .stp-proposal-pay-wrap { margin: 0; }

@media (max-width: 640px) {
    .stp-sum { margin: 16px 8px 20px; padding: 22px 16px; border-radius: 18px; }
    .stp-steps .stp-sum-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "img name sum" "img qty qty"; gap: 6px 12px; }
    .stp-sum-row__img { width: 40px; height: 40px; }
    .stp-sum-row__qty { justify-content: flex-start; }
    .stp-sum-row__sum { font-size: 12.5px; }
    .stp-sum__foot { flex-direction: column; align-items: stretch; }
    .stp-sum__cta { justify-content: stretch; }
    .stp-steps .stp-sum-pay { width: 100%; text-align: center; }
}
