/* STRCTR /checkout — disciplined conversion surface (black env · white structure · blue = activation only) */

:root {
    --bg: #050506;
    --text: #e5e7eb;
    --muted: #8a9099;
    --dim: rgba(180, 188, 198, 0.9);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.12);
    /* Public slab frame (same family as /pricing tier surfaces, toned for route focus) */
    --tier-frame: rgba(255, 255, 255, 0.175);
    --tier-lane-rule: rgba(255, 255, 255, 0.1);
    --surface: #060607;
    --slab-strong: #030304;
    --accent: #2563eb;
    --accent-border: rgba(59, 130, 246, 0.88);
    /* Public shell: same outer width as /pricing and /access */
    --max: min(1180px, calc(100vw - 40px));
    --co-pad: clamp(20px, 4vw, 40px);
    /* Match /pricing main block rhythm */
    --block-gap: clamp(40px, 6vw, 72px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    overflow-y: auto;
}

body.checkout-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: var(--bg);
    overflow: visible;
}

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

.co-tabular {
    font-variant-numeric: tabular-nums;
}

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

.co-banner {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    max-width: var(--max);
    padding: 12px var(--co-pad) 0;
}

.co-banner[hidden] {
    display: none !important;
}

.co-banner-inner {
    margin: 0;
    padding: 10px 12px;
    border-radius: 2px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(200, 208, 218, 0.9);
}

.co-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.co-header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--co-pad);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.co-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text);
}

.co-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    display: grid;
    place-items: center;
    background: #000;
    overflow: hidden;
}

.co-brand-mark img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
}

