/* =====================
   TRIAL V2 PAGE STYLES
   Uses Linear Design System tokens (--ln-*)
   ===================== */

/* Test Mode Banner */
.er-test-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--ln-warning), var(--ln-warning-bright));
    color: #000;
    padding: var(--ln-space-2) var(--ln-space-4);
    text-align: center;
    font-size: var(--ln-text-xs);
    font-weight: 600;
    display: none;
}

.er-test-mode-banner.visible {
    display: block;
}

.er-test-mode-banner code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: var(--ln-radius-sm);
    margin: 0 4px;
}

body.test-mode .er-header {
    top: 36px;
}

body.test-mode .er-main {
    padding-top: 176px;
}

body {
    font-family: var(--ln-font-sans);
    background: var(--ln-bg-base);
    color: var(--ln-fg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Interactive focus glow overlay */
.er-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.er-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--ln-accent-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.er-bg-glow.active {
    opacity: 1;
}

/* Header - matches homepage landing-nav */
.er-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--ln-space-5) var(--ln-space-10);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 6, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ln-border);
}

.er-logo {
    display: flex;
    align-items: center;
    gap: var(--ln-space-3);
    text-decoration: none;
}

.er-logo-mark {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--ln-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.er-logo-mark svg {
    color: white;
    width: 22px;
    height: 22px;
}

.er-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ln-fg);
}

.er-header-link {
    font-size: var(--ln-text-base);
    font-weight: 500;
    color: var(--ln-fg-muted);
    text-decoration: none;
    transition: color var(--ln-duration-fast);
}

.er-header-link:hover {
    color: var(--ln-fg);
}

/* Main Content */
.er-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 140px var(--ln-space-10) 80px;
    position: relative;
    z-index: 1;
}

body.trial-initializing .step-progress,
body.trial-initializing .step-container {
    opacity: 0;
    pointer-events: none;
}

body.trial-initializing .trial-resume-banner {
    opacity: 0;
}

.trial-resume-banner {
    width: 100%;
    max-width: 640px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ln-space-4);
    margin-bottom: var(--ln-space-5);
    padding: var(--ln-space-4) var(--ln-space-5);
    background: color-mix(in srgb, var(--ln-accent) 8%, var(--ln-bg-elevated));
    border: 1px solid color-mix(in srgb, var(--ln-accent) 32%, var(--ln-border));
    border-radius: var(--ln-radius-xl);
    text-align: left;
    transition: opacity 0.2s ease;
}

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

.trial-resume-copy {
    min-width: 0;
}

.trial-resume-title {
    margin: 0;
    font-size: var(--ln-text-sm);
    font-weight: 700;
    color: var(--ln-fg);
}

.trial-resume-text {
    margin: 2px 0 0;
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
    line-height: 1.4;
}

.trial-resume-reset {
    border: none;
    background: none;
    color: var(--ln-accent-bright);
    font-size: var(--ln-text-sm);
    font-weight: 600;
    font-family: var(--ln-font-sans);
    white-space: nowrap;
    cursor: pointer;
    padding: 0;
}

.trial-resume-reset:hover {
    text-decoration: underline;
}

/* Step Progress Bar */
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ln-border-strong);
    transition: all 0.4s ease;
}

.step-dot.active {
    background: var(--ln-accent-bright);
    box-shadow: 0 0 10px var(--ln-accent-glow);
}

.step-dot.done {
    background: var(--ln-success);
}

.step-line {
    width: 32px;
    height: 2px;
    background: var(--ln-border);
    transition: background 0.4s ease;
}

.step-line.done {
    background: var(--ln-success);
}

/* Step Container */
.step-container {
    width: 100%;
    max-width: 640px;
    text-align: center;
}

.step-container[hidden] { display: none !important; }

/* Badge */
.er-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ln-fg-muted);
    margin-bottom: 32px;
}

.er-badge strong { color: var(--ln-accent-bright); }

.er-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--ln-success);
    border-radius: 50%;
    animation: ln-pulse 2s infinite;
}

/* Title */
.er-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    letter-spacing: var(--ln-tracking-tighter);
    line-height: 1.1;
    margin-bottom: var(--ln-space-6);
}

.er-title span {
    display: block;
}

