/* ═══════════════════════════════════════════════════════════════
   AUTH FLOW — Full-screen two-panel auth + onboarding
   Replaces login-modal.css. Single continuous experience:
   left media card + right flow panel (auth → onboarding → done).
   ═══════════════════════════════════════════════════════════════ */

/* ---- Full-screen container ---- */
#authFlow {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: var(--c-050805);
    color: var(--c-f9fafb);
    font-family: var(--ff-sans);
    -webkit-font-smoothing: antialiased;
}
#authFlow.active {
    display: block;
}

/* ---- Backdrop layers ---- */
.auth-flow-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-flow-glass {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 65% 15%, rgba(74,222,128,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 700px 500px at 85% 75%, var(--c-violet-400-a14) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 40% 50%, rgba(52,211,153,0.10) 0%, transparent 70%),
        radial-gradient(ellipse 500px 400px at 75% 45%, rgba(251,191,36,0.06) 0%, transparent 70%),
        linear-gradient(180deg, rgba(12,18,14,0.85) 0%, rgba(8,12,10,0.92) 100%);
}
.auth-flow-grid {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 47px, var(--c-white-a2p5) 47px, var(--c-white-a2p5) 48px),
        repeating-linear-gradient(90deg, transparent, transparent 47px, var(--c-white-a2p5) 47px, var(--c-white-a2p5) 48px);
}

@supports not (backdrop-filter: blur(1px)) {
    .auth-flow-glass {
        background: var(--c-050805-a92);
    }
}

/* ---- Single full-bleed glass panel ---- */
.auth-flow-panels {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, var(--c-white-a4p5) 0%, var(--c-white-a2) 100%);
    backdrop-filter: var(--bl-48) saturate(140%);
    -webkit-backdrop-filter: var(--bl-48) saturate(140%);
}
@supports not (backdrop-filter: blur(1px)) {
    .auth-flow-panels {
        background: rgba(14,20,16,0.95);
    }
}


/* ═══════════════════════════════════════════════════════════════
   LEFT — Inlaid video card
   ═══════════════════════════════════════════════════════════════ */
.auth-flow-media {
    position: relative;
    flex: 1 1 50%;
    max-width: 50%;
    margin: var(--sp-16);
    margin-right: 0;
    border-radius: var(--r-20);
    overflow: hidden;
    background: #0a120c;
    border: 1px solid var(--c-white-a8);
    box-shadow: 0 20px 60px var(--c-black-a40);
    transition: flex 0.5s cubic-bezier(0.65, 0, 0.35, 1), max-width 0.5s cubic-bezier(0.65, 0, 0.35, 1), width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
#authFlow[data-phase="onboarding"] .auth-flow-media {
    flex: 0 0 auto;
    width: calc((100vh - 32px) * 9 / 16);
    max-width: 34%;
}
.auth-flow-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-flow-media-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--c-050805) 0%, var(--c-050805-a45) 30%, var(--c-050805-a0) 60%, var(--c-050805-a20) 100%);
    pointer-events: none;
}
.auth-flow-lettermark {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 2;
    height: 20px;
    filter: invert(1);
    opacity: 0.85;
}
.auth-flow-caption {
    position: absolute;
    left: 20px;
    bottom: 190px;
    z-index: 4;
    display: none;
    align-items: center;
    gap: var(--sp-8);
    padding: var(--sp-7) var(--sp-12);
    border-radius: var(--r-pill);
    background: var(--c-050805-a45);
    border: 1px solid var(--c-white-a12);
    backdrop-filter: var(--bl-16);
    -webkit-backdrop-filter: var(--bl-16);
}
.auth-flow-caption-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-green-350);
    box-shadow: 0 0 8px var(--c-green-350);
    flex-shrink: 0;
}
.auth-flow-caption-text {
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    font-weight: 500;
    color: var(--c-white-a80);
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* ---- Media card bottom: segment bar + headline + stats ---- */
.auth-flow-media-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 var(--sp-32) var(--sp-36);
}
.auth-flow-segment-bar {
    display: flex;
    gap: var(--sp-2);
    height: 3px;
    border-radius: var(--r-2);
    overflow: hidden;
    margin-bottom: var(--sp-14);
}
.auth-flow-media-headline {
    font-size: clamp(var(--fs-26), 3.2vw, var(--fs-42));
    font-weight: 700;
    color: var(--c-f9fafb);
    line-height: 1.15;
    letter-spacing: -0.5px;
    text-wrap: balance;
    font-family: var(--ff-sans);
}
.auth-flow-media-subcopy {
    font-size: var(--fs-15);
    color: var(--c-white-a40);
    margin-top: var(--sp-12);
    line-height: 1.5;
    max-width: 420px;
    font-family: var(--ff-sans);
}
.auth-flow-media-stats {
    display: flex;
    gap: var(--sp-24);
    margin-top: var(--sp-20);
    align-items: center;
}
.auth-flow-stat-value {
    font-family: var(--ff-mono);
    font-size: var(--fs-13);
    font-weight: 700;
    color: var(--c-green-350);
}
.auth-flow-stat-label {
    font-size: var(--fs-12);
    color: var(--c-white-a30);
    font-family: var(--ff-sans);
}
.auth-flow-stat-divider {
    width: 1px;
    height: 16px;
    background: var(--c-white-a8);
}