.co-header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.co-header-nav a,
.co-nav-current {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.co-header-nav a {
    color: var(--muted);
    transition: color 0.16s ease;
}

.co-header-nav a:hover {
    color: var(--text);
}

.co-nav-current {
    font-weight: 600;
    color: rgba(200, 208, 218, 0.55);
    cursor: default;
}

.co-main {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(24px, 4vw, 36px) var(--co-pad) clamp(48px, 8vw, 80px);
}

/* Intro band: same width grammar as /pricing · /access headers */
.co-main > .co-checkout-header {
    max-width: min(38rem, 100%);
    margin-inline: 0;
}

/* Main public checkout layer — full shell width, one slab (not a narrow process column) */
.co-checkout-body {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    padding: clamp(22px, 3.6vw, 40px) clamp(14px, 2.2vw, 22px) clamp(26px, 4vw, 44px);
    border: 1px solid var(--tier-frame);
    background: var(--slab-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 0 0 1px rgba(0, 0, 0, 0.35);
}

.co-checkout-body > .co-flow {
    max-width: none;
    width: 100%;
    margin-inline: 0;
}

/* Regions inside the public slab: structural, not stacked floating cards */
.co-checkout-body .co-access-plate,
.co-checkout-body .co-truth-rows,
.co-checkout-body .co-action-slab,
.co-checkout-body .co-route-incomplete-slab,
.co-checkout-body .co-route-picker {
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.085);
}

.co-checkout-body .co-route-incomplete-slab {
    background: var(--surface);
}

.co-checkout-body .co-access-plate:not(.co-access-plate--route) {
    background: var(--surface);
}

.co-checkout-body .co-access-plate--route {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
}

.co-checkout-body .co-action-slab--hold {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
}

.co-checkout-body .co-block--gate {
    border-top-color: rgba(255, 255, 255, 0.065);
}

/* —— 1. Checkout header — same frame grammar as /pricing —— */
.co-checkout-header {
    margin-bottom: var(--block-gap);
    padding: clamp(4px, 0.8vw, 8px) 0 clamp(22px, 3.2vw, 30px) clamp(14px, 2.2vw, 22px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.105);
    border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.co-checkout-header__title {
    margin: 0 0 12px;
    font-size: clamp(1.08rem, 2.35vw, 1.32rem);
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    line-height: 1.22;
    color: rgba(232, 236, 242, 0.97);
}

.co-checkout-header__lead {
    margin: 0 0 11px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.038em;
    color: rgba(172, 180, 190, 0.96);
}

.co-checkout-header__truth {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.032em;
    line-height: 1.48;
    color: rgba(128, 136, 146, 0.94);
    text-transform: none;
}

.co-flow[hidden] {
    display: none !important;
}

/* STATE C — fallback: same slab family as other routes; quiet, not “form step” */
.co-flow--fallback {
    opacity: 1;
}

.co-block-kicker--fallback {
    color: rgba(148, 156, 168, 0.88);
}

.co-route-incomplete-slab {
    padding: clamp(20px, 3.2vw, 26px) clamp(20px, 3.2vw, 28px);
    border-radius: 2px;
    border: 1px solid var(--tier-frame);
    background: var(--slab-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.052),
        0 0 0 1px rgba(0, 0, 0, 0.35);
}

.co-route-incomplete-slab__title {
    margin: 0 0 8px;
    font-size: clamp(1.02rem, 2.4vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(208, 214, 224, 0.94);
}

.co-route-incomplete-slab__body {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.024em;
    color: rgba(168, 176, 186, 0.96);
}

.co-route-picker {
    padding: clamp(20px, 3.2vw, 26px) clamp(20px, 3.2vw, 28px);
    border-radius: 2px;
    border: 1px solid var(--tier-frame);
    background: var(--surface);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 0 0 1px rgba(0, 0, 0, 0.32);
}

.co-route-picker__title {
    margin: 0 0 16px;
    font-size: clamp(1.02rem, 2.35vw, 1.14rem);
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(210, 216, 224, 0.95);
}

.co-block--gate-fallback {
    margin-top: clamp(22px, 3.5vw, 30px);
    padding-top: 18px;
    border-top: 1px solid var(--tier-lane-rule);
}

.co-fallback-gate .btn {
    width: auto;
    min-height: 42px;
}

#co-checkout-action-pro,
#co-checkout-action-pro-hold,
#co-checkout-action-core {
    scroll-margin-top: calc(72px + 28px);
}

.co-final-gate__cta--split {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.co-final-gate__cta--split .btn {
    width: auto;
    min-height: 42px;
}

/* —— Blocks —— */
.co-block {
    margin-top: var(--block-gap);
}

.co-block:first-child {
    margin-top: 0;
}

.co-block-kicker {
    margin: 0 0 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(148, 156, 168, 0.82);
}

/* —— 2. Selected access summary (primary route slab — tier-surface family) —— */
.co-access-plate {
    padding: clamp(22px, 3.4vw, 30px) clamp(22px, 3vw, 28px);
    border-radius: 2px;
    border: 1px solid var(--tier-frame);
    background: var(--slab-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 0 0 1px rgba(0, 0, 0, 0.35);
}

.co-access-plate--unset .co-access-plate__tier {
    font-size: clamp(1.1rem, 2.6vw, 1.35rem);
    color: rgba(180, 188, 198, 0.92);
}

.co-access-plate__tier {
    margin: 0 0 12px;
    font-size: clamp(1.65rem, 4.5vw, 2.15rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.1;
    color: rgba(241, 245, 249, 0.97);
}

.co-access-plate__price {
    margin: 0 0 14px;
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(220, 228, 238, 0.95);
}

.co-access-plate__per {
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(148, 156, 168, 0.95);
}

.co-access-plate__kind {
    margin: -6px 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(180, 188, 198, 0.92);
}

.co-access-plate__status {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 156, 168, 0.95);
}

.co-access-plate__line {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: rgba(190, 198, 208, 0.94);
}

.co-access-plate__line:last-of-type {
    margin-bottom: 0;
}

.co-access-plate--route {
    border-color: rgba(255, 255, 255, 0.19);
    background: #020203;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.38);
}

.co-flow--canonical .co-access-plate--route .co-access-plate__tier {
    font-size: clamp(1.72rem, 4.8vw, 2.28rem);
}

/* —— 3. Access truth —— */
.co-truth-slab__title {
    margin: 0 0 14px;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(200, 208, 218, 0.88);
}

.co-truth-rows {
    padding: clamp(16px, 2.2vw, 20px) clamp(18px, 3vw, 28px);
    border-radius: 2px;
    border: 1px solid var(--tier-frame);
    background: var(--surface);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.28);
}

.co-truth-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--tier-lane-rule);
}

.co-truth-row:first-child {
    padding-top: 0;
}

.co-truth-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.co-truth-row__label {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 156, 168, 0.96);
}

