/* Frontend Proposal Styles */
.stp-frontend-proposal {
    margin-top: 30px;
    font-family: inherit;
}

.stp-milestone-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stp-milestone-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.stp-milestone-title {
    font-size: 1.5em;
    margin: 0 0 10px 0;
    color: #333;
}

.stp-milestone-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

.stp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stp-product-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stp-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.stp-product-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    background: #e1e1e1;
}

.stp-product-details {
    flex: 1;
}

.stp-product-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
    display: block;
    text-decoration: none;
}

.stp-product-price-qty {
    font-size: 0.9em;
    color: #777;
    display: flex;
    gap: 10px;
    align-items: center;
}

.stp-qty-badge {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.stp-order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    float: right;
}

.stp-status-pending {
    background: #fff3cd;
    color: #856404;
}

.stp-status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.stp-status-completed {
    background: #d4edda;
    color: #155724;
}

.stp-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .stp-milestone-card {
        padding: 15px;
    }

    .stp-milestone-title {
        font-size: 1.3em;
    }
}

/* ── Payment Status Banner ── */
.stp-payment-status-banner {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 12px 20px;
    margin-bottom: 24px;
    border-radius: 6px;
    border: 1px solid transparent;
}

/* Offset for WordPress admin bar */
.admin-bar .stp-payment-status-banner {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .stp-payment-status-banner {
        top: 46px;
    }
}

.stp-banner-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.stp-banner-title {
    font-weight: 700;
    font-size: 1em;
    white-space: nowrap;
}

.stp-banner-title::after {
    content: ' —';
    font-weight: 400;
    opacity: 0.6;
}

.stp-banner-message {
    flex: 1;
    font-size: 0.95em;
    min-width: 0;
}

.stp-banner-action {
    margin-left: auto;
    flex-shrink: 0;
}

.stp-banner-action .stp-banner-pay-btn {
    white-space: nowrap;
}

/* Banner state colours */
.stp-banner-needs_payment {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.stp-banner-processing {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.stp-banner-completed {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.stp-banner-on_hold {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

@media (max-width: 600px) {
    .stp-payment-status-banner {
        padding: 10px 14px;
    }

    .stp-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stp-banner-action {
        margin-left: 0;
        width: 100%;
    }

    .stp-banner-action .stp-pay-btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Product Actions & Modals ── */
.stp-product-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.stp-action-btn {
    background: rgba(46, 125, 255, 0.08);
    color: #2e7dff;
    border: 1px solid rgba(46, 125, 255, 0.2);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stp-action-btn:hover {
    background: rgba(46, 125, 255, 0.15);
    border-color: rgba(46, 125, 255, 0.3);
}

/* ── Base product modal (used by Add Info) ── */
.stp-product-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background: #fff;
    color: #333;
}

/* ── Full-width "What" modal ── */
.stp-product-modal--full {
    max-width: 85vw !important;
    width: 85vw !important;
    height: 88vh !important;
    max-height: 88vh !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

.stp-product-modal::backdrop,
.stp-product-modal--full::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.stp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 14px 14px 0 0;
    flex-shrink: 0;
}

.stp-modal-header-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stp-modal-header h4 {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
    color: #222;
}

.stp-modal-product-link {
    font-size: 0.78em;
    color: #2e7dff;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.stp-modal-product-link:hover { opacity: 1; }

.stp-modal-subtitle {
    margin: 4px 0 0;
    font-size: 0.85em;
    color: #888;
    font-weight: 400;
}

.stp-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 5px;
    flex-shrink: 0;
}

.stp-modal-close:hover { color: #ff4757; }

/* Standard modal content (Add Info) */
.stp-modal-content {
    padding: 25px;
    font-size: 1em;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
}

.stp-modal-content p:last-child { margin-bottom: 0; }

.stp-modal-content table {
    width: 100%;
    border-collapse: collapse;
}

.stp-modal-content th, .stp-modal-content td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

/* Iframe modal content (What) */
.stp-modal-content--iframe {
    padding: 0 !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    height: 0 !important; /* flex will stretch it; explicit 0 forces flex to own the height */
    overflow: hidden !important;
    position: relative !important;
    border-radius: 0 0 14px 14px !important;
}

.stp-iframe-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.stp-spinner {
    animation: stpSpin 0.9s linear infinite;
    color: #2e7dff;
}

@keyframes stpSpin {
    to { transform: rotate(360deg); }
}

.stp-what-iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute !important;
    inset: 0 !important;
}

@media (max-width: 768px) {
    .stp-product-modal--full {
        max-width: 96vw !important;
        width: 96vw !important;
        height: 92vh !important;
        max-height: 92vh !important;
    }
}

/* ── Template Purchase Section ── */
/* ── Sticky template purchase bar ── */
.stp-template-purchase-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #f0f6ff 0%, #fafafa 100%);
    border: 1px solid #d0e4ff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
/* Offset for WordPress admin bar */
.admin-bar .stp-template-purchase-wrap {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .stp-template-purchase-wrap {
        top: 46px;
    }
}

.stp-template-purchase-wrap.stp-login-required {
    background: #f9f9f9;
    border-color: #e0e0e0;
    flex-direction: column;
    align-items: flex-start;
}

.stp-template-purchase-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stp-template-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95em;
}

.stp-template-discount-badge {
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8em;
    font-weight: 700;
}

.stp-template-total {
    font-size: 1.5em;
    font-weight: 700;
    color: #1a1a2e;
}

.stp-template-buy-btn {
    white-space: nowrap;
    padding: 10px 22px;
    font-size: 1em;
}

/* ── Task Template Badge (in admin milestone assignments) ── */
.stp-task-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75em;
    color: #22c55e;
    font-weight: 600;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════
   Dark Glassy Milestone Cards — v2 (page-load animations)
   ══════════════════════════════════════════════════════════ */

:root {
    --milestone-blue:    #89C2E0;
    --milestone-magenta: #b608c9;
    --glass-bg:          rgba(255, 255, 255, 0.02);
    --glass-border:      rgba(255, 255, 255, 0.1);
    --obsidian:          #0b0e14;
}

/* ── Animatable CSS custom property for spinning border ── */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ── Page-load entrance keyframes ── */
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes introEnter {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes productEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Animated 3D border spin (activates on hover) ── */
@keyframes borderSpin {
    to { --border-angle: 360deg; }
}

/* ══ Milestone Card ══ */
.stp-milestone-card {
    position: relative;
    isolation: isolate;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e8eaf0;
    overflow: hidden;
    /* Page-load entrance — stagger by --card-index */
    animation: cardEnter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-index, 0) * 0.15s);
    will-change: transform, opacity;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

/* ── Rotating gradient border via ::before — shows on hover ── */
.stp-milestone-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: conic-gradient(
        from var(--border-angle),
        var(--milestone-magenta),
        var(--milestone-blue),
        var(--milestone-magenta)
    );
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderSpin 3s linear infinite paused;
    pointer-events: none;
}

/* ── Glass overlay ::after — sits above ::before, applies dark filter over the animation ── */
/*    backdrop-filter here samples everything below it in the same stacking context,          */
/*    including ::before, putting the spinning border visually under the frosted glass.       */
.stp-milestone-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 23px;
    z-index: 2;
    pointer-events: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
}

/* ── Hover: 3D tilt + border + glass filter over the animation ── */
.stp-milestone-card:hover {
    border-color: rgba(137, 194, 224, 0.3);
    transform: perspective(1000px) rotateX(-2deg) translateY(-5px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(137, 194, 224, 0.2),
        0 0 50px rgba(137, 194, 224, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Spinning border becomes visible */
.stp-milestone-card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

/* Glass overlay activates — dark frosted pane filters ::before and page content alike */
.stp-milestone-card:hover::after {
    background: rgba(11, 14, 20, 0.78);
    backdrop-filter: blur(28px) saturate(180%) brightness(0.68);
    -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(0.68);
}

/* ══ Milestone Intro Section (title + description — distinct dark styling) ══ */
.stp-milestone-intro {
    position: relative;
    z-index: 3; /* above ::after glass overlay */
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 28px 28px 22px;
    background: linear-gradient(135deg, rgba(182, 8, 201, 0.07) 0%, rgba(11, 14, 20, 0.55) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    /* Entrance: slide from left after card appears */
    animation: introEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-index, 0) * 0.15s + 0.12s);
}

/* Step-number badge */
.stp-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--milestone-magenta) 0%, rgba(182, 8, 201, 0.45) 100%);
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 20px rgba(182, 8, 201, 0.5);
    border: 1px solid rgba(182, 8, 201, 0.3);
    letter-spacing: 0.02em;
}

.stp-milestone-intro-content {
    flex: 1;
    min-width: 0;
}

.stp-milestone-title {
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--milestone-blue);
    margin: 0 0 8px 0;
    text-shadow: 0 0 20px rgba(137, 194, 224, 0.3);
}