.er-title .gradient {
    background: linear-gradient(135deg, var(--ln-accent), var(--ln-accent-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.er-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--ln-fg-muted);
    margin: 0 auto var(--ln-space-6);
    line-height: var(--ln-leading-normal);
}

/* Error Message */
.er-error {
    background: var(--ln-error-bg);
    border: 1px solid var(--ln-error-border);
    border-radius: var(--ln-radius-lg);
    padding: 14px 18px;
    margin-bottom: var(--ln-space-5);
    font-size: var(--ln-text-sm);
    color: var(--ln-error-bright);
    display: none;
}

.er-error.visible {
    display: block;
}

/* Search Box */
.search-box {
    display: flex;
    background: var(--ln-bg-elevated);
    border: 2px solid var(--ln-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--ln-border-accent);
    box-shadow: 0 0 0 4px var(--ln-accent-subtle);
}

.search-box .icon {
    padding: 0 0 0 24px;
    display: flex;
    align-items: center;
    color: var(--ln-fg-dim);
}

.search-box input {
    flex: 1;
    padding: 22px 20px;
    font-size: 17px;
    font-family: var(--ln-font-sans);
    background: transparent;
    border: none;
    color: var(--ln-fg);
}

.search-box input:focus,
.search-box input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    caret-color: var(--ln-accent-bright);
}

.search-box input::placeholder {
    color: var(--ln-fg-dim);
}

.search-spinner {
    display: none;
    align-items: center;
    padding: 0 var(--ln-space-6);
}

.search-spinner.visible {
    display: flex;
}

/* Spinner */
.er-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ln-border);
    border-top-color: var(--ln-accent);
    border-radius: 50%;
    animation: er-spin 0.8s linear infinite;
}

@keyframes er-spin {
    to { transform: rotate(360deg); }
}

/* Autocomplete Dropdown */
.er-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--ln-bg-elevated);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-xl);
    box-shadow: var(--ln-shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 20;
}

.er-autocomplete.visible {
    display: block;
}

.er-autocomplete-item {
    padding: var(--ln-space-4) var(--ln-space-5);
    cursor: pointer;
    border-bottom: 1px solid var(--ln-border);
    transition: background var(--ln-duration-fast);
}

.er-autocomplete-item:last-child {
    border-bottom: none;
}

.er-autocomplete-item:hover {
    background: var(--ln-accent-subtle);
}

.er-autocomplete-name {
    font-weight: 600;
    font-size: var(--ln-text-base);
    margin-bottom: 4px;
    color: var(--ln-fg);
}

.er-autocomplete-address {
    font-size: var(--ln-text-xs);
    color: var(--ln-fg-muted);
}

.er-autocomplete-empty {
    padding: var(--ln-space-6);
    text-align: center;
    color: var(--ln-fg-muted);
    font-size: var(--ln-text-sm);
}

/* Source Toggle (Google vs Website) */
.source-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--ln-fg-dim);
}

.source-toggle a {
    color: var(--ln-accent-bright);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.source-toggle a:hover { text-decoration: underline; }

.step1-search-context {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ln-fg-dim);
}

.step1-search-context[hidden] {
    display: none !important;
}

/* Website URL Input */
.website-input-wrapper {
    display: flex;
    background: var(--ln-bg-elevated);
    border: 2px solid var(--ln-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.website-input-wrapper:focus-within {
    border-color: var(--ln-border-accent);
    box-shadow: 0 0 0 4px var(--ln-accent-subtle);
}

.website-input-wrapper .icon {
    padding: 0 0 0 24px;
    display: flex;
    align-items: center;
    color: var(--ln-fg-dim);
}

.website-input-wrapper input {
    flex: 1;
    padding: 22px 20px;
    font-size: 17px;
    font-family: var(--ln-font-sans);
    background: transparent;
    border: none;
    color: var(--ln-fg);
}

.website-input-wrapper input:focus,
.website-input-wrapper input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    caret-color: var(--ln-accent-bright);
}

.website-input-wrapper input::placeholder { color: var(--ln-fg-dim); }

.website-input-wrapper .go-btn {
    padding: 12px 24px;
    margin: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--ln-font-sans);
    background: linear-gradient(135deg, var(--ln-accent), var(--ln-accent-bright));
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.website-input-wrapper .go-btn:hover { opacity: 0.9; }
.website-input-wrapper .go-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Selected Business Card */
.selected-card {
    background: var(--ln-accent-subtle);
    border: 1px solid var(--ln-border-accent);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    animation: er-slideIn 0.3s ease;
}

@keyframes er-slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.selected-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.found-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--ln-success-bg);
    color: var(--ln-success-bright);
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
}

