/* TaxBooks — switch page: guided for <1 min skim */

.tx-switch-page {
    background: #f4f5f8;
    font-size: 18px;
}

.tx-switch-page .tx-container {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
}

/* Header CTA */
.tx-header-cta {
    display: inline-flex;
    align-items: center;
    background: var(--tx-primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 2px 0 rgba(16, 128, 0, 0.25);
    transition: background 0.15s, transform 0.15s;
}

.tx-header-cta:hover {
    background: var(--tx-primary-hover);
    transform: translateY(-1px);
}

/* Guide voice — tells the visitor where they are */
.tx-switch-guide {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5eead4;
}

.tx-switch-guide.is-dark {
    color: #0f766e;
    text-align: center;
}

.tx-switch-guide.is-on-dark {
    color: #86efac;
}

.tx-switch-btn-lg {
    font-size: 1.08rem !important;
    padding: 16px 28px !important;
}

/* —— Beat 1: Hero —— */
.tx-switch-hero {
    position: relative;
    min-height: calc(100dvh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: clamp(40px, 7vh, 72px) 0 clamp(56px, 8vh, 80px);
}

.tx-switch-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 500px at 85% 15%, rgba(44, 160, 28, 0.22), transparent 55%),
        radial-gradient(600px 380px at 10% 85%, rgba(15, 118, 110, 0.14), transparent 50%),
        linear-gradient(165deg, #0f1a14 0%, #1a2e22 42%, #243d2c 100%);
}

.tx-switch-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent,
            transparent 56px,
            rgba(255, 255, 255, 0.02) 56px,
            rgba(255, 255, 255, 0.02) 57px
        );
    animation: tx-atmosphere-drift 32s linear infinite;
    pointer-events: none;
}

.tx-switch-hero__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(32px, 5vw, 56px);
    align-items: center;
    width: 100%;
}

.tx-switch-hero__brand {
    margin: 0 0 16px;
}

.tx-switch-hero__brand .tx-brand-word {
    font-size: clamp(2.1rem, 4.5vw, 2.85rem);
}

.tx-switch-hero__brand .tx-brand-tax {
    color: #5eead4;
}

.tx-switch-hero__brand .tx-brand-books {
    color: #86efac;
}

.tx-switch-hero h1 {
    font-family: var(--tx-brand);
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #fff;
    margin: 0 0 20px;
}

.tx-switch-hero__lead {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
    max-width: 28rem;
}

.tx-switch-hero__lead strong {
    color: #fff;
    font-weight: 700;
}

.tx-switch-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.tx-switch-hero__actions .tx-btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.tx-switch-hero__actions .tx-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

.tx-switch-hero__reassure {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

/* Comparison visual */
.tx-switch-compare {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.tx-switch-compare__col {
    flex: 1;
    min-width: 0;
}

.tx-switch-compare__name {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.65;
}

.tx-switch-compare__col.is-win .tx-switch-compare__name {
    color: #bbf7d0;
    opacity: 1;
}

.tx-switch-compare__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.tx-switch-compare__col li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--tx-brand);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tx-switch-compare__col.is-lose li {
    color: rgba(255, 255, 255, 0.72);
}

.tx-switch-compare__col.is-lose li i {
    color: #fca5a5;
}

.tx-switch-compare__col.is-win li i {
    color: #86efac;
}

.tx-switch-compare__arrow {
    color: #86efac;
    font-size: 1.5rem;
    flex: 0 0 auto;
    animation: tx-switch-arrow-pulse 1.8s ease-in-out infinite;
}

@keyframes tx-switch-arrow-pulse {
    0%, 100% { transform: translateX(0); opacity: 0.65; }
    50% { transform: translateX(5px); opacity: 1; }
}

.tx-switch-scroll {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: clamp(36px, 6vh, 56px);
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

.tx-switch-scroll:hover {
    color: #86efac;
}

.tx-switch-scroll i {
    animation: tx-switch-bounce 1.6s ease-in-out infinite;
}

@keyframes tx-switch-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@media (max-width: 900px) {
    .tx-switch-hero__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tx-switch-hero {
        min-height: auto;
    }

    .tx-switch-compare__arrow {
        transform: rotate(90deg);
    }

    .tx-switch-compare {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    @keyframes tx-switch-arrow-pulse {
        0%, 100% { transform: rotate(90deg) translateX(0); opacity: 0.65; }
        50% { transform: rotate(90deg) translateX(5px); opacity: 1; }
    }
}

/* —— Beat 2: Steps —— */
.tx-switch-migrate {
    padding: clamp(56px, 9vh, 88px) 0;
    background:
        radial-gradient(700px 280px at 50% 0%, rgba(44, 160, 28, 0.1), transparent 60%),
        #fff;
}

.tx-switch-backup {
    margin: 0 0 clamp(28px, 4vh, 40px);
    padding: 18px 20px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    max-width: 44rem;
}

.tx-switch-backup strong {
    display: block;
    font-family: var(--tx-brand);
    font-size: 1.05rem;
    font-weight: 800;
    color: #9a3412;
    margin-bottom: 6px;
}

.tx-switch-backup p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.5;
    color: #7c2d12;
}

.tx-switch-backup em {
    font-style: normal;
    font-weight: 700;
}

.tx-switch-migrate__head {
    margin-bottom: clamp(36px, 5vh, 48px);
}

.tx-switch-migrate__head .tx-switch-guide.is-dark {
    text-align: left;
}

.tx-switch-migrate__head h2 {
    font-family: var(--tx-brand);
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #1a1b1e;
    margin: 0;
    max-width: 22ch;
}

.tx-switch-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border-left: 3px solid #d4d7dc;
    margin-left: 22px;
}

.tx-switch-step {
    position: relative;
    padding: 0 0 40px 40px;
}

.tx-switch-step:last-child {
    padding-bottom: 0;
}

.tx-switch-step__n {
    position: absolute;
    left: -23px;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tx-primary);
    color: #fff;
    font-family: var(--tx-brand);
    font-size: 1.1rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 5px #fff;
}