.stp-milestone-description {
    color: rgba(232, 234, 240, 0.72);
    font-size: 0.97em;
    line-height: 1.65;
}

.stp-milestone-description p { margin: 0 0 0.5em 0; }
.stp-milestone-description p:last-child { margin-bottom: 0; }

/* ══ Products Section (visually distinct from intro) ══ */
.stp-milestone-products-wrap {
    position: relative;
    z-index: 3; /* above ::after glass overlay */
    padding: 20px 28px 26px;
    background: rgba(255, 255, 255, 0.012);
}

/* Products grid */
.stp-products-grid {
    gap: 14px;
    margin-top: 0;
}

/* ══ Product Cards ══ */
.stp-product-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px;
    color: #e8eaf0;
    /* Page-load entrance: stagger by card + product indices */
    animation: productEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(
        var(--card-index, 0) * 0.15s
        + var(--product-index, 0) * 0.08s
        + 0.28s
    );
    will-change: transform, opacity;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.stp-product-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(137, 194, 224, 0.3);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(137, 194, 224, 0.15);
}

.stp-product-name {
    color: #c8dff0;
    font-weight: 600;
    font-size: 1em;
}

.stp-product-name:hover {
    color: var(--milestone-blue);
}

.stp-product-price-qty {
    color: rgba(232, 234, 240, 0.65);
    font-size: 0.85em;
}

.stp-qty-badge {
    background: rgba(182, 8, 201, 0.18);
    color: #d88ce0;
    border: 1px solid rgba(182, 8, 201, 0.25);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.82em;
    font-weight: 600;
}