/* ═══════════════════════════════════════════════════════════════
   RIGHT — Flow panel
   ═══════════════════════════════════════════════════════════════ */
.auth-flow-right {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ---- Top bar: progress + back + skip ---- */
.auth-flow-topbar {
    position: relative;
    height: 72px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
#authFlow[data-phase="auth"] .auth-flow-topbar {
    display: none;
}
#authFlow[data-phase="auth"] .auth-flow-footer {
    display: none;
}
#authFlow[data-phase="auth"] .auth-flow-caption {
    display: none;
}

.auth-flow-back {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--c-white-a10);
    background: var(--c-white-a3);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.auth-flow-back:hover {
    background: var(--c-white-a8);
    color: var(--c-white);
}
.auth-flow-back[hidden] {
    display: none;
}

.auth-flow-segs {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
}
.auth-flow-seg {
    height: 4px;
    border-radius: var(--r-2);
    background: var(--c-white-a12);
    width: 16px;
    transition: all 0.35s cubic-bezier(0.65, 0, 0.35, 1);
    cursor: default;
}
.auth-flow-seg.visited {
    cursor: pointer;
}
.auth-flow-seg.done {
    background: var(--c-green-350);
}
.auth-flow-seg.active {
    background: var(--c-green-350);
    width: 32px;
}
.auth-flow-seg.future {
    background: var(--c-white-a12);
    width: 16px;
}
.auth-flow-seg.visited-inactive {
    background: var(--c-green-350-a35);
}

.auth-flow-skip {
    position: absolute;
    right: 20px;
    top: 24px;
    border: none;
    background: none;
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    letter-spacing: 1px;
    color: var(--c-white-a40);
    cursor: pointer;
    padding: var(--sp-6);
}
.auth-flow-skip:hover {
    color: var(--c-white-a80);
}

/* ---- Content area ---- */
.auth-flow-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    place-items: center;
    padding: 0 var(--sp-40);
}

/* ---- Footer ---- */
.auth-flow-footer {
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-14);
    color: var(--c-white-a35);
    text-align: center;
    padding: 0 var(--sp-24);
}


/* ═══════════════════════════════════════════════════════════════
   STEP CONTAINERS + TRANSITIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes afIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.auth-flow-step {
    display: none;
    width: 100%;
    max-width: 720px;
    flex-direction: column;
    align-items: center;
}
.auth-flow-step.active {
    display: flex;
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}


/* ═══════════════════════════════════════════════════════════════
   STEP CONTENT — shared typography
   ═══════════════════════════════════════════════════════════════ */
.af-eyebrow {
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--c-green-350);
    margin-bottom: var(--sp-18);
}
.af-headline {
    font-size: var(--fs-52);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-align: center;
    text-wrap: balance;
}
.af-headline .dim {
    color: var(--c-white-a45);
}
.af-body {
    font-size: var(--fs-16);
    line-height: 1.55;
    color: var(--c-white-a55);
    text-align: center;
    max-width: 520px;
    margin-top: var(--sp-18);
    text-wrap: pretty;
}


/* ═══════════════════════════════════════════════════════════════
   SINGLE-SELECT CARDS (usage, volume)
   ═══════════════════════════════════════════════════════════════ */
.af-single-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-12);
    margin-top: var(--sp-48);
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-single-card {
    position: relative;
    text-align: left;
    min-height: 168px;
    padding: var(--sp-22);
    border-radius: var(--r-14);
    border: 1px solid var(--c-white-a10);
    background: var(--c-white-a3);
    color: var(--c-f9fafb);
    font-family: var(--ff-sans);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--sp-24);
    box-shadow: inset 0 1px 0 var(--c-white-a5);
    transition: all 0.18s;
}
.af-single-card:hover {
    border-color: var(--c-white-a22);
    background: var(--c-white-a6);
}
.af-single-card.selected {
    border-color: var(--c-green-350-a55);
    background: rgba(74,222,128,0.07);
}
.af-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.af-card-num {
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    color: var(--c-white-a40);
    letter-spacing: 1px;
}
.af-card-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--c-white-a22);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.af-single-card.selected .af-card-radio {
    border-color: var(--c-green-350);
}
.af-card-radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
}
.af-single-card.selected .af-card-radio-dot {
    background: var(--c-green-350);
}
.af-card-title {
    font-size: var(--fs-17);
    font-weight: 600;
    letter-spacing: -0.2px;
}
.af-card-desc {
    font-size: var(--fs-13);
    color: var(--c-white-a45);
    margin-top: var(--sp-6);
    line-height: 1.45;
}


