@keyframes gradient {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-gradient {
    animation: gradient 8s ease-in-out infinite;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}



@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-out-down {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

.animate-fade-out-down {
    animation: fade-out-down 0.5s ease-in forwards;
}

/* Solutions menu plan labels --------------------------------------------- */
.solution-menu-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.4rem;
    width: 100%;
    line-height: 1.25;
}

.solution-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    margin-top: 0.05rem;
    padding: 0.18rem 0.34rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.solution-plan-badge--core {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.solution-plan-badge--pro {
    border-color: rgba(99, 102, 241, 0.22);
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.solution-plan-badge--free {
    border-color: rgba(14, 165, 233, 0.24);
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
}

.solution-menu-link--mobile {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.solution-menu-link--mobile .solution-plan-badge--core {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.solution-menu-link--mobile .solution-plan-badge--pro {
    border-color: rgba(129, 140, 248, 0.28);
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
}

.solution-menu-link--mobile .solution-plan-badge--free {
    border-color: rgba(56, 189, 248, 0.26);
    background: rgba(14, 165, 233, 0.13);
    color: #7dd3fc;
}

/* Email-to-record visual -------------------------------------------------- */
.q-email-flow {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.28);
    border-radius: 2rem;
    background:
        radial-gradient(circle at 50% 38%, rgba(79, 70, 229, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
    color: #f8fafc;
    isolation: isolate;
}

.q-email-flow::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 88%);
    pointer-events: none;
}

.q-email-flow__glow {
    position: absolute;
    left: 50%;
    top: 36%;
    width: 28rem;
    height: 28rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    filter: blur(90px);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.q-email-flow__content {
    position: relative;
    z-index: 1;
    padding: clamp(1.25rem, 4vw, 3.5rem);
}

.q-email-flow__motion-toggle {
    display: inline-flex;
    position: absolute;
    z-index: 3;
    top: 1rem;
    right: 1rem;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.q-email-flow__motion-toggle:hover,
.q-email-flow__motion-toggle:focus-visible {
    border-color: rgba(129, 140, 248, 0.55);
    background: rgba(49, 46, 129, 0.42);
    color: #e0e7ff;
}

.q-email-flow__motion-toggle:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

.q-email-flow__motion-toggle svg {
    width: 0.8rem;
    height: 0.8rem;
}

.q-email-flow--paused *,
.q-email-flow--paused *::before,
.q-email-flow--paused *::after {
    animation-play-state: paused !important;
}

.q-email-flow__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.q-email-flow__eyebrow-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #60a5fa;
    box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.1);
}

.q-email-flow__stages {
    display: grid;
    position: relative;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 42rem;
    margin: 1.1rem auto 0;
    padding: 0;
    list-style: none;
}

.q-email-flow__stages::before {
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 0.72rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.28), rgba(16, 185, 129, 0.28));
    content: "";
}

.q-email-flow__stages li {
    display: flex;
    position: relative;
    z-index: 1;
    align-items: center;
    flex-direction: column;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    animation: q-email-stage 12s ease-in-out infinite;
}

.q-email-flow__stages li:nth-child(2) { animation-delay: -9s; }
.q-email-flow__stages li:nth-child(3) { animation-delay: -6s; }
.q-email-flow__stages li:nth-child(4) { animation-delay: -3s; }

.q-email-flow__stages span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: #111827;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
    animation: q-email-stage-dot 12s ease-in-out infinite;
}

.q-email-flow__stages li:nth-child(2) span { animation-delay: -9s; }
.q-email-flow__stages li:nth-child(3) span { animation-delay: -6s; }
.q-email-flow__stages li:nth-child(4) span { animation-delay: -3s; }

.q-email-flow__sources,
.q-email-flow__outcomes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.q-email-flow__source {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.065);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.22);
    animation: q-email-arrive 12s ease-in-out infinite both;
}