.stp-action-btn {
    background: rgba(137, 194, 224, 0.08);
    color: var(--milestone-blue);
    border: 1px solid rgba(137, 194, 224, 0.2);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stp-action-btn:hover {
    background: rgba(137, 194, 224, 0.15);
    border-color: rgba(137, 194, 224, 0.4);
    color: #b0d9ef;
}

/* Milestone-level pay button area */
.stp-milestone-pay-wrap {
    position: relative;
    z-index: 3; /* above ::after glass overlay */
    padding: 0 28px 20px;
}

/* ── Sticky purchase bar dark variant ── */
.stp-template-purchase-wrap {
    background: rgba(11, 14, 20, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(137, 194, 224, 0.2);
    border-radius: 12px;
    color: #e8eaf0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.stp-template-total {
    color: var(--milestone-blue);
    text-shadow: 0 0 18px rgba(137, 194, 224, 0.4);
}

.stp-template-original-price {
    color: rgba(232, 234, 240, 0.45);
}

.stp-template-discount-badge {
    background: rgba(182, 8, 201, 0.2);
    color: #d88ce0;
    border: 1px solid rgba(182, 8, 201, 0.3);
}

/* ── Credit Payment Widget (inside task-checkout modal) ── */
.stp-credit-widget {
    background: rgba(137, 194, 224, 0.05);
    border: 1px solid rgba(137, 194, 224, 0.15);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stp-credit-balance-row,
.stp-credit-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
}

.stp-credit-balance-label,
.stp-credit-cost-label {
    color: rgba(232, 234, 240, 0.65);
}

.stp-credit-balance-value {
    font-weight: 700;
    color: #89C2E0;
}

.stp-credit-cost-value {
    font-weight: 700;
    color: #d88ce0;
}

.stp-pay-credits-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    margin-top: 4px;
}

.stp-credit-shortage {
    font-size: 0.9em;
    color: #ffc107;
    margin: 0;
    padding: 8px 0 4px;
}

.stp-credit-result {
    text-align: center;
    font-weight: 600;
    color: #22c55e;
    padding: 8px 0;
}

/* ── IntersectionObserver trigger script (inline, via PHP) ── */

/* Purchase bar: price centred above the Accept Proposal button */
.stp-template-purchase-wrap,
.stp-template-purchase-wrap.stp-login-required {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.stp-template-purchase-summary {
    justify-content: center;
}

/* Logged-out visitors: sign-in card in place of the purchase bar */
.stp-template-purchase-wrap.stp-login-required {
    position: relative;
    top: auto;
    padding: 44px 24px 36px;
    gap: 24px;
    background: radial-gradient(640px 260px at 50% 0%, rgba(182, 8, 201, 0.16), transparent 70%), rgba(11, 14, 20, 0.92);
    border: 1px solid rgba(137, 194, 224, 0.2);
    border-radius: 20px;
    color: #e8eaf0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.stp-template-purchase-wrap.stp-login-required .stp-login-head {
    max-width: 520px;
}
.stp-template-purchase-wrap.stp-login-required .stp-login-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-family: Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #e06bff;
}
.stp-template-purchase-wrap.stp-login-required .stp-login-title {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.2;
    color: #fff;
}
.stp-template-purchase-wrap.stp-login-required .stp-login-sub {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #aab4bf;
}
.stp-template-purchase-wrap.stp-login-required form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 0;
    text-align: left;
}
.stp-template-purchase-wrap.stp-login-required form p {
    margin: 0;
}
.stp-template-purchase-wrap.stp-login-required form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #c9d1d9;
}
.stp-template-purchase-wrap.stp-login-required input[type="text"],
.stp-template-purchase-wrap.stp-login-required input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stp-template-purchase-wrap.stp-login-required input[type="text"]:focus,
.stp-template-purchase-wrap.stp-login-required input[type="password"]:focus {
    border-color: #6ec1e4;
    box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.2);
}
.stp-template-purchase-wrap.stp-login-required .login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0;
    font-size: 0.88rem;
    color: #aab4bf;
    cursor: pointer;
}
.stp-template-purchase-wrap.stp-login-required .login-remember input {
    accent-color: #b608c9;
}
.stp-template-purchase-wrap.stp-login-required .login-submit input[type="submit"] {
    width: 100%;
    margin: 4px 0 0;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #b608c9 0%, #6ec1e4 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(182, 8, 201, 0.35);
    transition: filter 0.15s, transform 0.15s;
}
.stp-template-purchase-wrap.stp-login-required .login-submit input[type="submit"]:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.stp-template-purchase-wrap.stp-login-required .stp-login-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0;
    font-size: 0.88rem;
    color: #6b7682;
}
.stp-template-purchase-wrap.stp-login-required .stp-login-links a {
    color: #6ec1e4;
    text-decoration: none;
}
.stp-template-purchase-wrap.stp-login-required .stp-login-links a:hover {
    text-decoration: underline;
}

/* GIF product images: the media optimiser serves them as <video> without
   the stp-product-image class, so size them like the other thumbnails. */
.stp-product-card > video,
.stp-product-card > picture > video {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    background: #e1e1e1;
}

/* The "What" modal's display:flex !important also applied to closed
   dialogs, so they showed through the page. Only open ones display. */
.stp-product-modal:not([open]),
.stp-product-modal--full:not([open]) {
    display: none !important;
}

/* ══ Milestone total + product tiles (2026-11-07) ══
   Each product is one tile (image + name + credit count) that opens the
   "What" popup; the unit name shows once, on the milestone total. */
.stp-milestone-intro {
    flex-wrap: wrap;
}
.stp-milestone-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(137, 194, 224, 0.06);
    border: 1px solid rgba(137, 194, 224, 0.18);
    text-align: right;
}
.stp-milestone-total-label {
    font-family: Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(232, 234, 240, 0.55);
}
.stp-milestone-total-was {
    font-size: 0.8em;
    color: rgba(232, 234, 240, 0.4);
}
.stp-milestone-total-value {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 16px rgba(137, 194, 224, 0.35);
}
@media (max-width: 640px) {
    .stp-milestone-total {
        box-sizing: border-box;
        align-items: flex-start;
        width: 100%;
        min-width: 0;
        margin-left: 0;
        text-align: left;
    }
    .stp-milestone-total-value {
        overflow-wrap: anywhere;
    }
}

.stp-milestone-products-wrap .stp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin: 0;
}
.stp-products-grid .stp-product-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8eaf0;
    text-decoration: none !important;
    cursor: pointer;
}
.stp-products-grid .stp-product-tile:hover,
.stp-products-grid .stp-product-tile:focus-visible {
    border-color: rgba(137, 194, 224, 0.45);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(137, 194, 224, 0.18);
    outline: none;
}
.stp-tile-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0b0e14;
}
.stp-tile-media picture {
    display: block;
    width: 100%;
    height: 100%;
}
.stp-tile-media img,
.stp-tile-media video {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    border-radius: 0 !important;
    background: none !important;
    transition: transform 0.4s ease;
}
.stp-product-tile:hover .stp-tile-media img,
.stp-product-tile:hover .stp-tile-media video {
    transform: scale(1.05);
}
.stp-tile-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(transparent, rgba(11, 14, 20, 0.65));
    pointer-events: none;
}
.stp-tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
}
.stp-tile-name {
    font-size: 0.98em;
    font-weight: 600;
    line-height: 1.35;
    color: #e8f1f8;
}
.stp-product-tile:hover .stp-tile-name {
    color: var(--milestone-blue);
}
.stp-tile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.stp-tile-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(137, 194, 224, 0.12);
    border: 1px solid rgba(137, 194, 224, 0.28);
    color: var(--milestone-blue);
    font-size: 0.9em;
    font-weight: 700;
}

