/* Pricing v3.1 "Build your plan" checkout — website/templates/checkout_tools.html
   (docs/billing_v2/08_pricing_v3_tools_model.md §9.1). Owner: WP-CHECKOUT-UI.
   Continues checkout_plan.html's visual language (same palette vars, Inter,
   glass cards, orange CTA). Loaded ONLY by the tools-model template, so
   nothing here can touch the flag-off page. No prices or quotas live in
   CSS. */

:root {
    --primary-blue: #046bfc;
    --primary-blue-hover: #0356c9;
    --white: #ffffff;
    --navy-dark: #04143d;
    --accent-orange: #ff9900;
    --accent-orange-hover: #e68a00;
    --light-blue-bg: #f0f6ff;
    --soft-navy: #1a2a4a;
    --gray-text: #64748b;
    --light-gray: #f8fafc;
    --border-light: #e2e8f0;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #dc2626;
    --gradient-blue: linear-gradient(135deg, #046bfc 0%, #0284c7 100%);
    --ct-radius: 16px;
    --ct-shadow: 0 4px 20px rgba(4, 20, 61, 0.06);
    --ct-focus: 0 0 0 3px rgba(4, 107, 252, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.ct-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--navy-dark);
    line-height: 1.6;
    background: #ffffff;
    min-height: 100vh;
}

button, select, input { font-family: inherit; }

svg { stroke-linecap: round; stroke-linejoin: round; }

.ct-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: none; box-shadow: var(--ct-focus); border-radius: 8px; }