.q-email-flow__source:nth-child(2) { animation-delay: 0.18s; }
.q-email-flow__source:nth-child(3) { animation-delay: 0.36s; }
.q-email-flow__source:nth-child(4) { animation-delay: 0.54s; }

.q-email-flow__source strong,
.q-email-flow__source small,
.q-email-flow__outcome strong,
.q-email-flow__outcome small,
.q-email-flow__approval strong,
.q-email-flow__approval small,
.q-email-flow__finish strong,
.q-email-flow__finish small {
    display: block;
}

.q-email-flow__source strong,
.q-email-flow__outcome strong {
    color: #f8fafc;
    font-size: 0.86rem;
    line-height: 1.25;
}

.q-email-flow__source small,
.q-email-flow__outcome small {
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.35;
}

.q-email-flow__source-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
}

.q-email-flow__source-icon svg,
.q-email-flow__approval-icon svg,
.q-email-flow__finish-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.q-email-flow__source-icon--job { background: rgba(99, 102, 241, 0.18); color: #a5b4fc; }
.q-email-flow__source-icon--expense { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.q-email-flow__source-icon--fine { background: rgba(245, 158, 11, 0.17); color: #fcd34d; }
.q-email-flow__source-icon--supplier { background: rgba(59, 130, 246, 0.17); color: #93c5fd; }

.q-email-flow__connector {
    position: relative;
    width: 2px;
    height: 2.2rem;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(129, 140, 248, 0.2);
}

.q-email-flow__connector::before,
.q-email-flow__connector::after {
    position: absolute;
    left: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border: 1px solid rgba(165, 180, 252, 0.4);
    border-radius: 999px;
    background: #111827;
    content: "";
    transform: translateX(-50%);
}

.q-email-flow__connector::before { top: -0.2rem; }
.q-email-flow__connector::after { bottom: -0.2rem; }

.q-email-flow__beam {
    position: absolute;
    left: 0;
    top: -55%;
    width: 100%;
    height: 55%;
    background: linear-gradient(to bottom, transparent, #818cf8, transparent);
    animation: q-email-pulse-line 12s linear infinite;
}

.q-email-flow__packet {
    display: flex;
    position: absolute;
    z-index: 2;
    left: 50%;
    top: -0.75rem;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid rgba(165, 180, 252, 0.7);
    border-radius: 999px;
    background: #312e81;
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.65);
    color: #e0e7ff;
    transform: translateX(-50%);
    animation: q-email-packet 12s ease-in-out infinite;
}

.q-email-flow__packet svg {
    width: 0.82rem;
    height: 0.82rem;
}

.q-email-flow__connector--short {
    height: 1.45rem;
}

.q-email-flow__connector--decision .q-email-flow__beam {
    animation-name: q-email-decision-line;
}

.q-email-flow__engine {
    display: flex;
    position: relative;
    overflow: hidden;
    align-items: center;
    gap: 1.15rem;
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.2rem 1.4rem;
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 1.25rem;
    background: linear-gradient(120deg, rgba(79, 70, 229, 0.22), rgba(30, 41, 59, 0.9) 55%, rgba(16, 185, 129, 0.08));
    box-shadow: 0 22px 55px rgba(30, 27, 75, 0.35), inset 0 1px rgba(255, 255, 255, 0.06);
    animation: q-email-engine-process 12s ease-in-out infinite;
}

.q-email-flow__scan {
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 -22%;
    width: 18%;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.13), rgba(110, 231, 183, 0.22), transparent);
    opacity: 0;
    transform: skewX(-12deg);
    animation: q-email-scan 12s ease-in-out infinite;
}

.q-email-flow__mark {
    display: flex;
    position: relative;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #6366f1, #2563eb 52%, #10b981);
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.08), 0 14px 35px rgba(37, 99, 235, 0.3);
    font-size: 1.8rem;
    font-weight: 900;
    animation: q-email-engine-glow 12s ease-in-out infinite;
}

.q-email-flow__mark,
.q-email-flow__engine-copy {
    z-index: 1;
}

.q-email-flow__engine-copy {
    flex: 1;
    min-width: 0;
}

.q-email-flow__engine-label {
    display: block;
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.q-email-flow__engine-copy > strong {
    display: block;
    margin-top: 0.2rem;
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.q-email-flow__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.q-email-flow__signals span {
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(165, 180, 252, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 700;
    animation: q-email-signal 12s ease-in-out infinite both;
}

.q-email-flow__signals span:nth-child(2) { animation-delay: 0.28s; }
.q-email-flow__signals span:nth-child(3) { animation-delay: 0.56s; }

.q-email-flow__approval {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.7rem 1.15rem;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.09);
    box-shadow: 0 8px 25px rgba(120, 53, 15, 0.12);
    animation: q-email-review 12s ease-in-out infinite;
}

.q-email-flow__approval-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #422006;
    animation: q-email-approval-click 12s ease-in-out infinite;
}

.q-email-flow__approval small {
    color: #fcd34d;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.q-email-flow__approval strong {
    margin-top: 0.1rem;
    color: #fff;
    font-size: 0.82rem;
}

.q-email-flow__outcomes {
    margin-top: 0;
}

.q-email-flow__branch {
    height: 3rem;
    max-width: 100%;
}

.q-email-flow__branch svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.q-email-flow__branch-track,
.q-email-flow__branch-energy {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.q-email-flow__branch-track {
    stroke: rgba(129, 140, 248, 0.18);
    stroke-width: 1.3;
}

.q-email-flow__branch-energy {
    stroke: #818cf8;
    stroke-width: 2;
    stroke-dasharray: 18 230;
    stroke-dashoffset: 250;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(129, 140, 248, 0.8));
    animation: q-email-branch 12s ease-in-out infinite;
}

.q-email-flow__outcome {
    position: relative;
    padding: 1rem 0.95rem 1rem 2.7rem;
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.72));
    animation: q-email-outcome 12s ease-in-out infinite both;
}