/* ═══════════════════════════════════════════════════════════════
   MULTI-SELECT CHIPS (platforms)
   ═══════════════════════════════════════════════════════════════ */
.af-multi-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-10);
    margin-top: var(--sp-48);
    max-width: 640px;
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-chip {
    height: 48px;
    padding: 0 var(--sp-20);
    border-radius: var(--r-pill);
    border: 1px solid var(--c-white-a10);
    background: var(--c-white-a4);
    color: var(--c-white-a80);
    font-family: var(--ff-sans);
    font-size: var(--fs-15);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--sp-10);
    transition: all 0.15s;
}
.af-chip:hover {
    border-color: rgba(255,255,255,0.24);
}
.af-chip.selected {
    border-color: var(--c-green-350-a55);
    background: rgba(74,222,128,0.1);
    color: var(--c-f9fafb);
}
.af-chip-ratio {
    font-family: var(--ff-mono);
    font-size: var(--fs-10);
    font-weight: 600;
    color: var(--c-white-a35);
    letter-spacing: 0.3px;
}
.af-chip.selected .af-chip-ratio {
    color: var(--c-green-350);
}


/* ═══════════════════════════════════════════════════════════════
   CTA BUTTON
   ═══════════════════════════════════════════════════════════════ */
.af-cta {
    margin-top: var(--sp-40);
    min-width: 240px;
    height: 52px;
    padding: 0 var(--sp-32);
    border-radius: var(--r-10);
    border: 1px solid var(--c-white-a8);
    background: var(--c-white-a6);
    color: var(--c-white-a35);
    font-family: var(--ff-sans);
    font-size: var(--fs-15);
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-8);
    transition: all 0.2s;
}
.af-cta.ready {
    border: none;
    background: var(--c-green-350);
    color: var(--c-050805);
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(74,222,128,0.25), inset 0 1px 0 var(--c-white-a40);
}
.af-cta.ready:hover {
    background: var(--c-22c55e);
    box-shadow: 0 10px 36px rgba(74,222,128,0.3), inset 0 1px 0 var(--c-white-a40);
}


/* ═══════════════════════════════════════════════════════════════
   DEMO CARDS (ingest / reframe / export)
   ═══════════════════════════════════════════════════════════════ */
.af-demo-card {
    width: 100%;
    max-width: 400px;
    margin-top: var(--sp-32);
    border-radius: var(--r-14);
    background: var(--c-131318-a95);
    backdrop-filter: var(--bl-16);
    -webkit-backdrop-filter: var(--bl-16);
    border: 1px solid var(--c-white-a6);
    box-shadow: var(--sh-25);
    overflow: hidden;
    text-align: left;
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-demo-card-wide {
    width: 100%;
    max-width: 700px;
    margin-top: var(--sp-32);
    border-radius: var(--r-14);
    background: var(--c-131318-a95);
    backdrop-filter: var(--bl-16);
    -webkit-backdrop-filter: var(--bl-16);
    border: 1px solid var(--c-white-a6);
    box-shadow: var(--sh-25);
    overflow: hidden;
    text-align: left;
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-demo-header {
    padding: var(--sp-8) var(--sp-12);
    background: var(--c-white-a1p5);
    border-bottom: 1px solid var(--c-white-a4);
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}
.af-demo-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.af-demo-dot.purple  { background: var(--c-violet-400); }
.af-demo-dot.green   { background: var(--c-green-400); }
.af-demo-dot.yellow  { background: var(--c-amber-400); }
.af-demo-dot.blue    { background: var(--c-blue-400); }

.af-demo-label {
    font: 600 9px 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}
.af-demo-label.purple { color: var(--c-violet-400-a50); }
.af-demo-label.green  { color: var(--c-green-400-a50); }
.af-demo-label.yellow { color: rgba(251,191,36,0.5); }

.af-demo-meta {
    font: 400 8px 'JetBrains Mono', monospace;
    color: var(--c-white-a10);
    margin-left: auto;
}
.af-demo-body {
    padding: var(--sp-14);
}

/* Reframe demo — special card with green border glow */
.af-demo-card-reframe {
    width: 100%;
    max-width: 700px;
    margin-top: var(--sp-32);
    border-radius: var(--r-14);
    background: var(--c-0a0a0f);
    overflow: hidden;
    text-align: left;
    border: 1px solid var(--c-green-400-a12);
    box-shadow: 0 0 10px rgba(52,211,153,0.08), 0 0 30px var(--c-green-400-a4), 0 8px 32px var(--c-black-a50);
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Reframe preview row */
.af-reframe-row {
    container-type: inline-size;
    display: flex;
    gap: var(--sp-10);
    padding: var(--sp-10);
    box-sizing: border-box;
    justify-content: center;
}
.af-reframe-master {
    position: relative;
    height: min(240px, calc((100cqw - 30px) / 2.578));
    width: calc(min(240px, calc((100cqw - 30px) / 2.578)) * 1.7778);
    flex-shrink: 0;
    border-radius: var(--r-6);
    overflow: hidden;
    background: var(--c-060608);
}
.af-reframe-master video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.af-reframe-crop {
    position: absolute;
    box-sizing: border-box;
    border: 2px solid var(--c-orange-500);
    box-shadow: 0 0 0 9999px var(--c-black-a45);
    transition: all 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    pointer-events: none;
}
.af-reframe-crop-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
}
.af-reframe-crop-crosshair::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--c-orange-500-a70);
}
.af-reframe-crop-crosshair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--c-orange-500-a70);
}
.af-reframe-crop-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font: 400 9px 'JetBrains Mono', monospace;
    color: var(--c-orange-500);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--c-black-a60);
    padding: var(--sp-2) var(--sp-6);
    border-radius: var(--r-3);
    white-space: nowrap;
}
.af-reframe-master-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: var(--sp-4) var(--sp-10);
    border-radius: var(--r-6);
    background: var(--c-black-a70);
    backdrop-filter: var(--bl-4);
    border: 1px solid rgba(52,211,153,0.15);
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}
.af-reframe-output {
    position: relative;
    flex-shrink: 0;
    border-radius: var(--r-6);
    overflow: hidden;
    background: var(--c-060608);
    box-sizing: border-box;
    transition: width 0.9s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.3s;
}
.af-reframe-output video {
    position: absolute;
    max-width: none;
    object-fit: cover;
    transition: all 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.af-reframe-output-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: var(--sp-3) var(--sp-8);
    border-radius: var(--r-5);
    font: 700 9px 'JetBrains Mono', monospace;
}