/* ── Topbar (identical to the legacy page) ─────────────────────────────── */
.checkout-topbar {
    background: white; border-bottom: 1px solid var(--border-light);
    padding: 0 32px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; z-index: 2;
}
.topbar-steps { display: flex; align-items: center; gap: 8px; }
.topbar-step { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--gray-text); }
.topbar-step.completed { color: var(--success-green); }
.topbar-step.active { color: var(--navy-dark); font-weight: 600; }
.topbar-step-dot {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    border: 2px solid var(--border-light); color: var(--gray-text); background: white;
}
.topbar-step.completed .topbar-step-dot { background: var(--success-green); border-color: var(--success-green); color: white; }
.topbar-step.active .topbar-step-dot { background: var(--primary-blue); border-color: var(--primary-blue); color: white; }
.topbar-step svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.topbar-step-arrow { width: 16px; height: 16px; stroke: var(--border-light); fill: none; stroke-width: 2; }
.topbar-secure { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--gray-text); }
.topbar-secure svg { width: 16px; height: 16px; stroke: var(--success-green); fill: none; stroke-width: 2; }
.topbar-right-group { display: flex; align-items: center; gap: 20px; }
.topbar-logout {
    display: flex; align-items: center; gap: 6px; font-size: 0.8rem;
    color: var(--gray-text); background: none; border: none; cursor: pointer; padding: 0;
    transition: color 0.15s ease;
}
.topbar-logout:hover { color: var(--navy-dark); }
.topbar-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Background ────────────────────────────────────────────────────────── */
.checkout-bg {
    position: relative; overflow: clip; overflow-clip-margin: content-box;
    background: #ffffff;
    background-image:
        linear-gradient(rgba(4, 107, 252, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(4, 107, 252, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    min-height: calc(100vh - 64px);
}
.checkout-bg::before, .checkout-bg::after, .checkout-blob-3 {
    content: ''; position: absolute; border-radius: 50%; opacity: 0.8; pointer-events: none; z-index: 0;
}
.checkout-bg::before { width: 600px; height: 600px; top: -200px; left: -150px;
    background: radial-gradient(circle, rgba(4,107,252,0.3) 0%, rgba(4,107,252,0.1) 45%, transparent 72%); }
.checkout-bg::after { width: 500px; height: 500px; bottom: -100px; right: -100px;
    background: radial-gradient(circle, rgba(255,153,0,0.22) 0%, rgba(255,153,0,0.07) 45%, transparent 72%); }
.checkout-blob-3 { width: 400px; height: 400px; bottom: -100px; left: 30%;
    background: radial-gradient(circle, rgba(4,107,252,0.22) 0%, rgba(4,107,252,0.07) 45%, transparent 72%); }

/* ── Layout ────────────────────────────────────────────────────────────── */
.ct-main {
    max-width: 1120px; margin: 0 auto; padding: 36px 32px 80px;
    display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px;
    align-items: start; position: relative; z-index: 1;
}
.ct-right {
    position: sticky; top: 84px;
    max-height: calc(100vh - 104px); max-height: calc(100dvh - 104px);
    overflow-y: auto; scrollbar-gutter: stable;
    border-radius: var(--ct-radius);
}

/* ── Hero + trust strip ────────────────────────────────────────────────── */
.ct-hero h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.ct-hero-sub { color: var(--gray-text); font-size: 1rem; margin-bottom: 14px; }
.ct-trust-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 28px; }
.ct-trust-strip li { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--soft-navy); font-weight: 500; }
.ct-trust-strip li[hidden] { display: none; }
.ct-trust-strip svg { width: 15px; height: 15px; stroke: var(--success-green); fill: none; stroke-width: 2.5; }

.ct-degraded, .ct-partial {
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    border-radius: 12px; padding: 14px 16px; font-size: 0.88rem; margin-bottom: 20px;
}
.ct-degraded strong { display: block; color: var(--navy-dark); margin-bottom: 4px; }
.ct-degraded p { margin-bottom: 8px; }
.ct-link { color: var(--primary-blue); font-weight: 600; text-decoration: none; }
.ct-link:hover { text-decoration: underline; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.ct-presets, .ct-tools { margin-bottom: 30px; }
.ct-presets h2, .ct-tools h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 2px; }
.ct-section-sub { color: var(--gray-text); font-size: 0.85rem; margin-bottom: 14px; }

/* ── Presets ───────────────────────────────────────────────────────────── */
.ct-presets-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ct-preset {
    text-align: left; background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border-light);
    border-radius: 12px; padding: 12px 14px; cursor: pointer;
    display: flex; flex-direction: column; gap: 3px; min-height: 96px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ct-preset:hover { border-color: var(--primary-blue); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(4, 107, 252, 0.12); }
.ct-preset.is-active { border-color: var(--primary-blue); background: var(--light-blue-bg); box-shadow: 0 0 0 1px var(--primary-blue) inset; }
.ct-preset-name { font-weight: 700; font-size: 0.9rem; color: var(--navy-dark); }
.ct-preset-desc { font-size: 0.76rem; color: var(--gray-text); line-height: 1.35; flex: 1; }
.ct-preset-price { font-size: 0.8rem; font-weight: 700; color: var(--primary-blue); min-height: 1.2em; }

/* ── Tool cards ────────────────────────────────────────────────────────── */
.ct-cards { display: flex; flex-direction: column; gap: 14px; }
.ct-card {
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-light); border-radius: var(--ct-radius);
    padding: 20px 22px; box-shadow: var(--ct-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ct-card.is-selected { border-color: rgba(4, 107, 252, 0.55); box-shadow: 0 6px 24px rgba(4, 107, 252, 0.12); }
.ct-card.has-refusal { border-color: #fca5a5; }
.ct-card-head { display: flex; align-items: flex-start; gap: 14px; }
.ct-card-icon {
    width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; background: rgba(4, 107, 252, 0.1);
}
.ct-card-icon svg { width: 21px; height: 21px; fill: none; stroke: var(--primary-blue); stroke-width: 2; }
.ct-icon-repricer { background: rgba(255, 153, 0, 0.12); }
.ct-icon-repricer svg { stroke: var(--accent-orange); }
.ct-icon-review_requester { background: rgba(245, 158, 11, 0.12); }
.ct-icon-review_requester svg { stroke: var(--warning-yellow); }
.ct-icon-ppc_manager, .ct-icon-ppc_optimizer { background: rgba(2, 132, 199, 0.1); }
.ct-icon-sourcer, .ct-icon-bulk_sourcer { background: rgba(16, 185, 129, 0.1); }
.ct-icon-sourcer svg, .ct-icon-bulk_sourcer svg { stroke: var(--success-green); }
.ct-icon-alerts { background: rgba(220, 38, 38, 0.08); }
.ct-icon-alerts svg { stroke: #ef4444; }
.ct-icon-listing_studio { background: rgba(124, 58, 237, 0.1); }
.ct-icon-listing_studio svg { stroke: #7c3aed; }
.ct-card-title { flex: 1 1 auto; min-width: 0; }
.ct-card-title h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.ct-card-tagline { font-size: 0.83rem; color: var(--gray-text); margin-top: 2px; }
.ct-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; text-align: right; min-width: 110px; }
.ct-card-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; min-height: 2.2em; }
.ct-price-amount { font-size: 1.15rem; font-weight: 800; color: var(--navy-dark); font-variant-numeric: tabular-nums; }
.ct-card-price.is-free .ct-price-amount { color: var(--success-green); }
.ct-price-period { font-size: 0.72rem; color: var(--gray-text); }

.ct-chip {
    display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
    padding: 3px 8px; border-radius: 999px; background: var(--light-gray); color: var(--soft-navy);
    border: 1px solid var(--border-light); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
/* An author `display` beats the UA sheet's `[hidden] { display: none }`, so a
   chip the JS hides with show(chip, false) would otherwise stay in flow and
   paint as an empty grey pill (found 2026-09-03: four such lozenges on the
   default basket). Every other togglable block in this file carries the same
   override — keep it next to the rule that needs it. */
.ct-chip[hidden] { display: none; }
.ct-chip-good { background: rgba(16, 185, 129, 0.1); color: #047857; border-color: rgba(16, 185, 129, 0.25); }
.ct-chip-pop { background: rgba(255, 153, 0, 0.12); color: #b45309; border-color: rgba(255, 153, 0, 0.3); }
.ct-chip-quiet { background: var(--light-gray); color: var(--gray-text); }

.ct-card-body { margin-top: 14px; }
.ct-card-note {
    font-size: 0.8rem; color: var(--soft-navy); background: var(--light-blue-bg);
    border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; border: 1px solid rgba(4, 107, 252, 0.12);
}
.ct-card-control { display: flex; flex-direction: column; gap: 8px; }
.ct-label { font-size: 0.74rem; font-weight: 600; color: var(--gray-text); text-transform: uppercase; letter-spacing: 0.04em; }
.ct-select {
    width: 100%; padding: 10px 36px 10px 12px; border: 1.5px solid var(--border-light); border-radius: 10px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 12px center;
    font-size: 0.9rem; color: var(--navy-dark); appearance: none; -webkit-appearance: none; cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ct-select:hover { border-color: #cbd5e1; }
.ct-select:focus { border-color: var(--primary-blue); box-shadow: var(--ct-focus); outline: none; }
.ct-select:disabled { opacity: 0.6; cursor: not-allowed; }
.ct-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ct-field { flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ct-variant[hidden] { display: none; }

.ct-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
    border: 1.5px solid var(--border-light); background: #fff; color: var(--navy-dark);
    font-weight: 700; font-size: 0.88rem; cursor: pointer; white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ct-toggle:hover { border-color: var(--primary-blue); }
.ct-toggle .ct-toggle-check { display: none; }
.ct-toggle.is-on { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }
.ct-toggle.is-on .ct-toggle-check { display: inline; }
.ct-toggle:disabled { opacity: 0.55; cursor: not-allowed; }
.ct-toggle.is-on:disabled { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: #047857; opacity: 1; }
.ct-toggle-price { font-weight: 600; font-size: 0.8rem; opacity: 0.9; }

.ct-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ct-facts li {
    font-size: 0.76rem; color: var(--soft-navy); background: var(--light-gray);
    border: 1px solid var(--border-light); padding: 4px 9px; border-radius: 6px;
}
.ct-facts[hidden] { display: none; }
.ct-hint { font-size: 0.78rem; color: var(--gray-text); }
.ct-hint[hidden] { display: none; }

.ct-lets-talk {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: var(--light-gray); border: 1px dashed var(--border-light); border-radius: 10px; padding: 8px 12px;
    font-size: 0.8rem; color: var(--gray-text);
}
.ct-lets-talk-cta { color: var(--primary-blue); font-weight: 700; text-decoration: none; }
.ct-lets-talk-cta:hover { text-decoration: underline; }

.ct-card-refusal {
    margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 9px 12px; font-size: 0.8rem;
}
.ct-card-refusal[hidden] { display: none; }
.ct-fix {
    border: none; border-radius: 8px; background: var(--primary-blue); color: #fff;
    font-weight: 700; font-size: 0.78rem; padding: 7px 12px; cursor: pointer;
}
.ct-fix:hover { background: var(--primary-blue-hover); }
.ct-fix[hidden] { display: none; }

.ct-card-details { margin-top: 12px; border-top: 1px dashed var(--border-light); padding-top: 10px; }
.ct-card-details summary {
    cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--primary-blue); list-style: none;
    display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.ct-card-details summary::-webkit-details-marker { display: none; }
.ct-card-details summary::before {
    content: '+'; width: 14px; height: 14px; line-height: 12px; text-align: center;
    border: 1px solid var(--primary-blue); border-radius: 50%; font-size: 0.75rem; display: inline-block;
}
.ct-card-details[open] summary::before { content: '\2212'; }
.ct-card-details ul { margin: 8px 0 0 18px; font-size: 0.8rem; color: var(--soft-navy); }
.ct-card-details li { margin: 3px 0; }

/* ── Informational rows + value strip ──────────────────────────────────── */
.ct-info-title { font-size: 0.85rem; font-weight: 700; color: var(--gray-text); text-transform: uppercase; letter-spacing: 0.04em; margin: 22px 0 8px; }
.ct-info-rows { display: flex; flex-direction: column; gap: 8px; }
/* Tools that need no subscription at all sit BELOW the "Included with
   Analytics" band, visibly detached from it (finding: the heading covered
   Lost & Found, which is not included with Analytics). */
.ct-info-rows-standalone { margin-top: 10px; }
.ct-info-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(255, 255, 255, 0.8); border: 1px solid var(--border-light); border-radius: 12px; padding: 10px 14px;
}
.ct-info-text { display: flex; flex-direction: column; min-width: 0; }
.ct-info-text strong { font-size: 0.9rem; }
.ct-info-text span { font-size: 0.78rem; color: var(--gray-text); }
.ct-value-strip { margin-top: 16px; font-size: 0.8rem; color: var(--gray-text); text-align: center; }
/* ── Redeem card (mirrors the legacy page) ─────────────────────────────── */
.plans-redeem-card {
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); border-radius: var(--ct-radius);
    border: 1px solid var(--border-light); padding: 22px 24px; margin: 8px 0 24px; box-shadow: var(--ct-shadow);
}
.plans-redeem-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.plans-redeem-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--light-blue-bg); color: var(--primary-blue); }
.plans-redeem-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.plans-redeem-title { font-size: 1rem; font-weight: 700; }
.plans-redeem-sub { font-size: 0.85rem; color: var(--gray-text); }
.plans-redeem-form { display: flex; gap: 10px; align-items: stretch; }
.plans-redeem-input {
    flex: 1 1 auto; min-width: 0; padding: 10px 14px; border: 1px solid var(--border-light); border-radius: 10px;
    font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft-navy); background: #fff;
}
.plans-redeem-input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(4, 107, 252, 0.15); }
.plans-redeem-input::placeholder { text-transform: none; letter-spacing: normal; color: var(--gray-text); opacity: 0.7; }
.plans-redeem-btn { border: none; border-radius: 10px; background: var(--primary-blue); color: #fff; font-weight: 600; font-size: 0.9rem; padding: 10px 22px; cursor: pointer; white-space: nowrap; }
.plans-redeem-btn:hover { background: var(--primary-blue-hover); }
.plans-redeem-btn:disabled { opacity: 0.6; cursor: default; }
.plans-redeem-error { display: none; margin-top: 12px; font-size: 0.85rem; color: var(--danger-red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 9px 13px; }
.plans-redeem-success { display: none; margin-top: 12px; font-size: 0.85rem; color: var(--success-green); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 9px 13px; }

/* ── Order summary ─────────────────────────────────────────────────────── */
.order-summary {
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); border-radius: var(--ct-radius);
    border: 1px solid var(--border-light); padding: 26px;
    box-shadow: 0 8px 32px rgba(4, 20, 61, 0.08), 0 1px 3px rgba(4, 20, 61, 0.04);
}
.order-summary h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.order-summary h2:focus { outline: none; }
.billing-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.billing-toggle { display: inline-flex; background: var(--light-blue-bg); border-radius: 50px; padding: 3px; border: 1px solid var(--border-light); flex: 1; min-width: 0; }
.billing-btn {
    flex: 1; padding: 9px 12px; border-radius: 50px; border: none; background: transparent; color: var(--gray-text);
    font-weight: 600; font-size: 0.82rem; cursor: pointer; text-align: center; white-space: nowrap;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.billing-btn.active { background: var(--primary-blue); color: white; }
.billing-save-badge { display: inline-block; background: var(--success-green); color: white; font-size: 0.58rem; font-weight: 700; padding: 2px 5px; border-radius: 4px; margin-left: 3px; vertical-align: middle; }
.billing-btn.active .billing-save-badge { background: white; color: var(--success-green); }
.currency-toggle { display: flex; border: 1.5px solid var(--border-light); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.currency-btn { padding: 8px 11px; border: none; border-right: 1px solid var(--border-light); background: white; font-weight: 600; font-size: 0.82rem; cursor: pointer; color: var(--gray-text); }
.currency-btn:last-child { border-right: none; }
.currency-btn.active { background: var(--navy-dark); color: white; }
.currency-current { border: none; background: transparent; color: var(--gray-text); font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 6px 4px; }
.currency-current:hover { color: var(--primary-blue); }
.currency-toggle[data-collapsed="1"] { border: none; }
.currency-toggle[data-collapsed="1"] .currency-btn { display: none; }
.currency-toggle:not([data-collapsed="1"]) .currency-current { display: none; }

.ct-lines { border-top: 1px solid var(--border-light); padding-top: 12px; margin-bottom: 12px; min-height: 64px; transition: opacity 0.2s ease; }
.ct-lines.is-updating, .order-total-amount.is-updating { opacity: 0.55; }
.ct-lines-empty { font-size: 0.85rem; color: var(--gray-text); padding: 10px 0; }
.order-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; min-height: 40px; }
.order-line-name { font-size: 0.88rem; font-weight: 500; min-width: 0; }
.ct-line-tier { color: var(--gray-text); font-weight: 400; font-size: 0.8rem; margin-left: 4px; }
.line-badge { display: inline-block; font-size: 0.66rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.line-badge-green { background: rgba(16, 185, 129, 0.1); color: var(--success-green); }
.line-badge-orange { background: rgba(255, 153, 0, 0.1); color: var(--accent-orange); }
.ct-line-note { font-size: 0.72rem; color: var(--gray-text); margin-top: 2px; }
.ct-line-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.order-line-price { font-weight: 700; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.order-line-price.free { color: var(--success-green); }
.order-line-remove {
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-light); background: #fff;
    color: var(--gray-text); font-size: 0.9rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.order-line-remove:hover { color: var(--danger-red); border-color: #fecaca; }

.ct-nudges { margin-bottom: 12px; }
.ct-nudges[hidden] { display: none; }
.ct-nudges-title { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-text); margin-bottom: 6px; }
.summary-suggest-row {
    width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
    background: var(--light-gray); border: 1px dashed var(--border-light); border-radius: 10px; padding: 8px 10px;
    font-size: 0.8rem; color: var(--soft-navy); cursor: pointer; margin-bottom: 6px;
}
.summary-suggest-row:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.ct-nudge-plus { width: 18px; height: 18px; border-radius: 50%; background: var(--primary-blue); color: #fff; font-weight: 700; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; }

.order-total { border-top: 2px solid var(--navy-dark); padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.order-total-label { font-size: 1rem; font-weight: 700; }
.order-total-amount { font-size: 1.5rem; font-weight: 800; color: var(--navy-dark); font-variant-numeric: tabular-nums; transition: opacity 0.2s ease; }
.order-total-period { font-size: 0.8rem; color: var(--gray-text); text-align: right; margin-bottom: 2px; min-height: 1.2em; }
.ct-yearly-note { font-size: 0.75rem; color: var(--gray-text); text-align: right; }
.ct-yearly-note[hidden] { display: none; }
.order-total-vat { font-size: 0.75rem; color: var(--gray-text); text-align: right; margin-bottom: 10px; }
.ct-quote-status { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--gray-text); min-height: 1.4em; margin-bottom: 12px; }
.ct-quote-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-light); flex: 0 0 7px; }
.ct-quote-status[data-state="ok"] .ct-quote-dot { background: var(--success-green); }
.ct-quote-status[data-state="loading"] .ct-quote-dot { background: var(--warning-yellow); animation: ctPulseDot 1s ease-in-out infinite; }
.ct-quote-status[data-state="error"] .ct-quote-dot, .ct-quote-status[data-state="refused"] .ct-quote-dot { background: var(--danger-red); }
.ct-link-btn { border: none; background: none; color: var(--primary-blue); font-weight: 600; font-size: 0.74rem; cursor: pointer; text-decoration: underline; padding: 0; }
.ct-link-btn[hidden] { display: none; }
@keyframes ctPulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.order-trial-info { background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; text-align: center; }
.order-trial-info strong { color: var(--success-green); font-size: 0.88rem; }
.order-trial-info p { font-size: 0.78rem; color: var(--gray-text); margin-top: 3px; }

/* Free Tier consent (legacy contract) */
.ft-consent { background: var(--light-gray); border: 1px solid var(--border-light); border-radius: 10px; padding: 14px; margin-bottom: 16px; font-size: 0.82rem; color: var(--soft-navy); line-height: 1.5; }
.ft-consent-row { display: flex; align-items: flex-start; gap: 10px; }
.ft-consent-row input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary-blue); cursor: pointer; }
.ft-consent-row label { cursor: pointer; user-select: none; }
.ft-consent-row label strong { color: var(--navy-dark); font-weight: 600; }
.ft-criteria { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-light); }
.ft-criteria > summary { cursor: pointer; color: var(--primary-blue); font-size: 0.78rem; font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.ft-criteria > summary::-webkit-details-marker { display: none; }
.ft-criteria > summary::before { content: '+'; display: inline-block; width: 14px; height: 14px; line-height: 12px; text-align: center; border: 1px solid var(--primary-blue); border-radius: 50%; font-size: 0.75rem; }
.ft-criteria[open] > summary::before { content: '\2212'; }
.ft-criteria ul { margin: 8px 0 0 22px; padding: 0; font-size: 0.78rem; color: var(--gray-text); }
.ft-criteria ul li { margin: 4px 0; }

.checkout-notice { display: none; margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 0.82rem; line-height: 1.5; }
.ct-cta-reason { font-size: 0.78rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 10px; margin-bottom: 10px; }
.ct-cta-reason[hidden] { display: none; }

/* CTA */
.checkout-cta {
    width: 100%; padding: 16px; border-radius: 10px; border: none; font-size: 1rem; font-weight: 700; color: white; cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent-orange); position: relative;
}
.checkout-cta:hover { background: var(--accent-orange-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 153, 0, 0.35); }
.checkout-cta.blue-cta { background: var(--primary-blue); }
.checkout-cta.blue-cta:hover { background: var(--primary-blue-hover); box-shadow: 0 6px 20px rgba(4, 107, 252, 0.35); }
.checkout-cta.is-disabled, .checkout-cta:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.checkout-cta svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 2.5; }
.checkout-cta.loading { pointer-events: none; }
.checkout-cta.loading .cta-label, .checkout-cta.loading > svg:not(.cta-spinner-svg) { opacity: 0; }
.checkout-cta .cta-spinner { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; }
.checkout-cta.loading .cta-spinner { display: flex; }
.cta-spinner-svg { width: 26px; height: 26px; animation: ctaSpin 0.8s linear infinite; }
.cta-spinner-svg circle { fill: none; stroke-width: 3; }
.cta-spinner-track { stroke: rgba(255,255,255,0.2); }
.cta-spinner-arc { stroke: white; stroke-dasharray: 60 200; animation: ctaDash 1.2s ease-in-out infinite; }
@keyframes ctaSpin { to { transform: rotate(360deg); } }
@keyframes ctaDash { 0% { stroke-dasharray: 1 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 50 200; stroke-dashoffset: -20; } 100% { stroke-dasharray: 1 200; stroke-dashoffset: -62; } }
.ct-talk-link { display: block; text-align: center; margin-top: 10px; font-size: 0.85rem; font-weight: 600; color: var(--primary-blue); text-decoration: none; }
.ct-talk-link[hidden] { display: none; }

.checkout-trust { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 0.8rem; color: var(--gray-text); }
.checkout-trust svg { width: 15px; height: 15px; stroke: var(--success-green); fill: none; stroke-width: 2; }
.checkout-trust-badges { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; font-size: 0.75rem; color: var(--gray-text); }
.checkout-trust-badges img { height: 20px; width: auto; opacity: 0.85; }

.ct-faq { margin-top: 18px; border-top: 1px solid var(--border-light); padding-top: 12px; }
.ct-faq-title { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-text); margin-bottom: 6px; }
.ct-faq details { border-bottom: 1px dashed var(--border-light); padding: 6px 0; }
.ct-faq summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--soft-navy); list-style: none; }
.ct-faq summary::-webkit-details-marker { display: none; }
.ct-faq summary::after { content: '+'; float: right; color: var(--gray-text); }
.ct-faq details[open] summary::after { content: '\2212'; }
.ct-faq p { font-size: 0.78rem; color: var(--gray-text); margin-top: 4px; }

