/* ═══════════════════════════════════════════════════════════════
   Cachee.ai — Shared Design System
   Used by: start.html, checkout-success.html, login.html, portal
   Version: 1.0.0 — February 2026
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── WCAG 2.1 AA: Focus Visible ─── */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ─── WCAG 2.1 AA: Screen Reader Only ─── */
.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;
}
.sr-only:focus, .sr-only.focus\:not-sr-only:focus {
    position: absolute;
    width: auto;
    height: auto;
    padding: 0.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ─── Design Tokens ─── */
:root {
    /* Backgrounds */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-element: #222222;

    /* Short aliases (backward compat with start.html inline refs) */
    --bg: var(--bg-primary);
    --bg2: var(--bg-secondary);
    --card: var(--bg-card);
    --el: var(--bg-element);

    /* Brand colors */
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --accent: #00D084;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* Short text aliases */
    --t1: var(--text-primary);
    --t2: var(--text-secondary);
    --t3: var(--text-muted);

    /* Borders & surfaces */
    --border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(135deg, #0066FF 0%, #00D084 100%);
    --grad: var(--gradient);

    /* Glow accents */
    --glow-b: rgba(0, 102, 255, 0.15);
    --glow-g: rgba(0, 208, 132, 0.15);
}


/* ─── Base ─── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}


/* ─── Background Animation ─── */
.bg-a, .bg-anim {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.3;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 208, 132, 0.4) 0%, transparent 50%);
    animation: bgShift 20s ease infinite;
}
@keyframes bgShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -30px); }
}
/* Legacy alias */
@keyframes bg {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -30px); }
}


/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
    padding: 0.5rem 1.25rem;
    background: var(--gradient);
    border-radius: 8px;
    color: white !important;
    font-weight: 600 !important;
}
@media (max-width: 640px) {
    .nav-links a:not(.nav-cta) { display: none; }
}


/* ═══════════════════════════════════════
   LAYOUT CONTAINERS
   ═══════════════════════════════════════ */
.wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.wrap--wide { max-width: 880px; }


/* ═══════════════════════════════════════
   CARDS
   ═══════════════════════════════════════ */
.card, .wc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    animation: cardIn 0.45s ease;
}
.wc { display: none; }
.wc.active { display: block; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Legacy alias */
@keyframes ci {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════ */
.pg-hdr { text-align: center; margin-bottom: 2rem; }
.pg-hdr h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}
.pg-hdr h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pg-hdr p { color: var(--text-secondary); font-size: 1.05rem; }

/* Trust badges */
.trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.trust span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.trust i { color: var(--accent); font-size: 0.7rem; }


/* ═══════════════════════════════════════
   STEPPER
   ═══════════════════════════════════════ */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.st-step { display: flex; align-items: center; gap: 0.5rem; }
.st-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    transition: all 0.4s;
    flex-shrink: 0;
}
.st-step.active .st-dot {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 208, 132, 0.35);
}
.st-step.done .st-dot {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}
.st-lbl {
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-muted); transition: color 0.3s;
}
.st-step.active .st-lbl { color: var(--accent); }
.st-step.done .st-lbl { color: var(--success); }
.st-line {
    width: 48px; height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
    flex-shrink: 0;
    transition: background 0.4s;
}
.st-line.filled { background: var(--success); }
@media (max-width: 540px) {
    .st-lbl { display: none; }
    .st-line { width: 32px; }
}


/* ═══════════════════════════════════════
   CARD TITLES
   ═══════════════════════════════════════ */
.ct {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.4rem;
}
.cs {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}


/* ═══════════════════════════════════════
   FORM FIELDS
   ═══════════════════════════════════════ */
.field { margin-bottom: 1.25rem; }
.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.field input, .field select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}
.field select {
    cursor: pointer;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.field select option { background: var(--bg-secondary); color: var(--text-primary); }

/* Field helpers */
.fh { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.fh a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Two-column field row */
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .fr { grid-template-columns: 1fr; } }

.required { color: var(--accent); }

/* Phone input wrapper */
.ph-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.ph-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}
.ph-cc {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.75rem;
    border-right: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
}
.ph-in {
    flex: 1;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}