/* Reframe tabs */
.af-reframe-tabs {
    padding: var(--sp-6) var(--sp-14) var(--sp-8);
    border-top: 1px solid var(--c-white-a3);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.af-reframe-tab {
    padding: var(--sp-4) var(--sp-10);
    border-radius: var(--r-6);
    border: 1px solid var(--c-white-a4);
    background: var(--c-white-a2);
    font: 600 9px 'JetBrains Mono', monospace;
    color: var(--c-white-a20);
    transition: all 0.3s;
    cursor: pointer;
}
.af-reframe-tab.active {
    /* colors set via inline styles from JS per ratio */
}

/* Reframe status bar */
.af-reframe-status {
    font: 600 9px 'JetBrains Mono', monospace;
    margin-left: auto;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}
.af-reframe-telemetry {
    margin-left: auto;
    display: flex;
    gap: var(--sp-12);
    font: 400 9px 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
    color: var(--c-white-a25);
}

/* Reframe chat messages */
.af-reframe-chat {
    padding: var(--sp-10) var(--sp-14) var(--sp-12);
    border-top: 1px solid var(--c-white-a4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}
.af-reframe-msg {
    display: flex;
    gap: var(--sp-8);
    font: 400 12px/1.5 'JetBrains Mono', monospace;
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-reframe-input {
    padding: var(--sp-9) var(--sp-12);
    border-radius: var(--r-8);
    background: var(--c-white-a1p5);
    border: 1px solid var(--c-white-a3);
    font: 400 12px 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    transition: border-color 0.2s;
}

/* Ingest demo — file tree */
.af-ingest-cmd {
    padding: var(--sp-10) var(--sp-14);
    border-radius: var(--r-8);
    background: var(--c-white-a1p5);
    border: 1px solid var(--c-white-a3);
    margin-bottom: var(--sp-14);
    font: 400 12px 'JetBrains Mono', monospace;
    color: var(--c-white-a20);
}
.af-ingest-cmd .prompt {
    color: var(--c-violet-400-a50);
}
.af-ingest-tree {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--sp-14);
}
.af-ingest-tree-item {
    padding: var(--sp-6) var(--sp-14);
    font: 400 13px/1.8 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
}
.af-ingest-tree-item .branch {
    margin-right: var(--sp-8);
}
.af-ingest-tree-item .name {
    color: var(--c-white-a65);
}
.af-ingest-tree-item .size {
    color: var(--c-white-a20);
    margin-left: auto;
    font-size: var(--fs-11);
}
.af-ingest-pass {
    padding: var(--sp-10) var(--sp-14);
    border-radius: var(--r-8);
    background: var(--c-green-400-a4);
    border: 1px solid var(--c-green-400-a6);
    margin-bottom: var(--sp-14);
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    font: 400 12px 'JetBrains Mono', monospace;
    color: rgba(52,211,153,0.7);
}
.af-ingest-summary {
    padding: var(--sp-14) var(--sp-16);
    border-radius: var(--r-10);
    background: var(--c-white-a1p5);
    border: 1px solid var(--c-white-a3);
}
.af-ingest-summary-cmd {
    font: 500 10px 'JetBrains Mono', monospace;
    color: var(--c-violet-400-a50);
    margin-bottom: var(--sp-10);
    letter-spacing: 0.3px;
}
.af-ingest-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.af-ingest-summary-label {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
}
.af-ingest-summary-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--r-2);
}
.af-ingest-download {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    font-size: var(--fs-13);
    font-weight: 500;
    color: var(--c-green-350);
    text-decoration: none;
    margin-top: var(--sp-14);
}
.af-ingest-download:hover {
    color: #86efac;
}