@media (max-width: 640px) {
    .stp-milestone-products-wrap .stp-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .stp-tile-body {
        gap: 10px;
        padding: 12px;
    }
    .stp-tile-name {
        font-size: 0.9em;
    }
}

/* ══ Milestones — editorial edition (2026-11-07) ══
   Matches the group Business Plan and Brand Style Guide: warm paper
   chapters, serif display type, gold numerals and hairline rules. */
.stp-frontend-proposal {
    --ed-paper: #f6f4ef;
    --ed-ink: #0e0f12;
    --ed-body: #3b3934;
    --ed-mute: #6d6a63;
    --ed-line: #dcd8ce;
    --ed-gold: #a88b57;
    --ed-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --ed-sans: Inter, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
.stp-milestone-card.stp-ms-editorial {
    margin-bottom: 28px;
    overflow: hidden;
    background: var(--ed-paper);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: var(--ed-ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}
.stp-milestone-card.stp-ms-editorial::before,
.stp-milestone-card.stp-ms-editorial::after {
    display: none;
}
.stp-milestone-card.stp-ms-editorial:hover {
    transform: none;
    border-color: rgba(168, 139, 87, 0.45);
    box-shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.95);
}

/* Header: number, title and total on one row */
.stp-ms-editorial .stp-milestone-intro {
    display: block;
    padding: 44px 52px 0;
    background: none;
    border-bottom: 0;
}
.stp-ms-editorial .stp-ms-head {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.stp-ms-editorial .stp-step-badge {
    width: auto;
    height: auto;
    padding-top: 14px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--ed-gold);
    font-family: var(--ed-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
}
.stp-ms-editorial .stp-milestone-intro-content {
    flex: 1;
    min-width: 0;
}
.stp-ms-editorial .stp-milestone-title {
    margin: 0;
    font-family: var(--ed-serif);
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: none;
    text-shadow: none;
    color: var(--ed-ink);
}
.stp-ms-editorial .stp-milestone-total {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-items: flex-end;
    gap: 4px;
    margin-left: auto;
    padding: 0 0 0 28px;
    background: none;
    border: 0;
    border-left: 1px solid var(--ed-line);
    border-radius: 0;
    text-align: right;
}
.stp-ms-editorial .stp-milestone-total-label {
    font-family: var(--ed-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ed-gold);
}
.stp-ms-editorial .stp-milestone-total-figure {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.stp-ms-editorial .stp-milestone-total-was {
    font-family: var(--ed-serif);
    font-size: 1.15rem;
    color: var(--ed-mute);
}
.stp-ms-editorial .stp-milestone-total-num {
    font-family: var(--ed-serif);
    font-size: 2.7rem;
    line-height: 1;
    color: var(--ed-ink);
}
.stp-ms-editorial .stp-milestone-total-unit {
    max-width: 230px;
    font-family: var(--ed-sans);
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ed-mute);
}

/* Description: full width below the header row */
.stp-ms-editorial .stp-milestone-description {
    margin: 26px 0 0;
    padding: 22px 0 30px;
    border-top: 1px solid var(--ed-line);
    border-bottom: 1px solid var(--ed-line);
    font-family: var(--ed-serif);
    font-size: 1.14rem;
    line-height: 1.7;
    color: var(--ed-body);
}
.stp-ms-editorial .stp-milestone-description a {
    color: #6D5C7B;
}

/* Included services */
.stp-ms-editorial .stp-milestone-products-wrap {
    padding: 30px 52px 48px;
    background: none;
}
.stp-ms-editorial .stp-milestone-products-wrap::before {
    content: "Included services";
    display: block;
    margin: 0 0 18px;
    font-family: var(--ed-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ed-gold);
}
.stp-ms-editorial .stp-milestone-products-wrap .stp-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}
.stp-ms-editorial .stp-products-grid .stp-product-tile {
    background: #fff;
    border: 1px solid var(--ed-line);
    border-radius: 12px;
    color: var(--ed-ink);
    box-shadow: none;
}
.stp-ms-editorial .stp-products-grid .stp-product-tile:hover,
.stp-ms-editorial .stp-products-grid .stp-product-tile:focus-visible {
    transform: translateY(-3px);
    border-color: var(--ed-gold);
    box-shadow: 0 20px 38px -24px rgba(14, 15, 18, 0.5);
}
.stp-ms-editorial .stp-tile-media {
    background: #e9e6de;
}
.stp-ms-editorial .stp-tile-media::after {
    display: none;
}
.stp-ms-editorial .stp-tile-body {
    gap: 14px;
    padding: 16px 18px 18px;
}
.stp-ms-editorial .stp-tile-name,
.stp-ms-editorial .stp-product-tile:hover .stp-tile-name {
    font-family: var(--ed-serif);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ed-ink);
}
.stp-ms-editorial .stp-tile-meta {
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--ed-line);
}
.stp-ms-editorial .stp-tile-meta::after {
    content: "Details \2192";
    margin-left: auto;
    font-family: var(--ed-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ed-gold);
}
.stp-ms-editorial .stp-tile-price {
    min-width: 0;
    height: auto;
    padding: 0;
    background: none;
    border: 0;
    font-family: var(--ed-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--ed-ink);
}
.stp-ms-editorial .stp-qty-badge {
    padding: 2px 9px;
    background: none;
    border: 1px solid var(--ed-line);
    border-radius: 999px;
    color: var(--ed-mute);
    font-family: var(--ed-sans);
}
.stp-ms-editorial .stp-milestone-pay-wrap {
    padding: 0 52px 44px;
}