.co-truth-row__body {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: rgba(165, 172, 182, 0.95);
}

/* —— 4. Payment / application action (route action slab — same frame grammar) —— */
.co-action-slab {
    padding: clamp(20px, 3vw, 26px) clamp(20px, 3vw, 28px);
    border-radius: 2px;
    border: 1px solid var(--tier-frame);
    background: var(--surface);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.042),
        0 0 0 1px rgba(0, 0, 0, 0.28);
}

.co-action-slab--hold {
    border-color: rgba(255, 255, 255, 0.17);
    background: #060607;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.048),
        0 0 0 1px rgba(0, 0, 0, 0.34);
}

.co-flow--pro-route .co-action-slab__title {
    font-size: clamp(1.08rem, 2.45vw, 1.22rem);
    letter-spacing: 0.11em;
}

.co-block--action > .co-action-slab__title {
    margin-bottom: 14px;
}

.co-action-slab__title {
    margin: 0 0 10px;
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.3;
    color: rgba(229, 231, 235, 0.95);
}

.co-action-slab__support {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: rgba(155, 162, 172, 0.96);
}

.co-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.co-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
}

.co-actions--split {
    flex-direction: row;
    gap: 10px;
}

.co-actions--split .btn {
    flex: 1;
    min-height: 44px;
}

.co-actions--inline {
    margin-top: 0;
}

.co-actions--inline .btn {
    width: auto;
    min-width: min(100%, 280px);
}

.co-error {
    margin: 10px 0 0;
    min-height: 1.2em;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: rgba(248, 180, 140, 0.92);
}

.co-inline-note {
    margin: 14px 0 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(120, 128, 138, 0.95);
}

.co-inline-note a {
    color: rgba(180, 188, 198, 0.88);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.co-inline-note a:hover {
    color: var(--text);
}

.co-inline-sep {
    margin: 0 6px;
    opacity: 0.45;
}

/* —— 5. Final gate (quietest) —— */
.co-block--gate {
    margin-top: clamp(28px, 4vw, 36px);
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.co-final-gate__cta .btn {
    width: auto;
    min-height: 42px;
    padding-left: 18px;
    padding-right: 18px;
}

.co-footer {
    margin-top: clamp(36px, 6vw, 48px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(138, 144, 153, 0.9);
}

.co-footer a {
    color: rgba(200, 208, 218, 0.88);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.16s ease;
}

.co-footer a:hover {
    color: var(--text);
}

.co-footer a[aria-current='page'] {
    color: var(--text);
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

.co-main--stage-canceled .co-checkout-header {
    display: none !important;
}

.co-canceled-lead {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--dim);
    letter-spacing: 0.02em;
}

.co-pro-phase {
    width: 100%;
}

.co-footer-sep {
    opacity: 0.45;
    user-select: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    min-height: 48px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.03);
}

.btn-primary {
    background: var(--accent);
    color: #f8fafc;
    border-color: var(--accent-border);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:disabled,
.btn-primary:disabled:hover {
    background: var(--accent);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.16);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.co-brand:focus-visible,
.co-header-nav a:focus-visible,
.btn:focus-visible,
.co-footer a:focus-visible,
.co-inline-note a:focus-visible {
    outline: 1px solid rgba(59, 130, 246, 0.72);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