.change-btn {
    font-size: 13px;
    color: var(--ln-accent-bright);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--ln-font-sans);
}

.change-btn:hover { text-decoration: underline; }

.selected-card-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ln-fg);
}

.selected-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: var(--ln-fg-muted);
}

.selected-card-meta .row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-card-meta .row svg { color: var(--ln-fg-dim); flex-shrink: 0; }

/* Continue Button */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--ln-font-sans);
    background: linear-gradient(135deg, var(--ln-accent), var(--ln-accent-bright));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--ln-shadow-button);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--ln-shadow-button-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Trust Row */
.trust-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
    font-size: 13px;
    color: var(--ln-fg-dim);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-item svg { color: var(--ln-success-bright); }

.step1-trust-line {
    margin-top: 24px;
    font-size: 14px;
    color: var(--ln-fg-muted);
}

.step1-trust-line[hidden] {
    display: none !important;
}

/* Step 4 — Signup Card */
.signup-card {
    background: var(--ln-bg-elevated);
    border: 1px solid var(--ln-border);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 420px;
    margin: 0 auto;
}

.signup-header { text-align: center; margin-bottom: 36px; }

.signup-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--ln-space-3);
    color: var(--ln-fg);
}

.signup-subtitle {
    font-size: var(--ln-text-md);
    color: var(--ln-fg-muted);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.signup-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ln-fg-dim);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signup-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 10px;
    color: var(--ln-fg);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.signup-input:focus {
    border-color: var(--ln-accent);
}

.signup-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: var(--ln-space-4) 0 var(--ln-space-5);
    color: var(--ln-fg-muted);
    font-size: 13px;
}

.signup-divider::before,
.signup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ln-border);
}

/* Shared button base */
.signup-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: var(--ln-font-sans);
}

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

/* Google = hero */

/* Primary CTA */
.signup-btn-primary {
    background: var(--ln-accent);
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 10px;
}

.signup-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

/* Secondary = demoted */

/* Focused form states (email step, password step, phone step) */
.signup-focused-form {
    display: flex;
    flex-direction: column;
    gap: var(--ln-space-5);
}
.signup-form-fields {
    display: flex;
    flex-direction: column;
    gap: var(--ln-space-3);
}
.signup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.signup-focused-form .signup-btn-primary {
    margin-top: var(--ln-space-2);
    margin-bottom: 0;
}

/* Confirmed email pill (password step) */
.signup-email-confirmed {
    display: flex;
    align-items: center;
    gap: var(--ln-space-2);
    padding: var(--ln-space-2) var(--ln-space-3);
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-md);
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
}
.signup-email-confirmed svg {
    flex-shrink: 0;
    color: var(--ln-fg-dim);
}

/* Password requirements */
.signup-pw-reqs { margin-top: var(--ln-space-2); }
.signup-pw-req {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ln-fg-dim);
    line-height: 1;
    margin-top: 4px;
    transition: color 0.15s;
}
.signup-pw-req-icon { font-size: 13px; width: 16px; text-align: center; }
.signup-pw-req.passed { color: var(--ln-success); }
.signup-pw-req.failed { color: var(--ln-error); }

/* Back link */
.signup-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ln-space-2);
    background: none;
    border: none;
    color: var(--ln-fg-dim);
    font-size: var(--ln-text-sm);
    font-weight: 500;
    font-family: var(--ln-font-sans);
    cursor: pointer;
    padding: var(--ln-space-2) 0;
    transition: color 0.15s;
}
.signup-back-link:hover { color: var(--ln-fg-muted); }

/* ── Phone-first auth pattern (step 4) ── */

/* Hero phone input — larger, prominent */
.s4-phone-input {
    font-size: 17px;
    padding: 14px 16px;
    letter-spacing: 0.3px;
}