.q-email-flow__outcome:nth-child(2) { animation-delay: 0.2s; }
.q-email-flow__outcome:nth-child(3) { animation-delay: 0.4s; }
.q-email-flow__outcome:nth-child(4) { animation-delay: 0.6s; }

.q-email-flow__outcome:nth-child(2) .q-email-flow__tick { animation-delay: 0.2s; }
.q-email-flow__outcome:nth-child(3) .q-email-flow__tick { animation-delay: 0.4s; }
.q-email-flow__outcome:nth-child(4) .q-email-flow__tick { animation-delay: 0.6s; }

.q-email-flow__tick {
    display: flex;
    position: absolute;
    left: 0.9rem;
    top: 50%;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: #10b981;
    color: #052e22;
    font-size: 0.75rem;
    font-weight: 900;
    transform: translateY(-50%);
    animation: q-email-tick 12s ease-in-out infinite;
}

.q-email-flow__finish {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.44);
    text-align: left;
    animation: q-email-finish 12s ease-in-out infinite;
}

.q-email-flow__finish::after {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #60a5fa, #34d399);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    animation: q-email-finish-line 12s ease-in-out infinite;
}

.q-email-flow__finish-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.75rem;
    background: rgba(129, 140, 248, 0.14);
    color: #c7d2fe;
}

.q-email-flow__finish strong {
    font-size: 0.88rem;
}

.q-email-flow__finish small {
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.7rem;
}

.q-email-flow--compact {
    border-radius: 1.5rem;
}

.q-email-flow--compact .q-email-flow__content {
    padding: clamp(1rem, 3vw, 2rem);
}

.q-email-flow--compact .q-email-flow__connector {
    height: 1.45rem;
}

.q-email-flow--compact .q-email-flow__engine {
    max-width: 42rem;
    padding: 1rem 1.2rem;
}

.q-email-flow--compact .q-email-flow__mark {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1rem;
    font-size: 1.5rem;
}