.ph-in::placeholder { color: var(--text-muted); }


/* ═══════════════════════════════════════
   CHECKBOX PANEL
   ═══════════════════════════════════════ */
.cp {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.25rem 0 1.5rem;
}
.cp-t {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.cc {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0.85rem;
}
.cc:last-child { margin-bottom: 0; }
.cc input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}
.cc strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.cc span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-row { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
.btn-row .btn { flex: 1; }

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.95rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-back:hover { border-color: var(--text-muted); color: var(--text-primary); }

.spinner {
    width: 14px; height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: sp 0.7s linear infinite;
    display: inline-block;
}
@keyframes sp { to { transform: rotate(360deg); } }

.resend {
    background: none;
    border: none;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}


/* ═══════════════════════════════════════
   PROGRESS DOTS (sub-step indicators)
   ═══════════════════════════════════════ */
.ad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}
.ad .d {
    width: 10px; height: 10px; border-radius: 5px;
    background: var(--border); transition: all 0.3s;
}
.ad .d.on { width: 24px; background: var(--accent); }
.ad .d.ok { background: var(--success); }


/* ═══════════════════════════════════════
   OTP CODE INPUT
   ═══════════════════════════════════════ */
.ci-g {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
}
.cd {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 1.4rem; font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--accent);
}
.cd:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}
.cd.filled {
    border-color: var(--accent);
    background: rgba(0, 208, 132, 0.06);
}
.cdash {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 300;
    margin: 0 0.15rem;
}


/* ═══════════════════════════════════════
   API KEY DISPLAY
   ═══════════════════════════════════════ */
.kb {
    background: var(--bg-secondary);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}
.kb-l {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}
.kb-v {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    word-break: break-all;
    margin-bottom: 0.75rem;
}
.kb-c {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.kb-c:hover { background: var(--accent); color: var(--bg-primary); }

/* Key row (inline copy) */
.kro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    margin-top: 0.25rem;
}
.kro code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    word-break: break-all;
}
.kro-cp {
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: all 0.2s;
}
.kro-cp:hover { color: var(--accent); border-color: var(--accent); }


/* ═══════════════════════════════════════
   RADIO OPTION CARDS
   ═══════════════════════════════════════ */