/* Export demo — format bars */
.af-export-pass {
    padding: var(--sp-10) var(--sp-14);
    border-radius: var(--r-8);
    background: var(--c-green-400-a4);
    border: 1px solid var(--c-green-400-a6);
    margin-bottom: var(--sp-16);
    display: flex;
    align-items: center;
    gap: var(--sp-8);
}
.af-export-section-label {
    font: 600 9px 'JetBrains Mono', monospace;
    color: var(--c-white-a12);
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-10);
}
.af-export-formats {
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
    margin-bottom: var(--sp-16);
}
.af-export-format {
    padding: var(--sp-10) var(--sp-14);
    border-radius: var(--r-8);
    background: var(--c-white-a2);
    border: 1px solid var(--c-white-a3);
}
.af-export-format-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--sp-6);
}
.af-export-format-label {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
}
.af-export-bar {
    height: 4px;
    border-radius: var(--r-2);
    background: var(--c-white-a3);
}
.af-export-bar-fill {
    height: 100%;
    border-radius: var(--r-2);
}
.af-export-totals {
    padding: var(--sp-14) var(--sp-16);
    border-radius: var(--r-10);
    background: rgba(124,106,239,0.03);
    border: 1px solid var(--c-violet-400-a4);
    margin-bottom: var(--sp-16);
}
.af-export-totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.af-export-totals-row + .af-export-totals-row {
    margin-top: var(--sp-6);
}
.af-export-download-btn {
    padding: var(--sp-10) 0;
    border-radius: var(--r-8);
    font: 600 11px 'Geist', sans-serif;
    text-align: center;
    background: var(--c-green-400);
    color: var(--c-white);
    box-shadow: 0 2px 8px var(--c-green-400-a20);
    cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════════
   DONE SCREEN
   ═══════════════════════════════════════════════════════════════ */
.af-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-18);
    animation: afIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.af-done-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(74,222,128,0.12);
    border: 1px solid var(--c-green-350-a35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.af-done-title {
    font-size: var(--fs-40);
    font-weight: 600;
    letter-spacing: -1px;
    text-align: center;
}
.af-done-replay {
    border: none;
    background: none;
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    letter-spacing: 1px;
    color: var(--c-white-a40);
    cursor: pointer;
    padding: var(--sp-6);
}
.af-done-replay:hover {
    color: var(--c-green-350);
}


/* ═══════════════════════════════════════════════════════════════
   AUTH STEP — form styles (scoped to #authFlow)
   ═══════════════════════════════════════════════════════════════ */
.af-auth-panel {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
}

.af-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-6);
    background: var(--c-green-350-a8);
    border: 1px solid var(--c-green-350-a15);
    border-radius: var(--r-4);
    padding: var(--sp-5) var(--sp-10);
    margin-bottom: var(--sp-28);
    align-self: flex-start;
}
.af-trial-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-green-350);
}
.af-trial-text {
    font-family: var(--ff-mono);
    font-size: var(--fs-11);
    font-weight: 600;
    color: var(--c-green-350);
    letter-spacing: 0.3px;
}

.af-form-title {
    font-size: var(--fs-26);
    font-weight: 700;
    color: var(--c-f9fafb);
    letter-spacing: -0.3px;
    font-family: var(--ff-sans);
    margin: 0;
}
.af-form-subtitle {
    font-size: var(--fs-14);
    color: var(--c-white-a35);
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-28);
    font-family: var(--ff-sans);
}

.af-google-btn {
    width: 100%;
    height: 50px;
    border-radius: var(--r-8);
    border: 1px solid var(--c-white-a8);
    background: var(--c-white-a3);
    color: var(--c-f9fafb);
    font-family: var(--ff-sans);
    font-size: var(--fs-14);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-10);
    transition: all 0.15s;
}
.af-google-btn:hover {
    background: var(--c-white-a6);
    border-color: var(--c-green-350-a20);
}
.af-google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.af-or {
    display: flex;
    align-items: center;
    gap: var(--sp-14);
    margin: var(--sp-16) 0;
}
.af-or-line {
    flex: 1;
    height: 1px;
    background: var(--c-white-a6);
}
.af-or-text {
    font-family: var(--ff-mono);
    font-size: var(--fs-10);
    color: var(--c-white-a20);
    letter-spacing: 1.5px;
}

.af-field-label {
    font-size: var(--fs-12);
    font-weight: 500;
    color: var(--c-white-a40);
    font-family: var(--ff-sans);
    margin-bottom: var(--sp-8);
    display: block;
}
.af-field-group {
    margin-bottom: var(--sp-12);
}