@keyframes q-email-stage {
    0%, 17% { color: #e0e7ff; }
    0%, 17% { text-shadow: 0 0 18px rgba(129, 140, 248, 0.7); }
    20%, 100% { color: #64748b; text-shadow: none; }
}

@keyframes q-email-stage-dot {
    0%, 17% { border-color: rgba(129, 140, 248, 0.76); background: #4f46e5; box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.12), 0 0 18px rgba(99, 102, 241, 0.38); color: #fff; transform: scale(1.08); }
    20%, 100% { border-color: rgba(148, 163, 184, 0.24); background: #111827; box-shadow: none; color: #94a3b8; transform: scale(1); }
}

@keyframes q-email-arrive {
    0%, 2% { opacity: 0.42; transform: translateY(-0.55rem) scale(0.98); }
    7%, 17% { border-color: rgba(129, 140, 248, 0.4); opacity: 1; transform: translateY(0) scale(1); }
    24%, 100% { border-color: rgba(255, 255, 255, 0.1); opacity: 0.74; transform: translateY(0) scale(1); }
}

@keyframes q-email-pulse-line {
    0%, 8% { opacity: 0; transform: translateY(0); }
    12% { opacity: 1; }
    27% { opacity: 1; transform: translateY(280%); }
    30%, 100% { opacity: 0; transform: translateY(280%); }
}

@keyframes q-email-decision-line {
    0%, 42% { opacity: 0; transform: translateY(0); }
    46% { opacity: 1; }
    57% { opacity: 1; transform: translateY(280%); }
    60%, 100% { opacity: 0; transform: translateY(280%); }
}

@keyframes q-email-packet {
    0%, 8% { opacity: 0; top: -0.75rem; transform: translateX(-50%) scale(0.7); }
    12% { opacity: 1; transform: translateX(-50%) scale(1); }
    24% { opacity: 1; top: calc(100% - 0.75rem); transform: translateX(-50%) scale(1); }
    27%, 100% { opacity: 0; top: calc(100% - 0.75rem); transform: translateX(-50%) scale(0.72); }
}

@keyframes q-email-engine-process {
    0%, 20%, 52%, 100% { border-color: rgba(129, 140, 248, 0.4); }
    27%, 45% { border-color: rgba(110, 231, 183, 0.62); box-shadow: 0 24px 65px rgba(30, 27, 75, 0.5), 0 0 34px rgba(16, 185, 129, 0.1), inset 0 1px rgba(255, 255, 255, 0.08); }
}

@keyframes q-email-scan {
    0%, 21% { left: -22%; opacity: 0; }
    25% { opacity: 1; }
    45% { left: 104%; opacity: 0.9; }
    49%, 100% { left: 104%; opacity: 0; }
}

@keyframes q-email-engine-glow {
    0%, 20%, 52%, 100% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.08), 0 14px 35px rgba(37, 99, 235, 0.3); transform: scale(1); }
    28%, 44% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0.04), 0 16px 48px rgba(16, 185, 129, 0.34); transform: scale(1.035); }
}

@keyframes q-email-signal {
    0%, 25%, 49%, 100% { border-color: rgba(165, 180, 252, 0.14); background: rgba(15, 23, 42, 0.62); color: #cbd5e1; }
    31%, 43% { border-color: rgba(110, 231, 183, 0.38); background: rgba(16, 185, 129, 0.12); color: #d1fae5; }
}

@keyframes q-email-review {
    0%, 47%, 65%, 100% { border-color: rgba(251, 191, 36, 0.38); background: rgba(245, 158, 11, 0.09); transform: scale(1); }
    52%, 61% { border-color: rgba(251, 191, 36, 0.78); background: rgba(245, 158, 11, 0.16); box-shadow: 0 0 30px rgba(245, 158, 11, 0.16); transform: scale(1.025); }
}

@keyframes q-email-approval-click {
    0%, 50%, 63%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); transform: scale(1); }
    55% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.38); transform: scale(0.88); }
    59% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); transform: scale(1.08); }
}