@media (max-width: 640px) {
    .stp-ms-editorial .stp-milestone-intro {
        padding: 30px 22px 0;
    }
    .stp-ms-editorial .stp-ms-head {
        flex-wrap: wrap;
        gap: 12px;
    }
    .stp-ms-editorial .stp-step-badge {
        padding-top: 9px;
    }
    .stp-ms-editorial .stp-milestone-total {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        width: 100%;
        margin: 6px 0 0;
        padding: 14px 0 0;
        border-left: 0;
        border-top: 1px solid var(--ed-line);
        text-align: left;
    }
    .stp-ms-editorial .stp-milestone-total-unit {
        flex-basis: 100%;
        max-width: none;
    }
    .stp-ms-editorial .stp-milestone-total-num {
        font-size: 2.1rem;
    }
    .stp-ms-editorial .stp-milestone-description {
        font-size: 1.02rem;
    }
    .stp-ms-editorial .stp-milestone-products-wrap {
        padding: 24px 22px 32px;
    }
    .stp-ms-editorial .stp-milestone-products-wrap .stp-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .stp-ms-editorial .stp-tile-body {
        gap: 10px;
        padding: 12px;
    }
    .stp-ms-editorial .stp-tile-name,
    .stp-ms-editorial .stp-product-tile:hover .stp-tile-name {
        font-size: 0.98rem;
    }
    .stp-ms-editorial .stp-tile-meta::after {
        content: "\2192";
    }
    .stp-ms-editorial .stp-milestone-pay-wrap {
        padding: 0 22px 30px;
    }
}

/* ══ Product "What" popup: one slim header line (2026-11-07) ══
   Editorial bar to match the milestones: serif name, gold link, close. */
.stp-product-modal--full {
    background: #0b0e14 !important;
    border: 1px solid rgba(168, 139, 87, 0.35) !important;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9) !important;
}
.stp-modal-header.stp-modal-bar {
    gap: 18px;
    min-height: 0;
    padding: 10px 14px 10px 22px;
    background: #0e0f12;
    border-bottom: 1px solid rgba(168, 139, 87, 0.3);
}
.stp-modal-bar .stp-modal-bar-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.4;
    color: #f6f4ef;
}
.stp-modal-bar .stp-modal-product-link {
    flex-shrink: 0;
    font-family: Inter, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #a88b57;
    opacity: 1;
}
.stp-modal-bar .stp-modal-product-link:hover {
    color: #c9ad78;
}
.stp-modal-bar .stp-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(246, 244, 239, 0.14);
    border-radius: 50%;
    font-size: 18px;
    color: rgba(246, 244, 239, 0.7);
}
.stp-modal-bar .stp-modal-close:hover {
    border-color: #a88b57;
    color: #f6f4ef;
}
/* showModal() focuses the first control: no ring unless it came from the keyboard */
.stp-modal-bar a:focus:not(:focus-visible),
.stp-modal-bar button:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}
.stp-product-modal--full .stp-iframe-loading {
    background: #0b0e14;
}
.stp-product-modal--full .stp-spinner {
    color: #a88b57;
}
@media (max-width: 640px) {
    .stp-modal-bar .stp-modal-product-link {
        font-size: 0;
        letter-spacing: 0;
    }
    .stp-modal-bar .stp-modal-product-link::after {
        content: "\2197";
        font-size: 15px;
    }
}