.tx-switch-step:last-child .tx-switch-step__n {
    background: var(--tx-primary);
}

.tx-switch-step__body h3 {
    font-family: var(--tx-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 6px 0 10px;
    color: #393a3d;
}

.tx-switch-step__body p {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.55;
    color: #5c5d63;
    max-width: 40rem;
}

.tx-switch-step__body p strong {
    color: #166534;
    font-weight: 700;
}

/* Part 2 — history */
.tx-switch-history {
    margin-top: clamp(48px, 7vh, 72px);
    padding-top: clamp(40px, 6vh, 56px);
    border-top: 1px solid #d4d7dc;
}

.tx-switch-history__lede {
    margin: 12px 0 0;
    font-size: 1.12rem;
    line-height: 1.5;
    color: #5c5d63;
    max-width: 40rem;
}

.tx-switch-history-list {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 20px;
    max-width: 44rem;
}

.tx-switch-history-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px 16px;
    align-items: start;
}

.tx-switch-history-tag {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #e7f6e4;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tx-switch-history-list strong {
    display: block;
    font-family: var(--tx-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #393a3d;
    margin-bottom: 4px;
}

.tx-switch-history-list p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #5c5d63;
}

.tx-switch-history-list p + p {
    margin-top: 6px;
}

.tx-switch-migrate__skip {
    margin: 36px 0 0;
    padding: 16px 18px;
    font-size: 1.02rem;
    line-height: 1.45;
    color: #5c5d63;
    background: #eef5ec;
    border-left: 3px solid var(--tx-primary);
    max-width: 40rem;
}

.tx-switch-migrate__skip em {
    font-style: normal;
    font-weight: 700;
    color: #1a1b1e;
}

/* —— Beat 3: Close —— */
.tx-switch-close {
    padding: 0 0 clamp(64px, 10vh, 96px);
    background: linear-gradient(180deg, #fff 0%, #eef5ec 100%);
}

.tx-switch-cta {
    padding: clamp(40px, 6vh, 56px) clamp(28px, 4vw, 48px);
    background:
        linear-gradient(135deg, #1a2e22 0%, #243d2c 55%, #2ca01c 160%);
    border-radius: 20px;
    color: #fff;
}

.tx-switch-cta h2 {
    font-family: var(--tx-brand);
    font-size: clamp(1.7rem, 3.4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    max-width: 20ch;
    line-height: 1.12;
}

.tx-switch-cta > p {
    margin: 0 0 28px;
    font-size: 1.2rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
}

.tx-switch-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tx-switch-cta .tx-btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.tx-switch-cta .tx-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Phones: full-width CTAs, tighter type, no horizontal scroll (must follow base rules) */
@media (max-width: 640px) {
    .tx-switch-page {
        overflow-x: clip;
        font-size: 17px;
    }

    .tx-switch-page .tx-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .tx-switch-hero {
        padding: 28px 0 40px;
    }

    .tx-switch-hero h1 {
        font-size: clamp(1.85rem, 8.5vw, 2.45rem);
        margin-bottom: 14px;
    }

    .tx-switch-hero__lead {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    .tx-switch-hero__actions,
    .tx-switch-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tx-switch-hero__actions .tx-btn-primary,
    .tx-switch-hero__actions .tx-btn-secondary,
    .tx-switch-cta__actions .tx-btn-primary,
    .tx-switch-cta__actions .tx-btn-secondary,
    .tx-switch-btn-lg {
        width: 100%;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    .tx-switch-btn-lg {
        font-size: 1rem !important;
        padding: 14px 18px !important;
    }

    .tx-header-cta {
        padding: 9px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .tx-switch-backup,
    .tx-switch-migrate__skip {
        padding: 14px 14px;
        font-size: 0.98rem;
    }

    .tx-switch-step {
        gap: 12px;
    }

    .tx-switch-step__body h3 {
        font-size: 1.1rem;
    }

    .tx-switch-step__body p {
        font-size: 0.98rem;
        overflow-wrap: anywhere;
    }

    .tx-switch-history-list li {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tx-switch-history-tag {
        margin-top: 0;
        justify-self: start;
    }

    .tx-switch-history-list strong {
        font-size: 1.08rem;
    }

    .tx-switch-history-list p {
        font-size: 0.98rem;
        overflow-wrap: anywhere;
    }

    .tx-switch-cta {
        padding: 28px 18px;
        border-radius: 16px;
    }

    .tx-switch-cta h2 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
        max-width: none;
    }

    .tx-switch-cta > p {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    .tx-switch-migrate {
        padding: 40px 0;
    }

    .tx-switch-close {
        padding-bottom: 48px;
    }
}

@media (max-width: 380px) {
    .tx-header-cta {
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .tx-switch-hero__brand .tx-brand-word {
        font-size: 1.75rem;
    }
}