@keyframes q-email-branch {
    0%, 59% { stroke-dashoffset: 250; opacity: 0; }
    63% { opacity: 1; }
    78% { stroke-dashoffset: 0; opacity: 1; }
    82%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes q-email-outcome {
    0%, 64% { border-color: rgba(52, 211, 153, 0.12); transform: translateY(0.32rem) scale(0.985); opacity: 0.54; }
    70%, 84% { border-color: rgba(52, 211, 153, 0.42); box-shadow: 0 14px 30px rgba(5, 150, 105, 0.09); transform: translateY(0) scale(1); opacity: 1; }
    91%, 100% { border-color: rgba(52, 211, 153, 0.18); transform: translateY(0) scale(1); opacity: 0.8; }
}

@keyframes q-email-tick {
    0%, 67% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); transform: translateY(-50%) scale(0.72); }
    73% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); transform: translateY(-50%) scale(1.08); }
    79%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); transform: translateY(-50%) scale(1); }
}

@keyframes q-email-finish {
    0%, 84%, 100% { border-color: rgba(255, 255, 255, 0.08); background: rgba(2, 6, 23, 0.44); }
    90%, 97% { border-color: rgba(129, 140, 248, 0.42); background: rgba(79, 70, 229, 0.12); box-shadow: 0 14px 36px rgba(49, 46, 129, 0.18); }
}

@keyframes q-email-finish-line {
    0%, 84% { transform: scaleX(0); }
    94%, 100% { transform: scaleX(1); }
}

@media (max-width: 900px) {
    .q-email-flow__sources,
    .q-email-flow__outcomes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .q-email-flow {
        border-radius: 1.35rem;
    }

    .q-email-flow__sources,
    .q-email-flow__outcomes {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .q-email-flow__stages {
        margin-top: 0.9rem;
    }

    .q-email-flow__stages li {
        font-size: 0.52rem;
        letter-spacing: 0.04em;
    }

    .q-email-flow__stages span {
        width: 1.35rem;
        height: 1.35rem;
    }

    .q-email-flow__motion-toggle {
        top: 0.65rem;
        right: 0.65rem;
        padding: 0.45rem;
    }

    .q-email-flow__motion-toggle span {
        position: absolute;
        overflow: hidden;
        width: 1px;
        height: 1px;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    .q-email-flow__source {
        padding: 0.7rem 0.8rem;
    }

    .q-email-flow__source-icon {
        width: 2.15rem;
        height: 2.15rem;
    }

    .q-email-flow__engine {
        align-items: flex-start;
        gap: 0.9rem;
        padding: 1rem;
    }

    .q-email-flow__mark {
        width: 3rem;
        height: 3rem;
        border-radius: 0.9rem;
        font-size: 1.35rem;
    }

    .q-email-flow__signals {
        display: grid;
        grid-template-columns: 1fr;
    }

    .q-email-flow__signals span {
        border-radius: 0.65rem;
    }

    .q-email-flow__approval {
        width: 100%;
        justify-content: flex-start;
        border-radius: 1rem;
    }

    .q-email-flow__branch {
        position: relative;
        width: 2px;
        height: 1.5rem;
        margin: 0 auto;
        background: rgba(129, 140, 248, 0.22);
    }

    .q-email-flow__branch svg {
        display: none;
    }

    .q-email-flow__finish {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .q-email-flow__motion-toggle {
        display: none;
    }

    .q-email-flow__stages li,
    .q-email-flow__stages span,
    .q-email-flow__source,
    .q-email-flow__beam,
    .q-email-flow__mark,
    .q-email-flow__engine,
    .q-email-flow__signals span,
    .q-email-flow__approval,
    .q-email-flow__approval-icon,
    .q-email-flow__branch-energy,
    .q-email-flow__outcome,
    .q-email-flow__tick,
    .q-email-flow__finish,
    .q-email-flow__finish::after {
        animation: none;
    }

    .q-email-flow__packet,
    .q-email-flow__scan,
    .q-email-flow__branch-energy {
        display: none;
    }
}