/* ── Price + Accept bar under the slide show, on top for the whole page (2026-11-10) ── */
.stp-buybar {
    position: sticky;
    top: 12px;
    z-index: 990;
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 14px auto 26px;
}
.stp-buybar .stp-template-purchase-wrap {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0;
    padding: 8px 8px 8px 22px;
    border-radius: 100px;
    background: rgba(14, 15, 18, 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(246, 244, 239, 0.16);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
    text-align: left;
}
.stp-buybar .stp-template-purchase-summary { flex-wrap: nowrap; gap: 9px; justify-content: flex-start; white-space: nowrap; }
.stp-buybar .stp-template-original-price { font-size: 0.78rem; }
.stp-buybar .stp-template-discount-badge { font-size: 0.68rem; padding: 2px 7px; border-radius: 100px; }
.stp-buybar .stp-template-total { font-size: 1.02rem; font-weight: 700; text-shadow: none; }
.stp-buybar .aas-task-checkout { display: block; margin: 0; }
.stp-buybar .stp-template-buy-btn,
.stp-buybar a.stp-template-buy-btn {
    display: inline-block;
    padding: 11px 24px !important;
    border-radius: 100px !important;
    font-size: 0.74rem !important;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    min-height: 0;
    box-shadow: none;
}
#stp-signin { scroll-margin-top: 90px; }
/* Signed-out: below the fixed site header (#main-3d-header; height set by the bar's script, 2026-11-19). */
body.not-logged-in .stp-buybar { top: calc(var(--stp-hdr, 72px) + 10px); }
body.not-logged-in #stp-signin { scroll-margin-top: calc(var(--stp-hdr, 72px) + 90px); }
@media (max-width: 700px) {
    /* below the floating logo and menu buttons in the top corners */
    .stp-buybar { top: 78px; max-width: calc(100% - 16px); margin: 10px auto 18px; }
    .stp-buybar .stp-template-purchase-wrap { gap: 10px; padding: 6px 6px 6px 16px; }
    .stp-buybar .stp-template-original-price { display: none; }
    .stp-buybar .stp-template-total { font-size: 0.86rem; }
    .stp-buybar .stp-template-buy-btn,
    .stp-buybar a.stp-template-buy-btn { padding: 10px 16px !important; font-size: 0.66rem !important; letter-spacing: 0.1em; }
}

/* Phones: the pill fills the width, the price wraps to two short lines, the button never gets cut off */
@media (max-width: 700px) {
    .stp-buybar { width: auto; left: 0; right: 0; margin-left: 8px; margin-right: 8px; max-width: none; }
    .stp-buybar .stp-template-purchase-wrap { width: 100%; justify-content: space-between; border-radius: 22px; padding: 7px 7px 7px 14px; }
    .stp-buybar .stp-template-purchase-summary { min-width: 0; flex: 1 1 auto; flex-wrap: wrap; row-gap: 0; white-space: normal; }
    .stp-buybar .stp-template-discount-badge { display: none; }
    .stp-buybar .stp-template-total { font-size: 0.8rem; line-height: 1.25; white-space: normal; }
    .stp-buybar .aas-task-checkout { flex: 0 0 auto; }
    .stp-buybar, .stp-buybar * { box-sizing: border-box; }
    .stp-buybar .stp-template-purchase-wrap { gap: 8px; min-width: 0; overflow: hidden; }
    .stp-buybar .stp-template-buy-btn, .stp-buybar a.stp-template-buy-btn { padding: 10px 14px !important; letter-spacing: 0.08em; }
}

/* ── Formal milestone description (2026-11-10): editorial layout inside the paper milestone card ── */
.stp-ms-editorial .stp-milestone-description:has(.stp-msd) {
    padding: 34px 0 36px;
    font-size: 1rem;
}
.stp-msd { counter-reset: none; }
.stp-msd p { margin: 0; }
.stp-msd .stp-msd-lede {
    position: relative;
    max-width: 62ch;
    padding-left: 26px;
    font-family: var(--ed-serif);
    font-size: 1.32rem;
    line-height: 1.6;
    color: var(--ed-ink);
}
.stp-msd .stp-msd-lede::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #c9ad78, #a88b57 60%, rgba(168, 139, 87, 0.15));
}
.stp-msd .stp-msd-lede::first-letter {
    float: left;
    margin: 6px 12px 0 0;
    font-size: 3.6em;
    line-height: 0.82;
    font-weight: 700;
    color: var(--ed-gold);
}
.stp-msd-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    gap: 26px;
    margin-top: 30px;
}
.stp-msd .stp-msd-k {
    margin-bottom: 14px;
    font-family: var(--ed-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ed-gold);
}
.stp-msd-col {
    padding: 26px 28px;
    border: 1px solid var(--ed-line);
    border-radius: 16px;
    background: #fbfaf6;
    box-shadow: 0 18px 40px -30px rgba(14, 15, 18, 0.45);
}
.stp-msd-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.stp-msd-list li {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 13px 0;
    border-top: 1px solid var(--ed-line);
    font-family: var(--ed-serif);
    font-size: 1.06rem;
    line-height: 1.5;
    color: var(--ed-ink);
}
.stp-msd-list li:first-child { border-top: 0; padding-top: 2px; }
.stp-msd-list .stp-msd-n {
    flex: 0 0 auto;
    min-width: 30px;
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ed-gold);
}
.stp-msd-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
    background: linear-gradient(160deg, #0e0f12, #1a1b21);
    border-color: rgba(201, 173, 120, 0.35);
    color: #f6f4ef;
}
.stp-msd-side .stp-msd-item + .stp-msd-item {
    padding-top: 22px;
    border-top: 1px solid rgba(246, 244, 239, 0.14);
}
.stp-msd-side .stp-msd-k { color: #e6cf9a; }
.stp-msd-side p:not(.stp-msd-k) {
    font-family: var(--ed-serif);
    font-size: 1.04rem;
    line-height: 1.55;
    color: #e9e5dc;
}
.stp-msd .stp-msd-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    margin-top: 24px;
    font-family: var(--ed-serif);
    font-style: italic;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ed-mute);
}
.stp-msd .stp-msd-note span {
    font-family: var(--ed-sans);
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ed-gold);
}
@media (max-width: 860px) {
    .stp-msd-grid { grid-template-columns: 1fr; gap: 16px; }
    .stp-msd .stp-msd-lede { font-size: 1.14rem; padding-left: 18px; }
    .stp-msd-col { padding: 20px 18px; }
}