.checkout-back, .checkout-cancel-btn {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.82rem; font-weight: 600;
    color: var(--gray-text); text-decoration: none;
}
.checkout-back:hover, .checkout-cancel-btn:hover { color: var(--primary-blue); }
.checkout-back svg, .checkout-cancel-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.demo-checkout-notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 0.8rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; }
.demo-checkout-notice svg { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.checkout-overlay-back { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border: none; background: transparent; color: var(--gray-text); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.checkout-overlay-back:hover { color: var(--primary-blue); }
.checkout-overlay-back svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Stripe payment is a modal; the basket remains visible behind its backdrop. */
body.ct-checkout-open { overflow: hidden; }
.ct-checkout-dialog { width: min(1080px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: 18px; color: var(--navy-dark); background: #fff; box-shadow: 0 24px 80px rgba(4, 20, 61, 0.3); overflow: hidden; }
.ct-checkout-dialog:not([open]) { display: none; }
.ct-checkout-dialog[open] { display: flex; flex-direction: column; }
.ct-checkout-dialog::backdrop { background: rgba(4, 20, 61, 0.62); backdrop-filter: blur(3px); }
.ct-checkout-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--border-light); flex: 0 0 auto; }
.ct-checkout-dialog-header h2 { margin: 0 0 6px; font-size: 1.2rem; }
.ct-checkout-dialog-header p { margin: 0; color: var(--gray-text); font-size: 0.85rem; }
.ct-checkout-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; padding: 8px; border: 1px solid var(--border-light); border-radius: 10px; background: #fff; color: var(--soft-navy); cursor: pointer; }
.ct-checkout-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.ct-checkout-close:hover { background: var(--light-gray); }
.ct-checkout-dialog button:focus-visible { outline: 3px solid var(--primary-blue); outline-offset: 3px; }
.ct-checkout-dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; flex: 1 1 auto; }
.ct-checkout-dialog #checkout { width: 100%; min-height: 300px; }
.ct-checkout-dialog [hidden], .ct-checkout-loading[hidden], .ct-checkout-error[hidden] { display: none !important; }
.ct-checkout-loading, .ct-checkout-error { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 30px; text-align: center; color: var(--soft-navy); }
.ct-checkout-loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border-light); border-top-color: var(--primary-blue); border-radius: 50%; animation: ctaSpin 0.8s linear infinite; }
.ct-checkout-error p { max-width: 42ch; margin: 0; }
.ct-checkout-retry { border: 0; border-radius: 10px; padding: 12px 22px; background: var(--primary-blue); color: #fff; font-weight: 700; cursor: pointer; }
.ct-checkout-dialog-footer { padding: 12px 18px; border-top: 1px solid var(--border-light); flex: 0 0 auto; }
@media (max-width: 640px) {
    .ct-checkout-dialog { width: 100%; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
    .ct-checkout-dialog-header { padding: max(16px, env(safe-area-inset-top)) 16px 16px; }
    .ct-checkout-dialog-body { padding: 10px; }
    .ct-checkout-dialog-footer { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
}

/* Mobile sticky total bar */
.mobile-total-bar {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--border-light); box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.08);
    align-items: center; justify-content: space-between; gap: 12px;
}
.mobile-total-label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray-text); }
.mobile-total-amount { font-size: 1.15rem; font-weight: 800; color: var(--navy-dark); }
.mobile-total-cta { border: none; border-radius: 10px; padding: 12px 22px; background: var(--primary-blue); color: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; white-space: nowrap; }