.af-input {
    width: 100%;
    height: 50px;
    border-radius: var(--r-8);
    border: 1px solid var(--c-white-a8);
    background: var(--c-white-a2);
    color: var(--c-f9fafb);
    font-family: var(--ff-sans);
    font-size: var(--fs-14);
    padding: 0 var(--sp-14);
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s;
}
.af-input:focus {
    border-color: var(--c-green-350-a40);
    box-shadow: var(--sh-09);
}
.af-input::placeholder {
    color: var(--c-white-a15);
}

.af-continue-btn {
    width: 100%;
    height: 50px;
    border-radius: var(--r-8);
    border: none;
    background: var(--c-green-350);
    color: var(--c-050805);
    font-family: var(--ff-sans);
    font-size: var(--fs-14);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: var(--sp-14);
}
.af-continue-btn:hover {
    background: var(--c-22c55e);
    box-shadow: var(--sh-22);
}
.af-continue-btn:active {
    transform: scale(0.99);
}
.af-continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* PIN step */
.af-pin-step {
    display: none;
}
.af-pin-step.active {
    display: block;
}
.af-email-step.hidden {
    display: none;
}

/* SSO section */
.af-sso {
    margin-top: var(--sp-20);
    padding-top: var(--sp-18);
    border-top: 1px solid var(--c-white-a4);
}
.af-sso-label {
    font-family: var(--ff-mono);
    font-size: var(--fs-10);
    color: var(--c-white-a20);
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-10);
}
.af-sso-row {
    display: flex;
    gap: var(--sp-8);
}
.af-sso-btn {
    flex: 1;
    height: 40px;
    border-radius: var(--r-6);
    border: 1px solid var(--c-white-a6);
    background: transparent;
    color: var(--c-white-a40);
    font-family: var(--ff-sans);
    font-size: var(--fs-13);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
    transition: all 0.15s;
}
.af-sso-btn:hover {
    background: var(--c-white-a3);
    color: var(--c-white-a60);
    border-color: var(--c-white-a10);
}

.af-terms {
    margin-top: var(--sp-24);
    font-size: var(--fs-11);
    color: var(--c-white-a15);
    line-height: 1.6;
    font-family: var(--ff-sans);
}
.af-terms a {
    color: var(--c-white-a25);
    text-decoration: none;
    transition: color 0.15s;
}
.af-terms a:hover {
    color: var(--c-white-a45);
}

/* Status / error messages */
.af-status {
    display: none;
    padding: var(--sp-10) var(--sp-12);
    border-radius: var(--r-6);
    margin-top: var(--sp-12);
    font-size: var(--fs-13);
    font-family: var(--ff-sans);
    text-align: center;
}
.af-status.error {
    display: block;
    background: var(--c-red-400-a10);
    border: 1px solid var(--c-red-400-a20);
    color: var(--c-f87171);
}
.af-status.success {
    display: block;
    background: var(--c-green-350-a8);
    border: 1px solid var(--c-green-350-a15);
    color: var(--c-green-350);
}
.af-status.info {
    display: block;
    background: var(--c-blue-400-a8);
    border: 1px solid var(--c-blue-400-a15);
    color: var(--c-blue-400);
}

/* Button loading spinner */
.af-btn-loading {
    position: relative;
    color: transparent !important;
}
.af-btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--c-white-a20);
    border-top-color: var(--c-white);
    border-radius: 50%;
    animation: afSpin 0.6s linear infinite;
}
.af-continue-btn.af-btn-loading::after {
    border-color: var(--c-050805-a20);
    border-top-color: var(--c-050805);
}
@keyframes afSpin {
    to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE — < 768px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .auth-flow-media {
        display: none;
    }
    .auth-flow-panels {
        padding: 0;
        gap: 0;
    }
    .auth-flow-right {
        border-radius: 0;
    }
    .af-headline {
        font-size: var(--fs-36);
        letter-spacing: -1px;
    }
    .af-done-title {
        font-size: var(--fs-30);
    }
    .auth-flow-content {
        padding: var(--sp-24) var(--sp-20);
    }
    .af-single-grid {
        grid-template-columns: 1fr;
    }
    .af-single-card {
        min-height: 120px;
    }
    .af-reframe-row {
        flex-direction: column;
        align-items: center;
    }
    .af-demo-card-reframe {
        max-width: 100%;
    }
}