.do { display: grid; gap: 0.75rem; margin-bottom: 0.75rem; }
.dopt {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
}
.dopt:hover { border-color: rgba(0, 208, 132, 0.35); }
.dopt.sel { border-color: var(--accent); background: rgba(0, 208, 132, 0.06); }
.dopt .rad {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0; margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.dopt.sel .rad { border-color: var(--accent); }
.dopt.sel .rad::after {
    content: '';
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
}
.dopt .oic {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.dopt .ob { flex: 1; }
.dopt .ot { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.15rem; }
.dopt .od { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }


/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */
.badge {
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem; border-radius: 4px;
    margin-left: 0.5rem;
}
.b-rec { background: rgba(0, 208, 132, 0.15); color: var(--accent); }
.b-fast { background: rgba(0, 102, 255, 0.15); color: var(--primary); }
.b-ent { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* Overlay provider chips */
.ov-chip {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.75rem; border-radius: 8px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 500; color: var(--t2);
    cursor: pointer; transition: all 0.15s ease;
    user-select: none;
}
.ov-chip:hover { border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.06); }
.ov-chip.sel {
    border-color: #A855F7; background: rgba(168,85,247,.1);
    color: var(--t1); box-shadow: 0 0 0 1px rgba(168,85,247,.3);
}
.ov-chip i { font-size: 0.9rem; width: 1rem; text-align: center; }


/* ═══════════════════════════════════════
   CODE / COMMAND BOXES
   ═══════════════════════════════════════ */
.cmd, .cmd-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    position: relative;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre;
}
.cmd .cc-btn, .cmd-copy {
    position: absolute;
    top: 0.6rem; right: 0.6rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.cmd .cc-btn:hover, .cmd-copy:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Syntax highlighting tokens */
.cmd .p, .cmd .g, .cmd-box .g { color: var(--accent); }
.cmd .f, .cmd .b, .cmd-box .b { color: var(--primary); }
.cmd .s { color: var(--accent); }
.cmd .c, .cmd-box .c { color: var(--text-muted); }
.cmd .v, .cmd-box .v { color: var(--success); }


/* ═══════════════════════════════════════
   INFO / WARNING / HELP BOXES
   ═══════════════════════════════════════ */
.ib {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.ib i { margin-top: 2px; flex-shrink: 0; }
.ib.info {
    background: rgba(0, 102, 255, 0.06);
    border: 1px solid rgba(0, 102, 255, 0.2);
}
.ib.info i { color: var(--primary); }
.ib.warn {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.ib.warn i { color: var(--warning); }
.ib.help {
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.ib.help i { color: #8B5CF6; }


/* ═══════════════════════════════════════
   INFRASTRUCTURE PANELS
   ═══════════════════════════════════════ */
.infra {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}
.infra-t {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.infra-t i { color: var(--accent); }


/* ═══════════════════════════════════════
   DEPLOY PROGRESS (Step 3)
   ═══════════════════════════════════════ */
.dp { margin: 1.5rem 0; }
.pt {
    width: 100%; height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.pf {
    height: 100%; border-radius: 3px;
    background: var(--gradient);
    width: 0%;
    transition: width 0.6s ease;
}
.dl { max-height: 280px; overflow-y: auto; }
.ll {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.82rem;
    animation: li 0.3s ease;
}
@keyframes li {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}
.li {
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; flex-shrink: 0; margin-top: 2px;
}
.li.ok { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.li.fail { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.li.spin { background: rgba(0, 102, 255, 0.15); color: var(--primary); }
.lt { color: var(--text-secondary); }
.lt strong { color: var(--text-primary); font-weight: 500; }
.ltm {
    margin-left: auto;
    font-family: 'SF Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}


/* ═══════════════════════════════════════
   SUCCESS HEADER (Step 4 / Checkout)
   ═══════════════════════════════════════ */
.sg, .success-glow {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}
.sr, .success-ring {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 3px solid var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 1.25rem;
    animation: popIn 0.5s ease;
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
/* Legacy alias */
@keyframes sp2 {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
.success-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.3rem; }
.success-sub { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.75rem; }


/* ═══════════════════════════════════════
   METRICS CARDS
   ═══════════════════════════════════════ */
/* start.html uses .mr/.mb, checkout-success.html uses .metrics/.metric */
.mr, .metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.mb, .metric {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}
.mb .mv, .metric .val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.mb .ml, .metric .lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}


/* ═══════════════════════════════════════
   PLAN CARDS (unified)
   ═══════════════════════════════════════ */
/* start.html class names */
.plan-card, .plan {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    position: relative;
}
.plan { border-radius: 14px; padding: 1.5rem 1.15rem 1.25rem; }
.plan-card:hover, .plan:hover { border-color: rgba(0, 208, 132, 0.35); }
.plan-card.sel, .plan.selected { border-color: var(--accent); background: rgba(0, 208, 132, 0.04); }
.plan.popular { border-color: var(--primary); }
.plan.popular:hover { border-color: var(--primary); }
.plan.popular.selected { border-color: var(--primary); background: rgba(0, 102, 255, 0.04); }

/* Badge row */
.plan-badge-row { height: 20px; margin-bottom: 0.5rem; }
.plan-badge-spacer { height: 23px; margin-bottom: 0.65rem; }

/* Plan badges */
.plan-badge {
    display: inline-block;
    font-size: 0.6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.18rem 0.55rem; border-radius: 4px;
    margin-bottom: 0.65rem;
}
.plan-current, .badge-current { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 4px; background: rgba(16, 185, 129, 0.12); color: var(--success); }
.plan-pop, .badge-popular { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 4px; background: rgba(0, 102, 255, 0.15); color: var(--primary); }
.plan-ent, .badge-enterprise { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 4px; background: rgba(245, 158, 11, 0.12); color: var(--warning); }

/* Plan content */
.plan-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.25rem; }
.plan-price { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.2rem; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
.plan-per { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.85rem; }

/* Plan features list */
.plan-feats, .plan-features { list-style: none; padding: 0; margin-bottom: 1rem; text-align: left; }
.plan-feats li, .plan-features li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 0.2rem 0 0.2rem 1.1rem;
    position: relative;
    line-height: 1.5;
}
.plan-feats li::before, .plan-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
}
.plan-feats li.plan-limit, .plan-features li.limit { color: var(--text-muted); }
.plan-feats li.plan-limit::before, .plan-features li.limit::before { content: '\2014'; color: var(--text-muted); }
.plan-feats li strong, .plan-features li strong { color: var(--text-primary); font-weight: 600; }

/* Plan buttons */
.plan-btn, .plan-cta {
    width: 100%;
    padding: 0.75rem 0.6rem;
    min-height: 44px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.free-btn, .cta-current {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.plan-card.sel .free-btn, .plan.selected .cta-current {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}
.grow-btn, .cta-upgrade { background: var(--gradient); color: #fff; }
.grow-btn:hover, .cta-upgrade:hover {
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
    transform: translateY(-1px);
}
.scale-btn, .cta-scale {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.scale-btn:hover, .cta-scale:hover { background: rgba(245, 158, 11, 0.2); }

/* Plan grid */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }

/* Plan section header */
.plan-section { border-top: 1px solid var(--border); padding-top: 2rem; margin-bottom: 2rem; }
.plan-header { text-align: center; margin-bottom: 0.35rem; font-size: 1.15rem; font-weight: 700; }
.plan-sub { text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1.5rem; }
.plan-sub strong { color: var(--accent); font-weight: 600; }


/* ═══════════════════════════════════════
   QUICK LINKS
   ═══════════════════════════════════════ */
/* start.html class names */
.ns {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    cursor: pointer;
}
.ns:hover { border-color: rgba(0, 208, 132, 0.3); transform: translateX(2px); }
.ns .ni {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.ns .nt { font-size: 0.88rem; font-weight: 500; }
.ns .nd { font-size: 0.78rem; color: var(--text-secondary); }
.ns .na { margin-left: auto; color: var(--text-muted); }

/* checkout-success.html class names */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.qlink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}
.qlink:hover { border-color: rgba(0, 208, 132, 0.3); transform: translateX(2px); }
.qlink-icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.qlink-title { font-size: 0.88rem; font-weight: 500; }
.qlink-desc { font-size: 0.75rem; color: var(--text-secondary); }
.qlink-arrow { margin-left: auto; color: var(--text-muted); font-size: 0.8rem; }


/* ═══════════════════════════════════════
   FOOTER & SUPPORT LINE
   ═══════════════════════════════════════ */
.foot, .footer {
    text-align: center;
    padding: 2rem 0 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.foot a, .footer a { color: var(--text-secondary); text-decoration: none; }
.foot a:hover, .footer a:hover { color: var(--accent); }

.support-line {
    text-align: center;
    padding-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.support-line a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Legal footer text */
.al { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 1.25rem; line-height: 1.6; }
.al a { color: var(--accent); text-decoration: none; font-weight: 500; }
.as {
    text-align: center; margin-top: 1rem; font-size: 0.78rem;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.as i { color: var(--accent); }
.as strong { color: var(--text-secondary); }


/* ═══════════════════════════════════════
   TEST SECTION (checkout-success)
   ═══════════════════════════════════════ */
.test-section { margin-bottom: 2rem; }
.test-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }


/* ═══════════════════════════════════════
   BRAND ICON
   ═══════════════════════════════════════ */
.bm {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--gradient);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; color: #fff;
    margin: 0 auto;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .card { padding: 1.75rem 1.25rem; }
    .plan-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .quick-links { grid-template-columns: 1fr; }
    .metrics { gap: 0.5rem; }
    .metric { padding: 0.75rem 0.5rem; }
    .metric .val { font-size: 1.1rem; }
}

@media (max-width: 640px) {
    #planGrid { grid-template-columns: 1fr !important; }
    .plan-card { padding: 1rem; }
    .infra .fr { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .plan-grid { grid-template-columns: 1fr !important; }
}