/* Toasts */
.ct-toast-stack { position: fixed; top: 76px; right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.ct-toast {
    display: flex; align-items: center; gap: 12px; background: var(--navy-dark); color: #fff; border-radius: 12px;
    padding: 12px 14px; font-size: 0.82rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(4, 20, 61, 0.25);
    animation: ctToastIn 0.25s ease-out;
}
.ct-toast-action { border: 1px solid rgba(255,255,255,0.4); background: transparent; color: #fff; font-weight: 700; font-size: 0.78rem; border-radius: 8px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.ct-toast-action:hover { background: rgba(255,255,255,0.12); }
@keyframes ctToastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Commitment pulse (reused from the legacy page) */
@keyframes smSoftPulse { 0% { box-shadow: 0 0 0 0 rgba(4, 107, 252, 0.35); } 100% { box-shadow: 0 0 0 14px rgba(4, 107, 252, 0); } }
.sm-pulse-once { animation: smSoftPulse 1.2s ease-out 1; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .ct-main { grid-template-columns: 1fr; padding: 22px 16px 120px; gap: 22px; }
    .ct-right { position: static; max-height: none; overflow: visible; scrollbar-gutter: auto; }
    .mobile-total-bar:not([data-hidden]) { display: flex; }
    .topbar-secure { font-size: 0; gap: 0; }
    .topbar-secure svg { width: 18px; height: 18px; }
    .topbar-logout span { display: none; }
    .checkout-bg::before { width: 350px; height: 350px; opacity: 0.4; }
    .checkout-bg::after { width: 300px; height: 300px; opacity: 0.4; }
    .checkout-blob-3 { width: 250px; height: 250px; opacity: 0.4; }
    .ct-card-head { flex-wrap: wrap; }
    .ct-card-side { flex-direction: row; align-items: center; gap: 10px; width: 100%; justify-content: space-between; min-width: 0; text-align: left; }
    .ct-card-price { align-items: flex-end; }
    .ct-toast-stack { top: auto; bottom: 84px; right: 12px; left: 12px; max-width: none; }
}
@media (max-width: 480px) {
    .checkout-topbar { padding: 0 16px; }
    .topbar-steps span { display: none; }
    .billing-toggle-row { flex-direction: column; align-items: stretch; }
    .billing-toggle { width: 100%; }
    .ct-presets-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ct-hero h1 { font-size: 1.5rem; }
    .ct-toggle { width: 100%; justify-content: center; }
    .plans-redeem-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