/* Outlined secondary buttons (Google / Email) */
.signup-btn-outlined {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--ln-fg);
    border: 1px solid var(--ln-border);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: var(--ln-font-sans);
    width: 100%;
}
.signup-btn-outlined:hover:not(:disabled) {
    background: var(--ln-surface);
    border-color: var(--ln-fg-dim);
}
.signup-btn-outlined:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Secondary buttons container */
.s4-secondary-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Phone pill (OTP view) */
.s4-phone-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 0 auto 20px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ln-fg-muted);
    font-family: var(--ln-font-mono, monospace);
    letter-spacing: 0.5px;
    width: fit-content;
}

/* OTP input — large, monospace, centered */
.s4-otp-input {
    font-size: 24px;
    font-family: var(--ln-font-mono, monospace);
    text-align: center;
    letter-spacing: 8px;
    padding: 14px 16px;
}

/* Resend / Change links row */
.s4-otp-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-dim);
}

/* Text-only link buttons */
.s4-text-link {
    background: none;
    border: none;
    color: var(--ln-fg-dim);
    font-size: var(--ln-text-sm);
    font-weight: 500;
    font-family: var(--ln-font-sans);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.s4-text-link:hover { color: var(--ln-fg-muted); }

.signup-status {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: var(--ln-fg-muted);
    border-radius: 10px;
    background: var(--ln-surface);
    margin-top: 12px;
}

.signup-error {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: var(--ln-error);
    border-radius: 10px;
    background: color-mix(in srgb, var(--ln-error) 8%, transparent);
    margin-top: 12px;
}

.signup-trust {
    display: flex;
    justify-content: center;
    gap: var(--ln-space-3);
    margin-top: var(--ln-space-6);
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
    padding-top: var(--ln-space-5);
    border-top: 1px solid var(--ln-border);
}

/* =====================
   STEP 2 — TRAINING ANIMATION
   ===================== */
.training-card {
    background: var(--ln-bg-elevated);
    border: 1px solid var(--ln-border);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
}

.training-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.training-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--ln-border);
    border-top-color: var(--ln-accent-bright);
    border-radius: 50%;
    animation: er-spin 1.2s linear infinite;
}

.training-ring-outer {
    position: absolute;
    inset: -8px;
    border: 2px solid transparent;
    border-top-color: var(--ln-accent);
    border-radius: 50%;
    animation: er-spin 2s linear infinite reverse;
    opacity: 0.5;
}

.training-icon svg {
    color: var(--ln-accent-bright);
    z-index: 1;
}

.training-business-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--ln-fg);
}

.edit-business-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ln-fg-dim);
    cursor: pointer;
    transition: color 0.15s;
    text-decoration: none;
    margin-bottom: 12px;
}
.edit-business-link:hover {
    color: var(--ln-accent);
}

.training-status {
    font-size: 16px;
    color: var(--ln-fg-muted);
    margin-bottom: 24px;
    min-height: 24px;
    transition: opacity 0.3s ease;
}

.training-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.training-dot {
    width: 6px;
    height: 6px;
    background: var(--ln-accent-bright);
    border-radius: 50%;
    animation: training-pulse 1.4s ease-in-out infinite;
}

.training-dot:nth-child(2) { animation-delay: 0.2s; }
.training-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes training-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.training-slow {
    display: none;
    margin-top: 24px;
    padding: 16px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-lg);
}

.training-slow.visible {
    display: block;
    animation: er-slideIn 0.3s ease;
}

.training-slow p {
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
    margin-bottom: 12px;
}

.training-error {
    display: none;
    margin-top: 24px;
    padding: 16px;
    background: var(--ln-error-bg);
    border: 1px solid var(--ln-error-border);
    border-radius: var(--ln-radius-lg);
}

.training-error.visible {
    display: block;
    animation: er-slideIn 0.3s ease;
}

.training-error p {
    font-size: var(--ln-text-sm);
    color: var(--ln-error-bright);
    margin-bottom: 12px;
}

.btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ln-font-sans);
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-md);
    color: var(--ln-fg);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--ln-bg-elevated);
    border-color: var(--ln-border-strong);
}

/* =====================
   STEP 2 VARIANT B — CHAT BUBBLES
   ===================== */