/* ── Monthly plans (ST_Proposal_Billing, 2026-11-11) ─────────────────────────── */
.stp-buybar .stp-bill-then { font-size: 0.78rem; color: #e6cf9a; white-space: nowrap; }
.stp-buybar .stp-bill-then b { font-weight: 500; opacity: 0.75; margin-right: 2px; }
.stp-template-purchase-summary .stp-bill-then { font-size: 0.86rem; color: #e6cf9a; }
.stp-ms-cadence { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 100px; font-family: var(--ed-sans, Inter, system-ui, sans-serif); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #8d897f; border: 1px solid rgba(141, 137, 127, 0.45); }
.stp-ms-cadence.is-monthly { color: #0e0f12; background: #c9ad78; border-color: #c9ad78; }
.stp-bill { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 22px; align-items: center; max-width: 1180px; margin: 22px auto; padding: 22px 26px; border-radius: 18px; background: linear-gradient(160deg, #15161b, #0e0f12); border: 1px solid rgba(201, 173, 120, 0.35); color: #f6f4ef; font-family: Inter, system-ui, sans-serif; box-sizing: border-box; }
.stp-bill__ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(201, 173, 120, 0.14); border: 1px solid rgba(201, 173, 120, 0.4); }
.stp-bill__ico svg { width: 26px; height: 26px; fill: none; stroke: #e6cf9a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stp-bill__k { display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: #c9ad78; }
.stp-bill__chip { font-style: normal; margin-left: 8px; padding: 2px 9px; border-radius: 100px; letter-spacing: 0.12em; background: rgba(143, 240, 164, 0.14); color: #8ff0a4; }
.stp-bill.is-past_due .stp-bill__chip { background: rgba(255, 209, 102, 0.16); color: #ffd166; }
.stp-bill.is-paused .stp-bill__chip, .stp-bill.is-cancelled .stp-bill__chip { background: rgba(246, 244, 239, 0.1); color: #c9c5bb; }
.stp-bill h3 { margin: 6px 0 6px; font-family: "Playfair Display", Georgia, serif !important; font-size: clamp(1.15rem, 2.2vw, 1.5rem) !important; line-height: 1.25; color: #f6f4ef !important; }
.stp-bill p { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.6; color: #c9c5bb; }
.stp-bill__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; }
.stp-bill__facts div { min-width: 0; }
.stp-bill__facts dt { font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8d897f; }
.stp-bill__facts dd { margin: 2px 0 0; font-weight: 700; color: #f6f4ef; }
.stp-bill__acts { display: flex; flex-direction: column; gap: 8px; }
.stp-bill__btn { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 11px 18px; border-radius: 100px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: #0e0f12 !important; background: #c9ad78; }
.stp-bill__btn:hover { background: #e6cf9a; }
.stp-bill__btn.is-ghost { color: #f6f4ef !important; background: transparent; border: 1px solid rgba(246, 244, 239, 0.25); }
.stp-bill__btn.is-ghost:hover { border-color: rgba(246, 244, 239, 0.6); }
.stp-bill__btn[disabled] { opacity: 0.55; cursor: progress; }
.stp-bill__msg { color: #8ff0a4 !important; }
.stp-bill__msg.is-err { color: #ff9a7b !important; }
@media (max-width: 760px) {
    .stp-bill { grid-template-columns: 1fr; padding: 20px 18px; margin: 16px; }
    .stp-bill__ico { width: 46px; height: 46px; }
    .stp-bill__acts { flex-direction: row; flex-wrap: wrap; }
    .stp-bill__btn { flex: 1 1 160px; }
    .stp-buybar .stp-bill-then { display: block; font-size: 0.72rem; }
}

/* ── Build your plan (ST_Proposal_Builder, 2026-11-11) ───────────────────────── */
.stp-pbs { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 22px 32px; max-width: 1180px; margin: 22px auto; padding: 26px 28px; border-radius: 18px; background: linear-gradient(160deg, #15161b, #0e0f12); border: 1px solid rgba(201, 173, 120, 0.4); color: #f6f4ef; font-family: Inter, system-ui, sans-serif; box-sizing: border-box; scroll-margin-top: 90px; }
.stp-pbs__k { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: #c9ad78; }
.stp-pbs h3 { margin: 6px 0 8px; font-family: "Playfair Display", Georgia, serif !important; font-size: clamp(1.3rem, 2.4vw, 1.8rem) !important; line-height: 1.2; color: #f6f4ef !important; }
.stp-pbs p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: #c9c5bb; }
.stp-pbs__side { display: flex; flex-direction: column; gap: 10px; }
.stp-pbs__bill { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 100px; border: 1px solid rgba(246, 244, 239, 0.15); background: #0e0f12; }
.stp-pbs__bill button { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 9px 10px; border-radius: 100px; font-size: 0.8rem; font-weight: 700; color: #c9c5bb; }
.stp-pbs__bill button.is-on { background: #c9ad78; color: #0e0f12; }
.stp-pbs__tot { display: flex; align-items: baseline; gap: 10px; }
.stp-pbs__tot b { font-family: "Playfair Display", Georgia, serif; font-size: 2.2rem; line-height: 1; color: #f6f4ef; }
.stp-pbs__tot span { font-size: 0.8rem; color: #8d897f; }
.stp-pbs__tot.is-month b { font-size: 1.6rem; color: #e6cf9a; }
.stp-pbs__tot[hidden] { display: none; }
.stp-pbs .stp-pbs__note { font-size: 0.8rem; color: #8d897f; }
.stp-pbs .stp-pbs__warn { font-size: 0.82rem; color: #ffd166; }
.stp-pbs__reset { all: unset; cursor: pointer; align-self: flex-start; font-size: 0.78rem; color: #e6cf9a !important; border-bottom: 1px solid rgba(230, 207, 154, 0.4); }
.stp-pb { margin: 18px 0 0; padding: 16px 0 4px; border-top: 1px solid rgba(14, 15, 18, 0.12); }
.stp-pb__k { margin: 0 0 10px !important; font-size: 0.64rem !important; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #a88b57 !important; }
.stp-pb__rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.stp-pb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "img txt step" "img sum step"; align-items: center; gap: 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #dcd8ce; transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s; }
.stp-pb-row:not(.is-zero):not(.is-fixed) { border-color: #a88b57; box-shadow: inset 3px 0 0 #a88b57; }
.stp-pb-row.is-zero { opacity: 0.62; }
.stp-pb-row.is-fixed { background: #f6f4ef; }
.stp-pb-row__img { grid-area: img; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #e9e5db; }
.stp-pb-row__txt { grid-area: txt; min-width: 0; }
.stp-pb-row__txt a { display: block; font-size: 0.88rem; font-weight: 700; color: #0e0f12 !important; text-decoration: none; line-height: 1.3; }
.stp-pb-row__txt a:hover { text-decoration: underline; }
.stp-pb-row__txt small { display: block; font-size: 0.72rem; color: #6b675e; }
.stp-pb-row__sum { grid-area: sum; font-size: 0.72rem; font-weight: 700; color: #a88b57; }
.stp-pb-row__sum:not(:empty)::after { content: " credits"; font-weight: 500; }
.stp-pb-row__inc { grid-area: step; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #6b675e; }
.stp-pb-step { grid-area: step; display: inline-flex; align-items: center; border: 1px solid #dcd8ce; border-radius: 100px; overflow: hidden; background: #fff; }
.stp-pb-step button { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; color: #0e0f12; }
.stp-pb-step button:hover { background: #f1ede4; }
.stp-pb-step output { min-width: 26px; text-align: center; font-weight: 800; color: #0e0f12; font-variant-numeric: tabular-nums; }
.stp-pb__off { display: none; margin: 10px 0 0 !important; font-size: 0.8rem !important; color: #a88b57 !important; }
.stp-milestone-card.stp-pb-off .stp-pb__off { display: block; }
.stp-milestone-card.stp-pb-off .stp-milestone-intro { opacity: 0.45; }
.stp-milestone-card.stp-pb-off .stp-ms-head::after { content: "Not included"; margin-left: auto; padding: 4px 10px; border-radius: 100px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; background: #0e0f12; color: #f6f4ef; }
.stp-ms-cadence[hidden] { display: none; }
.stp-template-buy-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 760px) {
    .stp-pbs { grid-template-columns: 1fr; padding: 20px 18px; margin: 16px; }
    .stp-pb-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
    .stp-pb-row__img { width: 38px; height: 38px; }
}
.stp-milestone-card .stp-pb { margin: 0; padding: 18px clamp(16px, 3vw, 34px) 26px; }
@media (max-width: 760px) { .stp-milestone-card .stp-pb { padding: 14px 14px 20px; } }

/* Plan builder round 4: One time + Every month per service */
.stp-pb__rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.stp-pb-row { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "img txt" "img sum" "steps steps"; gap: 2px 12px; }
.stp-pb-row.is-fixed { grid-template-areas: "img txt" "img sum" "img inc"; }
.stp-pb-row.is-fixed .stp-pb-row__inc { grid-area: inc; }
.stp-pb-steps { grid-area: steps; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.stp-pb-steps .stp-pb-step { grid-area: auto; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; }
.stp-pb-steps .stp-pb-step small { flex: 1 1 auto; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b675e; white-space: nowrap; }
.stp-pb-steps .stp-pb-step[data-c="m"] { border-color: rgba(168, 139, 87, 0.55); background: #fbf8f1; }
.stp-pb-steps .stp-pb-step[data-c="m"] small { color: #a88b57; }
.stp-pb-steps .stp-pb-step button { width: 30px; height: 30px; }
.stp-pb-row__sum:not(:empty)::after { content: none; }
@media (max-width: 420px) { .stp-pb-steps { grid-template-columns: 1fr; } }

/* Plan switch and the lean plan view (?plan=1), 2026-11-16 */
.stp-pbs__bill button:focus-visible { outline: 2px solid #e6cf9a; outline-offset: 2px; }
.stp-pbs__back { display: inline-block; margin: 0 0 12px; font-size: 0.8rem; font-weight: 700; color: #e6cf9a !important; text-decoration: none; }
.stp-pbs__back:hover { text-decoration: underline; }
.stp-pbs__steps { list-style: none; counter-reset: stpstep; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.stp-pbs__steps li { counter-increment: stpstep; position: relative; padding-left: 38px; font-size: 0.88rem; line-height: 1.5; color: #c9c5bb; }
.stp-pbs__steps li::before { content: counter(stpstep); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 800; background: #c9ad78; color: #0e0f12; }
.stp-pbs__steps li b { display: block; color: #f6f4ef; }
body.stp-plan-view .stp-milestone-description { display: none; }
body.stp-plan-view .stp-milestone-card { margin-top: 14px; margin-bottom: 14px; }
body.stp-plan-view .stp-pbs { margin-top: 14px; }

/* Plan view, round 2 (2026-11-16) */
.stp-pbs__back { display: block; width: fit-content; }
.stp-pbs .stp-pbs__lead { margin: 0 0 4px; font-size: 1rem; color: #e9e5db; }
@media (max-width: 700px) { body.stp-plan-view .stp-buybar { margin-top: 74px; } }

/* Plan builder inside a plan product page ([gend_plan]), 2026-11-16 */
.stp-plan-embed { scroll-margin-top: 90px; margin: 26px 0; }
.stp-plan-embed .stp-pbs { margin-left: 0; margin-right: 0; max-width: none; }
.stp-plan-embed .stp-frontend-proposal { max-width: none; }
.stp-plan-from { font-weight: 700; }
@media (max-width: 700px) { body.stp-plan-product .stp-buybar { margin-top: 10px; } }

/* Boost / ad budget on plan rows (2026-11-16) */
.stp-pb-row:has(.stp-pb-boost) { grid-template-areas: "img txt" "img sum" "steps steps" "boost boost"; }
.stp-pb-boost { grid-area: boost; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 5px 6px 5px 12px; border-radius: 100px; border: 1px dashed rgba(244, 114, 182, 0.7); background: #fff5fa; }
.stp-pb-boost small { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #a61e6a; }
.stp-pb-boost select { appearance: auto; min-height: 30px; padding: 2px 8px; border-radius: 100px; border: 1px solid #e7b6d0; background: #fff; color: #0e0f12; font-weight: 800; font-size: 0.86rem; }
.stp-pb-boost.is-off { opacity: 0.45; }
.stp-pbs__boost { padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(244, 114, 182, 0.6); background: rgba(244, 114, 182, 0.08); }
.stp-pbs__boost[hidden] { display: none; }
.stp-pbs__boost b { font-family: "Playfair Display", Georgia, serif; font-size: 1.4rem; color: #f9a8d4; margin-right: 8px; }
.stp-pbs__boost span { font-size: 0.8rem; color: #c9c5bb; }
.stp-pbs__boost small { display: block; margin-top: 4px; font-size: 0.76rem; line-height: 1.5; color: #a8a49a; }

/* A hidden monthly line stays hidden on phones too (2026-11-16) */
.stp-buybar .stp-bill-then[hidden], .stp-template-purchase-summary .stp-bill-then[hidden] { display: none !important; }

/* Packages, once-only plans and the consultant card (2026-11-18) */
.stp-pbs__pk { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-top: 16px; }
.stp-pbs__pk button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(246, 244, 239, 0.18); background: rgba(255, 255, 255, 0.04); color: #c9c5bb; transition: border-color 0.15s, background 0.15s; }
.stp-pbs__pk button:hover { border-color: rgba(201, 173, 120, 0.7); }
.stp-pbs__pk button:focus-visible { outline: 2px solid #e6cf9a; outline-offset: 2px; }
.stp-pbs__pk button.is-on { border-color: #c9ad78; background: rgba(201, 173, 120, 0.14); box-shadow: inset 0 0 0 1px #c9ad78; }
.stp-pbs__pk b { font-family: "Playfair Display", Georgia, serif; font-size: 1.1rem; color: #f6f4ef; }
.stp-pbs__pk strong { font-size: 0.92rem; color: #e6cf9a; }
.stp-pbs__pk span { font-size: 0.8rem; line-height: 1.45; }
.stp-pb-steps--once { grid-template-columns: 1fr; max-width: 220px; }
.stp-pc { display: inline-flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(246, 244, 239, 0.18); background: rgba(255, 255, 255, 0.04); text-align: left; }
.stp-pc img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; }
.stp-pc span { display: flex; flex-direction: column; gap: 2px; }
.stp-pc small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #c9ad78; }
.stp-pc b { font-size: 1.05rem; color: #f6f4ef; }
.stp-pc em { font-style: normal; font-size: 0.82rem; color: #a8a49a; }