/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .auth-flow-video {
        display: none;
    }
    .auth-flow-step.active,
    .af-single-grid,
    .af-multi-wrap,
    .af-demo-card,
    .af-demo-card-wide,
    .af-demo-card-reframe,
    .af-done {
        animation: none;
    }
    .af-reframe-crop,
    .af-reframe-output,
    .af-reframe-output video,
    .af-reframe-tab,
    .auth-flow-seg {
        transition: none;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RESUME BAR — Inline bar docked below nav (workspace context)
   ═══════════════════════════════════════════════════════════════ */

.resume-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-12);
    height: 48px;
    padding: 0 var(--sp-12) 0 var(--sp-16);
    background: linear-gradient(90deg, rgba(107,88,224,0.10) 0%, var(--c-white-a92) 45%);
    border-bottom: 1px solid var(--c-violet-400-a12);
    backdrop-filter: var(--bl-16);
    -webkit-backdrop-filter: var(--bl-16);
    animation: resumeBarSlide 0.32s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
    transition: height 0.32s cubic-bezier(0.16,1,0.3,1), opacity 0.32s ease;
}
.resume-bar.collapsing {
    height: 0;
    opacity: 0;
}

@keyframes resumeBarSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.resume-bar__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    position: relative;
}
.resume-bar__icon svg.rb-ring {
    position: absolute;
    inset: 0;
}
.resume-bar__icon .rb-frames {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.resume-bar__icon .rb-frame {
    position: absolute;
    border-radius: var(--r-2);
    animation: rbPulse 3.2s ease-in-out infinite;
}
.resume-bar__icon .rb-frame--16x9 { width: 18px; height: 10px; border: 1.5px solid var(--c-green-600); animation-delay: 0s; }
.resume-bar__icon .rb-frame--4x5  { width: 11px; height: 14px; border: 1.5px solid var(--c-d97706); animation-delay: 0.4s; }
.resume-bar__icon .rb-frame--9x16 { width: 8px;  height: 16px; border: 1.5px solid #6b58e0; animation-delay: 0.8s; }

@keyframes rbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .resume-bar__icon .rb-frame { animation: none; }
}

.resume-bar__label {
    font-family: var(--ff-sans);
    font-weight: 500;
    font-size: var(--fs-12);
    color: rgba(13,13,18,0.45);
    white-space: nowrap;
}

.resume-bar__divider {
    width: 1px;
    height: 20px;
    background: rgba(13,13,18,0.08);
    flex-shrink: 0;
}

.resume-bar__name {
    font-family: var(--ff-mono);
    font-weight: 600;
    font-size: var(--fs-12);
    color: rgba(13,13,18,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.resume-bar__count {
    font-family: var(--ff-mono);
    font-size: var(--fs-10);
    color: rgba(13,13,18,0.3);
    white-space: nowrap;
}

.resume-bar__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-4);
    font-family: var(--ff-mono);
    font-weight: 600;
    font-size: var(--fs-9);
    text-transform: uppercase;
    padding: var(--sp-3) var(--sp-8);
    border-radius: var(--r-8);
    white-space: nowrap;
}
.resume-bar__chip--rendering { background: var(--c-amber-400-a12); color: var(--c-amber-700); }
.resume-bar__chip--rendering .rb-dot { background: var(--c-amber-700); }
.resume-bar__chip--progress  { background: rgba(91,71,214,0.12); color: var(--c-5b47d6); }
.resume-bar__chip--progress .rb-dot  { background: var(--c-5b47d6); }
.resume-bar__chip--review    { background: rgba(220,38,38,0.12); color: var(--c-red-500); }
.resume-bar__chip--review .rb-dot    { background: var(--c-red-500); }
.resume-bar__chip--ready     { background: rgba(4,120,87,0.12); color: var(--c-047857); }
.resume-bar__chip--ready .rb-dot     { background: var(--c-047857); }
.rb-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.resume-bar__time {
    font-family: var(--ff-mono);
    font-size: var(--fs-10);
    color: rgba(13,13,18,0.2);
    white-space: nowrap;
}

.resume-bar__resume {
    height: 28px;
    padding: 0 var(--sp-12);
    border-radius: var(--r-6);
    background: rgba(91,71,214,0.15);
    border: 1px solid var(--c-5b47d6-a25);
    color: var(--c-5b47d6);
    font-family: var(--ff-sans);
    font-weight: 600;
    font-size: var(--fs-12);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.resume-bar__resume:hover {
    background: var(--c-5b47d6-a25);
    color: var(--c-violet-400);
}

.resume-bar__dismiss {
    width: 28px;
    height: 28px;
    border-radius: var(--r-6);
    background: transparent;
    border: none;
    color: rgba(13,13,18,0.35);
    font-size: var(--fs-16);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.resume-bar__dismiss:hover {
    background: var(--c-black-a5);
    color: rgba(13,13,18,0.6);
}

.resume-bar__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 768px) {
    .resume-bar__label,
    .resume-bar__time,
    .resume-bar__divider { display: none; }
}

/* ---- Dark mode ---- */
.dark-mode .resume-bar {
    background: linear-gradient(90deg, var(--c-violet-400-a8) 0%, rgba(13,13,18,0.92) 45%);
}
.dark-mode .resume-bar__label { color: var(--c-white-a45); }
.dark-mode .resume-bar__divider { background: var(--c-white-a8); }
.dark-mode .resume-bar__name { color: var(--c-white-a85); }
.dark-mode .resume-bar__count { color: var(--c-white-a30); }
.dark-mode .resume-bar__time { color: var(--c-white-a20); }
.dark-mode .resume-bar__chip--rendering { background: var(--c-amber-400-a12); color: var(--c-amber-400); }
.dark-mode .resume-bar__chip--rendering .rb-dot { background: var(--c-amber-400); }
.dark-mode .resume-bar__chip--progress  { background: var(--c-violet-400-a12); color: var(--c-violet-400); }
.dark-mode .resume-bar__chip--progress .rb-dot  { background: var(--c-violet-400); }
.dark-mode .resume-bar__chip--review    { background: var(--c-red-400-a12); color: var(--c-red-400); }
.dark-mode .resume-bar__chip--review .rb-dot    { background: var(--c-red-400); }
.dark-mode .resume-bar__chip--ready     { background: var(--c-green-400-a12); color: var(--c-green-400); }
.dark-mode .resume-bar__chip--ready .rb-dot     { background: var(--c-green-400); }
.dark-mode .resume-bar__resume {
    background: var(--c-violet-400-a15);
    border-color: var(--c-violet-400-a25);
    color: var(--c-violet-400);
}
.dark-mode .resume-bar__resume:hover {
    background: var(--c-violet-400-a25);
    color: var(--c-violet-300);
}
.dark-mode .resume-bar__dismiss { color: var(--c-white-a35); }
.dark-mode .resume-bar__dismiss:hover {
    background: var(--c-white-a6);
    color: var(--c-white-a60);
}
.dark-mode .resume-bar__icon .rb-frame--16x9 { border-color: var(--c-green-400); }
.dark-mode .resume-bar__icon .rb-frame--4x5  { border-color: var(--c-amber-400); }
.dark-mode .resume-bar__icon .rb-frame--9x16 { border-color: var(--c-violet-300); }


/* ═══════════════════════════════════════════════════════════════
   RESUME TRAY — Fixed bottom pill (homepage context)
   ═══════════════════════════════════════════════════════════════ */

/* Resume tray 2a — glassmorphic pill, always dark (sits on video background) */
.resume-tray {
    position: fixed; left: 50%; bottom: 24px; z-index: 9000;
    transform: translate(-50%, 12px); opacity: 0;
    transition: transform .4s cubic-bezier(.16,1,.3,1), opacity .3s;
    width: min(480px, calc(100vw - 32px)); box-sizing: border-box;
    display: flex; align-items: center; gap: var(--sp-14);
    padding: var(--sp-10) var(--sp-8) var(--sp-10) var(--sp-14); border-radius: var(--r-18);
    background: rgba(18,18,26,.72);
    -webkit-backdrop-filter: var(--bl-24) saturate(160%); backdrop-filter: var(--bl-24) saturate(160%);
    border: 1px solid var(--c-white-a14);
    box-shadow: 0 16px 50px rgba(10,20,90,.35);
    font-family: var(--ff-sans);
}
.resume-tray.is-in { transform: translate(-50%, 0); opacity: 1; }
.resume-tray:not(.is-in) { transition-duration: .2s; transform: translate(-50%, 8px); }

.rt-tiles { display: flex; align-items: flex-end; gap: var(--sp-6); height: 36px; flex-shrink: 0; }
.rt-tile  { position: relative; box-sizing: border-box; overflow: hidden; border-radius: var(--r-4); border: 1.5px solid var(--c); }
.rt-fill  { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--c) 28%, transparent); transition: height .6s cubic-bezier(.65,0,.35,1); }
.rt-label { position: relative; z-index: 1; display: block; padding: var(--sp-2) var(--sp-3); font: 700 7px/1 'JetBrains Mono', monospace; color: var(--c-white-a50); }
.rt-tile[data-ratio="9:16"] .rt-label { padding: 0; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: var(--fs-6); }

.rt-text    { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.rt-eyebrow { font: 500 11px 'Geist', sans-serif; color: var(--c-white-a50); }
.rt-name    { font: 600 14px 'Geist', sans-serif; color: var(--c-f9fafb); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rt-resume { height: 38px; padding: 0 var(--sp-18); border-radius: var(--r-12); border: 0; background: var(--c-white); color: #0d0d12; font: 600 12px 'Geist', sans-serif; cursor: pointer; flex-shrink: 0; }
.rt-resume:hover { background: #e8eaff; }
.rt-close  { width: 28px; height: 28px; border-radius: var(--r-8); border: 0; background: transparent; color: var(--c-white-a35); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rt-close:hover { background: var(--c-white-a8); color: var(--c-white); }

@supports not (backdrop-filter: blur(1px)) { .resume-tray { background: rgba(18,18,26,.94); } }
@media (max-width: 640px) { .rt-tile:not(:first-child) { display: none; } }
@media (prefers-reduced-motion: reduce) { .resume-tray, .rt-fill { transition: none; } }