.training-chat {
    margin-top: 32px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.system {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    color: var(--ln-fg-muted);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.chat-bubble.ai {
    background: color-mix(in srgb, var(--ln-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--ln-accent) 25%, transparent);
    color: var(--ln-fg);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* =====================
   STEP 2 VARIANT C — STATS DASHBOARD
   ===================== */
.training-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
}

.metric-card {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--ln-font-mono);
    color: var(--ln-accent-bright);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 11px;
    color: var(--ln-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: var(--ln-surface);
    border-radius: 100px;
    overflow: hidden;
    margin: 24px 0 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ln-accent), var(--ln-accent-bright));
    border-radius: 100px;
    transition: width 0.1s linear;
}

.progress-label {
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
    text-align: center;
}

/* =====================
   STEP 3 — AUDIO PLAYER + VOICE PICKER
   ===================== */
.listen-card {
    background: var(--ln-bg-elevated);
    border: 1px solid var(--ln-border);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
}

.listen-heading {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--ln-fg);
}

.listen-subtitle {
    font-size: 16px;
    color: var(--ln-fg-muted);
    margin-bottom: 32px;
}

/* Audio Player */
.audio-player {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.audio-player.playing {
    border-color: var(--ln-accent);
    box-shadow: 0 0 0 1px var(--ln-accent);
}

.play-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ln-accent), var(--ln-accent-bright));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.play-btn:hover {
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.play-btn .pause-icon { display: none; }
.play-btn.is-playing .play-icon { display: none; }
.play-btn.is-playing .pause-icon { display: block; }

/* Waveform */
.waveform {
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.waveform-bar {
    flex: 1;
    background: var(--ln-border-strong);
    border-radius: 2px;
    transition: background 0.15s ease;
    min-height: 4px;
}

.waveform-bar.active {
    background: var(--ln-accent-bright);
}

.audio-duration {
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-dim);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Autoplay fallback */
.autoplay-fallback {
    display: none;
    margin-top: 16px;
    animation: er-slideIn 0.3s ease;
}

.autoplay-fallback.visible {
    display: block;
}

.autoplay-fallback p {
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
    margin-bottom: 12px;
}

/* Audio loading state */
.audio-loading {
    display: none;
    margin-top: 16px;
}

.audio-loading.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: er-slideIn 0.3s ease;
}

.audio-loading .mini-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ln-border);
    border-top-color: var(--ln-accent-bright);
    border-radius: 50%;
    animation: er-spin 0.8s linear infinite;
}

.audio-loading span {
    font-size: var(--ln-text-sm);
    color: var(--ln-fg-muted);
}

/* Voice Picker */
.voice-picker {
    margin-top: 32px;
    text-align: left;
}

.voice-picker-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ln-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.voice-card {
    padding: 12px 16px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.voice-card:hover {
    border-color: var(--ln-border-strong);
    background: var(--ln-bg-elevated);
}

.voice-card.selected {
    border-color: var(--ln-accent);
    background: var(--ln-bg-elevated);
    box-shadow: 0 0 0 1px var(--ln-accent);
}

.voice-card.generating {
    opacity: 0.7;
    pointer-events: none;
}

.voice-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ln-fg);
}

.voice-card-gender {
    font-size: 12px;
    color: var(--ln-fg-dim);
}

.voice-card-check {
    margin-left: auto;
    color: var(--ln-accent-bright);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.voice-card.selected .voice-card-check {
    opacity: 1;
}

.voice-expand-btn {
    margin-top: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ln-font-sans);
    background: none;
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius-md);
    color: var(--ln-fg-muted);
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.voice-expand-btn:hover {
    border-color: var(--ln-border-strong);
    color: var(--ln-fg);
}

/* Step 3 continue */
.step3-continue {
    margin-top: 32px;
}

/* Step 3 error */
.step3-error {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--ln-error-bg);
    border: 1px solid var(--ln-error-border);
    border-radius: var(--ln-radius-md);
    font-size: var(--ln-text-sm);
    color: var(--ln-error-bright);
}

.step3-error.visible {
    display: block;
    animation: er-slideIn 0.3s ease;
}

/* =====================
   STEP 3 VARIANT A — BIG PLAY BUTTON
   ===================== */
.big-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ln-accent), var(--ln-accent-bright));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--ln-accent) 30%, transparent);
    transition: all 0.3s;
}

.big-play-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 8px 30px color-mix(in srgb, var(--ln-accent) 40%, transparent);
}

.big-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.big-play-btn.is-playing {
    animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { box-shadow: 0 4px 20px color-mix(in srgb, var(--ln-accent) 30%, transparent); }
    50% { box-shadow: 0 4px 40px color-mix(in srgb, var(--ln-accent) 40%, transparent), 0 0 60px color-mix(in srgb, var(--ln-accent) 20%, transparent); }
}

.big-play-btn .pause-icon { display: none; }
.big-play-btn.is-playing .play-icon { display: none; }
.big-play-btn.is-playing .pause-icon { display: block; }

.listen-greeting-text {
    font-size: 18px;
    font-style: italic;
    color: var(--ln-fg-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.listen-greeting-text strong { color: var(--ln-fg); font-style: normal; }

/* =====================
   STEP 3 VARIANT C — PHONE MOCKUP
   ===================== */
.phone-mockup {
    width: 280px;
    margin: 0 auto 32px;
    background: var(--ln-bg-base);
    border: 2px solid var(--ln-border-strong);
    border-radius: 32px;
    padding: 16px;
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 24px;
    background: var(--ln-bg-base);
    border-radius: 0 0 16px 16px;
    margin: -16px auto 12px;
    border: 2px solid var(--ln-border-strong);
    border-top: none;
}

.phone-screen {
    background: var(--ln-bg-elevated);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
}

.phone-caller {
    font-size: 13px;
    color: var(--ln-fg-dim);
    margin-bottom: 4px;
}

.phone-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.phone-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 40px;
    margin-bottom: 20px;
}

.phone-wave-bar {
    width: 3px;
    background: var(--ln-accent-bright);
    border-radius: 100px;
    height: 20%;
    transition: height 0.15s ease;
}

.phone-wave.playing .phone-wave-bar {
    animation: phoneWave 1.2s ease-in-out infinite;
}

.phone-wave.playing .phone-wave-bar:nth-child(1) { animation-delay: 0s; }
.phone-wave.playing .phone-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.phone-wave.playing .phone-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.phone-wave.playing .phone-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.phone-wave.playing .phone-wave-bar:nth-child(5) { animation-delay: 0.15s; }
.phone-wave.playing .phone-wave-bar:nth-child(6) { animation-delay: 0.25s; }
.phone-wave.playing .phone-wave-bar:nth-child(7) { animation-delay: 0.35s; }
.phone-wave.playing .phone-wave-bar:nth-child(8) { animation-delay: 0.05s; }
.phone-wave.playing .phone-wave-bar:nth-child(9) { animation-delay: 0.2s; }
.phone-wave.playing .phone-wave-bar:nth-child(10) { animation-delay: 0.3s; }
.phone-wave.playing .phone-wave-bar:nth-child(11) { animation-delay: 0.1s; }
.phone-wave.playing .phone-wave-bar:nth-child(12) { animation-delay: 0.25s; }

@keyframes phoneWave {
    0%, 100% { height: 20%; }
    50% { height: var(--wave-h, 80%); }
}

.phone-duration {
    font-size: 14px;
    font-family: var(--ln-font-mono);
    color: var(--ln-fg-muted);
    margin-bottom: 16px;
}

.phone-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.phone-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.15s ease;
}

.phone-action-btn:hover { transform: scale(1.05); }
.phone-action-btn.hangup { background: var(--ln-error); }
.phone-action-btn.speaker { background: var(--ln-surface-active); color: var(--ln-fg); }

/* =====================
   STEP 3 — VALUE PROPS (all variants)
   ===================== */
.step3-value-props {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0 24px;
}

.step3-value-prop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ln-surface);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ln-fg);
}

.step3-value-prop svg { flex-shrink: 0; }

/* =====================
   STEP 4 VARIANT B — SIDE-BY-SIDE CARDS
   ===================== */

/* =====================
   STEP 4 VARIANT C — GOOGLE HERO
   ===================== */

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .er-header {
        padding: var(--ln-space-4) var(--ln-space-5);
    }

    .er-main {
        padding: 120px var(--ln-space-5) 60px;
    }

    .trial-resume-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .trial-resume-reset {
        white-space: normal;
    }

    .voice-grid {
        grid-template-columns: 1fr;
    }

    .trust-row {
        flex-direction: column;
        align-items: center;
        gap: var(--ln-space-3);
    }
}
