/* ================================================================
   Флекси production landing
   Cobalt and cream, real photo, one scroll story.
   ================================================================ */

:root {
    --cream: #fffaf4;
    --cream-rgb: 255, 250, 244;
    --cobalt: #0a2fae;
    --cobalt-deep: #08258d;
    --cobalt-soft: rgba(10, 47, 174, 0.72);
    --ink-soft: rgba(10, 47, 174, 0.86);
    --line: rgba(10, 47, 174, 0.16);
    --line-strong: rgba(10, 47, 174, 0.34);
    --cream-soft: rgba(255, 250, 244, 0.82);
    --cream-muted: rgba(255, 250, 244, 0.64);
    --cream-line: rgba(255, 250, 244, 0.22);
    --cream-panel: rgba(255, 250, 244, 0.08);

    --f-display: "Tenor Sans", "Trebuchet MS", sans-serif;
    --f-serif: "Lora", Georgia, serif;
    --f-sans: "Open Sans", -apple-system, "Segoe UI", sans-serif;

    --s1: 8px;
    --s2: 16px;
    --s3: 24px;
    --s4: 32px;
    --s5: 40px;
    --s6: 48px;
    --s8: 64px;
    --s10: 80px;
    --s12: 96px;
    --s16: 128px;
    --s20: 160px;

    --container: 1120px;
    --gutter: clamp(20px, 4vw, 48px);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-move: cubic-bezier(0.65, 0, 0.35, 1);
}

.fx-root {
    box-sizing: border-box;
    background: var(--cream);
    scroll-padding-top: 104px;
    scroll-behavior: auto;
}

.fx-root *,
.fx-root *::before,
.fx-root *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

.fx-body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--cream);
    color: var(--cobalt);
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .fx-root {
        scroll-behavior: auto;
    }

    .fx-root *,
    .fx-root *::before,
    .fx-root *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.fx-container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.fx-h2 {
    max-width: 720px;
    font-family: var(--f-display);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 400;
    letter-spacing: 0;
    text-wrap: balance;
}

.fx-h4 {
    margin-bottom: var(--s1);
    font-family: var(--f-display);
    font-size: 20px;
    line-height: 28px;
    font-weight: 400;
}

.fx-body-text {
    max-width: 460px;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 26px;
    text-wrap: pretty;
}

.fx-nav {
    position: fixed;
    z-index: 40;
    top: var(--s2);
    left: 50%;
    width: min(calc(100% - var(--gutter) * 2), 1120px);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    padding: 6px 8px 6px var(--s3);
    border: 1px solid rgba(10, 47, 174, 0.14);
    border-radius: 999px;
    background: rgba(var(--cream-rgb), 0.86);
    box-shadow: 0 18px 60px rgba(10, 47, 174, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transform: translateX(-50%);
}

.fx-nav-brand {
    color: var(--cobalt);
    font-family: var(--f-serif);
    font-size: 24px;
    line-height: 32px;
    font-style: italic;
    text-decoration: none;
}

.fx-nav-cta,
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-family: var(--f-sans);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform 180ms var(--ease-out),
        background 180ms var(--ease-out),
        color 180ms var(--ease-out),
        border-color 180ms var(--ease-out);
}

.fx-nav-cta {
    padding: 0 var(--s3);
    border: 1px solid var(--line-strong);
    color: var(--cobalt);
    font-size: 12px;
    line-height: 16px;
}

.fx-btn {
    min-height: 48px;
    padding: 0 var(--s4);
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 16px;
}

.fx-nav-cta:hover,
.fx-btn-primary {
    border-color: var(--cobalt);
    background: var(--cobalt);
    color: var(--cream);
}

.fx-btn-primary:hover {
    background: transparent;
    color: var(--cobalt);
}

.fx-btn-ghost {
    border-color: var(--line-strong);
    color: var(--cobalt);
}

.fx-btn-ghost:hover {
    border-color: var(--cobalt);
    background: var(--cobalt);
    color: var(--cream);
}

.fx-btn-invert {
    border-color: var(--cream);
    background: var(--cream);
    color: var(--cobalt);
}

.fx-btn-invert:hover {
    background: transparent;
    color: var(--cream);
}

.fx-btn-lg {
    min-height: 56px;
    padding-inline: var(--s5);
    font-size: 16px;
}

.fx-root a:focus-visible,
.fx-root button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.fx-btn:active,
.fx-nav-cta:active,
.fx-chip:active {
    transform: scale(0.98);
}

.fx-hero {
    display: flex;
    min-height: 100svh;
    padding: clamp(112px, 16vh, 152px) 0 var(--s12);
}

.fx-demo,
.fx-flow,
.fx-irina,
.fx-final {
    scroll-margin-top: 104px;
}

.fx-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: clamp(var(--s6), 8vw, var(--s16));
}

.fx-hero-kicker {
    margin-bottom: var(--s2);
    color: var(--cobalt-soft);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fx-hero-title {
    max-width: 680px;
    margin-bottom: var(--s3);
    font-family: var(--f-display);
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 400;
    letter-spacing: 0;
    text-wrap: balance;
}

.fx-hero-sub {
    max-width: 520px;
    margin-bottom: var(--s5);
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 30px;
    text-wrap: pretty;
}

.fx-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
}

.fx-hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.fx-hero-mascot {
    width: clamp(240px, 28vw, 380px);
}

.fx-hero-bubble {
    position: absolute;
    top: 2%;
    right: 2%;
    padding: var(--s2) var(--s3);
    border-radius: 18px 18px 18px 6px;
    background: var(--cobalt);
    color: var(--cream);
    font-family: var(--f-serif);
    font-size: 18px;
    line-height: 24px;
    font-style: italic;
    box-shadow: 0 18px 48px rgba(10, 47, 174, 0.22);
}

.fx-demo {
    background: var(--cobalt);
    color: var(--cream);
    padding: clamp(var(--s10), 10vw, var(--s16)) 0;
}

.fx-demo-head {
    max-width: 760px;
    margin-bottom: var(--s6);
}

.fx-demo .fx-h2 {
    color: var(--cream);
}

.fx-demo-lead {
    max-width: 640px;
    margin-top: var(--s3);
    color: var(--cream-soft);
    font-size: 18px;
    line-height: 30px;
}

.fx-demo-shell {
    padding: clamp(var(--s3), 4vw, var(--s6));
    border: 1px solid var(--cream-line);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(255, 250, 244, 0.1), rgba(255, 250, 244, 0.03)),
        rgba(255, 250, 244, 0.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 250, 244, 0.16),
        0 28px 90px rgba(0, 0, 0, 0.16);
}

.fx-stage-enter {
    animation: fx-stage-in 420ms var(--ease-out) both;
}

@keyframes fx-stage-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.fx-demo-step-label {
    display: block;
    margin-bottom: var(--s3);
    color: var(--cream-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.fx-persona-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s3);
}

.fx-persona-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
    padding: var(--s4);
    border: 1px solid var(--cream-line);
    border-radius: 24px;
    background: var(--cream-panel);
    color: var(--cream);
    font-family: var(--f-sans);
    text-align: left;
    cursor: pointer;
    transition:
        transform 220ms var(--ease-out),
        background 220ms var(--ease-out),
        border-color 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .fx-persona-card:hover {
        border-color: rgba(255, 250, 244, 0.5);
        background: rgba(255, 250, 244, 0.12);
        transform: translateY(-4px);
    }
}

.fx-persona-card:active {
    transform: scale(0.99);
}

.fx-persona-name {
    font-family: var(--f-display);
    font-size: 26px;
    line-height: 32px;
}

.fx-persona-story {
    color: var(--cream-soft);
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
    line-height: 25px;
    text-wrap: pretty;
}

.fx-persona-facts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--cream-muted);
    font-size: 13px;
    line-height: 19px;
}

.fx-persona-pick {
    margin-top: auto;
    padding-top: var(--s2);
    color: var(--cream);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.fx-checkin-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s2);
}

.fx-checkin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
}

.fx-demo-back {
    border: 0;
    background: transparent;
    color: var(--cream-soft);
    font-family: var(--f-sans);
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.fx-demo-back:hover {
    color: var(--cream);
}

.fx-checkin-persona {
    margin-bottom: var(--s4);
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 20px;
    line-height: 28px;
    color: var(--cream);
}

.fx-checkin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: clamp(var(--s4), 5vw, var(--s8));
    align-items: start;
}

.fx-checkin-flow {
    min-height: 320px;
    outline: none;
}

.fx-checkin-progress {
    margin-bottom: var(--s3);
    color: var(--cream-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.fx-checkin-step[hidden] {
    display: none;
}

.fx-step-enter .fx-checkin-step:not([hidden]) {
    animation: fx-stage-in 360ms var(--ease-out) both;
}

.fx-checkin-q {
    border: 0;
}

/* Questions render as chat bubbles; legends stay for screen readers. */
.fx-checkin-q legend {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.fx-checkin-q .fx-chip-row {
    margin-top: var(--s2);
}

.fx-checkin-summary-title {
    margin-bottom: var(--s1);
    font-family: var(--f-display);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    font-weight: 400;
    color: var(--cream);
}

.fx-checkin-summary-copy {
    margin-bottom: var(--s3);
    color: var(--cream-soft);
    font-size: 15px;
    line-height: 24px;
    text-wrap: pretty;
}

.fx-summary-list {
    display: grid;
    gap: var(--s1);
}

.fx-summary-chip {
    display: grid;
    grid-template-columns: minmax(112px, 136px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 11px var(--s2);
    border: 1px solid var(--cream-line);
    border-radius: 14px;
    background: rgba(255, 250, 244, 0.07);
    color: var(--cream);
    font-family: var(--f-sans);
    text-align: left;
    cursor: pointer;
    transition:
        background 180ms var(--ease-out),
        border-color 180ms var(--ease-out),
        transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .fx-summary-chip:hover {
        border-color: rgba(255, 250, 244, 0.55);
        background: rgba(255, 250, 244, 0.14);
        transform: translateY(-1px);
    }
}

.fx-summary-chip:active {
    transform: scale(0.98);
}

.fx-summary-chip-label {
    color: var(--cream-muted);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.fx-summary-chip-value {
    min-width: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.fx-summary-chip-edit {
    justify-self: end;
    color: var(--cream-muted);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.fx-result-trail .fx-summary-chip {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    min-height: 66px;
    gap: 4px 12px;
}

.fx-result-trail .fx-summary-chip-label {
    grid-column: 1;
    grid-row: 1;
}

.fx-result-trail .fx-summary-chip-value {
    grid-column: 1;
    grid-row: 2;
}

.fx-result-trail .fx-summary-chip-edit {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.fx-checkin-submit {
    margin-top: var(--s4);
}

.fx-checkin-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.fx-live-panel {
    position: sticky;
    top: 112px;
    overflow: hidden;
    padding: var(--s4);
    border: 1px solid var(--cream-line);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(255, 250, 244, 0.16), rgba(255, 250, 244, 0.05)),
        rgba(255, 250, 244, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 250, 244, 0.18),
        0 24px 70px rgba(0, 0, 0, 0.14);
}

.fx-live-mascot {
    width: min(150px, 44vw);
    margin: 0 auto var(--s3);
    transform-origin: 50% 84%;
}

.fx-live-title {
    margin-bottom: var(--s1);
    font-family: var(--f-display);
    font-size: 22px;
    line-height: 28px;
    text-wrap: balance;
}

.fx-live-copy {
    margin-bottom: var(--s3);
    color: var(--cream-soft);
    font-size: 14px;
    line-height: 22px;
    text-wrap: pretty;
}

.fx-live-stack {
    display: grid;
    gap: 8px;
}

.fx-live-pill {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 250, 244, 0.18);
    border-radius: 14px;
    background: rgba(255, 250, 244, 0.08);
    color: var(--cream);
    font-family: var(--f-sans);
    font-size: 12px;
    line-height: 18px;
    text-align: left;
    transform: translateY(0);
    transition:
        background 180ms var(--ease-out),
        border-color 180ms var(--ease-out);
}

button.fx-live-pill {
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    button.fx-live-pill:hover {
        border-color: rgba(255, 250, 244, 0.5);
        background: rgba(255, 250, 244, 0.16);
    }
}

.fx-live-pill.is-pending {
    color: var(--cream-muted);
    border-style: dashed;
    background: transparent;
}

.fx-live-pill.is-current {
    border-color: rgba(255, 250, 244, 0.6);
}

.fx-matching-steps {
    display: grid;
    gap: var(--s2);
    max-width: 560px;
    list-style: none;
    counter-reset: none;
}

.fx-matching-steps li {
    position: relative;
    padding-left: var(--s4);
    color: var(--cream-muted);
    font-size: 17px;
    line-height: 28px;
    opacity: 0.4;
    transition: opacity 320ms var(--ease-out), color 320ms var(--ease-out);
}

.fx-matching-steps li::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cream-muted);
    transition: background 320ms var(--ease-out), transform 320ms var(--ease-out);
}

.fx-matching-steps li.is-on {
    color: var(--cream);
    opacity: 1;
}

.fx-matching-steps li.is-on::before {
    background: var(--cream);
    transform: scale(1.35);
}

.fx-matching-board {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: clamp(var(--s4), 6vw, var(--s8));
    align-items: center;
}

.fx-matching-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
}

.fx-matching-mascot {
    width: min(180px, 40vw);
    margin-inline: auto;
    transform-origin: 50% 84%;
}

.fx-matching-pool {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 280px;
}

.fx-pool-tile {
    padding: 4px 10px;
    border: 1px solid rgba(255, 250, 244, 0.3);
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.12);
    color: var(--cream-soft);
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
    transition:
        opacity 520ms var(--ease-out),
        transform 520ms var(--ease-out),
        background 520ms var(--ease-out),
        border-color 520ms var(--ease-out);
}

/* Fleksi throws the tile away: it flies out spinning */
.fx-pool-tile.is-out {
    opacity: 0;
    transform: translate(var(--fly, 80px), 60px) rotate(var(--rot, 18deg)) scale(0.6);
    pointer-events: none;
}

.fx-pool-tile.is-final {
    border-color: var(--cream);
    background: var(--cream);
    color: var(--cobalt);
    box-shadow:
        0 0 0 5px rgba(255, 250, 244, 0.14),
        0 0 34px rgba(255, 250, 244, 0.45);
    animation: fx-tile-final 900ms var(--ease-out) both;
}

@keyframes fx-tile-final {
    0% {
        transform: scale(1);
    }

    55% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1.12);
    }
}

/* Fleksi's one-line commentary while filtering */
.fx-matching-quip {
    min-height: 24px;
    max-width: 260px;
    padding: 8px 14px;
    border-radius: 16px 16px 16px 5px;
    background: rgba(255, 250, 244, 0.12);
    border: 1px solid rgba(255, 250, 244, 0.22);
    color: var(--cream);
    font-family: var(--f-serif);
    font-size: 14px;
    line-height: 20px;
    font-style: italic;
    text-align: center;
}

.fx-matching-quip.is-pop {
    animation: fx-quip-pop 340ms var(--ease-out) both;
}

@keyframes fx-quip-pop {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.94);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fx-matching-count {
    min-height: 21px;
    color: var(--cream-muted);
    font-size: 13px;
    line-height: 21px;
    text-align: center;
}

.fx-result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: clamp(var(--s4), 5vw, var(--s8));
    align-items: start;
}

.fx-demo-result {
    max-width: 640px;
}

.fx-demo-result.is-revealed {
    animation: fx-result-reveal 640ms var(--ease-out) both;
}

@keyframes fx-result-reveal {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fx-result-trail {
    padding: var(--s4);
    border: 1px solid var(--cream-line);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(255, 250, 244, 0.14), rgba(255, 250, 244, 0.04)),
        rgba(255, 250, 244, 0.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 250, 244, 0.16),
        0 20px 60px rgba(0, 0, 0, 0.12);
}

.fx-result-trail[hidden] {
    display: none;
}

.fx-result-trail-title {
    margin-bottom: var(--s1);
    font-family: var(--f-display);
    font-size: 20px;
    line-height: 26px;
}

.fx-result-trail-copy {
    margin-bottom: var(--s3);
    color: var(--cream-soft);
    font-size: 14px;
    line-height: 22px;
    text-wrap: pretty;
}

.fx-demo-result-title {
    margin-bottom: var(--s2);
    font-family: var(--f-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 400;
    text-wrap: balance;
}

.fx-demo-result-meta {
    margin-bottom: var(--s3);
    color: var(--cream-soft);
    font-size: 16px;
    line-height: 26px;
}

.fx-demo-result-reasons {
    display: grid;
    gap: var(--s1);
    margin-bottom: var(--s4);
    list-style: none;
}

.fx-demo-result-reasons li {
    position: relative;
    padding-left: var(--s3);
    color: var(--cream-soft);
    font-size: 15px;
    line-height: 24px;
}

.fx-demo-result-reasons li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cream-soft);
}

.fx-demo-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s3);
}

.fx-demo-result-note {
    margin-top: var(--s4);
    color: var(--cream-muted);
    font-size: 13px;
    line-height: 21px;
    max-width: 54ch;
}

.fx-demo-foot {
    max-width: 640px;
    margin: var(--s6) auto 0;
    color: var(--cream-soft);
    text-align: center;
    font-size: 15px;
    line-height: 26px;
}

.fx-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s1);
    margin-top: var(--s4);
}

.fx-chip {
    min-height: 44px;
    padding: 0 var(--s3);
    border: 1px solid var(--cream-line);
    border-radius: 999px;
    background: transparent;
    color: var(--cream);
    font-family: var(--f-sans);
    font-size: 15px;
    line-height: 18px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 180ms var(--ease-out),
        background 180ms var(--ease-out),
        color 180ms var(--ease-out),
        border-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .fx-chip:hover {
        background: rgba(255, 250, 244, 0.16);
    }
}

.fx-chip.is-picked {
    border-color: var(--cream);
    background: var(--cream);
    color: var(--cobalt);
}

.fx-chip.is-flashed {
    animation: fx-chip-flash 360ms var(--ease-out) both;
}

@keyframes fx-chip-flash {
    0% {
        transform: scale(0.98);
    }

    60% {
        transform: scale(1.035);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fx-live-pill {
        animation: fx-live-pill-in 420ms var(--ease-out) both;
        animation-delay: calc(var(--i, 0) * 34ms);
    }
}

@keyframes fx-live-pill-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

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

.fx-flow {
    padding: var(--s20) 0 var(--s16);
}

.fx-flow-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s5);
    margin-top: var(--s8);
    list-style: none;
}

.fx-flow-item {
    padding-top: var(--s3);
    border-top: 1px solid var(--line-strong);
}

.fx-irina {
    padding: var(--s12) 0 var(--s20);
}

.fx-irina-grid {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(var(--s6), 8vw, var(--s16));
}

.fx-irina-media {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(10, 47, 174, 0.06);
}

.fx-irina-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(1) contrast(1.06);
}

.fx-irina-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s1);
    margin-top: var(--s3);
    list-style: none;
}

.fx-irina-facts li {
    padding: var(--s1) var(--s2);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--cobalt);
    font-size: 14px;
    line-height: 24px;
}

.fx-count {
    font-family: var(--f-serif);
    font-style: italic;
}

.fx-final {
    background: var(--cobalt);
    color: var(--cream);
    padding: var(--s20) 0;
}

.fx-final-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
    text-align: center;
}

.fx-final-mascot {
    width: clamp(120px, 16vw, 200px);
}

.fx-final-title {
    font-family: var(--f-display);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 400;
    text-wrap: balance;
}

.fx-final-sub {
    max-width: 480px;
    margin-bottom: var(--s2);
    color: var(--cream-soft);
    font-size: 16px;
    line-height: 26px;
}

.fx-footer {
    border-top: 1px solid var(--line);
    padding: var(--s4) 0;
}

.fx-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--s2);
    font-size: 14px;
    line-height: 24px;
}

.fx-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--s1) var(--s2);
}

.fx-footer a {
    color: var(--cobalt);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

@media (max-width: 960px) {
    .fx-hero {
        min-height: auto;
        padding-bottom: var(--s10);
    }

    .fx-hero-grid,
    .fx-irina-grid {
        grid-template-columns: 1fr;
    }

    .fx-hero-grid {
        gap: var(--s5);
    }

    .fx-hero-visual {
        order: -1;
    }

    .fx-demo {
        padding: var(--s12) 0;
    }

    .fx-demo-head {
        margin-bottom: var(--s5);
    }

    .fx-persona-grid {
        grid-template-columns: 1fr;
    }

    .fx-checkin-layout,
    .fx-result-layout,
    .fx-matching-board {
        grid-template-columns: 1fr;
    }

    .fx-live-panel {
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: minmax(96px, 128px) minmax(0, 1fr);
        column-gap: var(--s3);
        align-items: center;
    }

    .fx-checkin-flow {
        min-height: 0;
    }

    .fx-live-mascot {
        grid-row: 1 / span 2;
        margin: 0;
    }

    .fx-live-stack {
        grid-column: 1 / -1;
        margin-top: var(--s3);
    }

    .fx-matching-mascot {
        width: min(180px, 52vw);
    }

    .fx-flow,
    .fx-final {
        padding: var(--s12) 0;
    }

    .fx-flow-list {
        grid-template-columns: 1fr;
        gap: var(--s4);
    }

    .fx-irina {
        padding: var(--s10) 0 var(--s12);
    }

    .fx-footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .fx-nav {
        position: absolute;
        top: var(--s1);
        left: var(--gutter);
        width: calc(100% - var(--gutter) * 2);
        min-height: 48px;
        padding: 4px 5px 4px var(--s2);
        transform: none;
    }

    .fx-nav-brand {
        font-size: 22px;
    }

    .fx-nav-cta {
        min-height: 38px;
        padding: 0 var(--s2);
        font-size: 10px;
    }

    .fx-hero {
        padding-top: var(--s12);
    }

    .fx-hero-visual {
        order: 0;
        margin-top: var(--s2);
    }

    .fx-hero-mascot {
        width: min(220px, 68vw);
    }

    .fx-hero-title {
        font-size: 36px;
        line-height: 42px;
    }

    .fx-hero-sub,
    .fx-demo-lead {
        font-size: 16px;
        line-height: 26px;
    }

    .fx-hero-actions,
    .fx-chip-row {
        align-items: stretch;
    }

    .fx-hero-actions .fx-btn {
        width: 100%;
    }

    .fx-hero-bubble {
        position: static;
        margin-top: var(--s2);
        padding: 12px var(--s2);
        font-size: 16px;
        line-height: 22px;
    }

    .fx-hero-visual {
        flex-direction: column;
        align-items: center;
    }

    .fx-demo-shell {
        padding: var(--s3);
        border-radius: 24px;
    }

    .fx-result-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s3);
    }

    .fx-demo-result,
    .fx-result-trail {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .fx-persona-card {
        padding: var(--s3);
    }

    .fx-live-panel {
        padding: var(--s3);
        border-radius: 24px;
    }

    .fx-live-mascot {
        width: min(128px, 46vw);
    }

    .fx-demo-result-title {
        font-size: 26px;
        line-height: 32px;
    }

    .fx-chip {
        width: 100%;
        justify-content: center;
        min-height: 46px;
        padding: 0 var(--s2);
    }

    .fx-demo-result-actions .fx-btn {
        width: 100%;
    }

    .fx-summary-chip {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 4px 12px;
        padding: 12px var(--s2);
    }

    .fx-summary-chip-label {
        grid-column: 1;
        grid-row: 1;
    }

    .fx-summary-chip-value {
        grid-column: 1;
        grid-row: 2;
    }

    .fx-summary-chip-edit {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .fx-checkin-top {
        flex-direction: column;
        gap: var(--s1);
    }

    .fx-checkin-nav {
        gap: var(--s2);
    }

    .fx-result-trail {
        padding: var(--s3);
        border-radius: 24px;
    }

    .fx-matching-pool {
        max-width: 100%;
    }

    .fx-pool-tile {
        font-size: 10px;
        padding: 3px 8px;
    }

    .fx-irina-media {
        border-radius: 24px;
    }

    .fx-footer-inner {
        display: grid;
        gap: var(--s3);
    }
}

@media (max-width: 360px) {
    .fx-live-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .fx-live-mascot {
        grid-row: auto;
        margin: 0 auto var(--s2);
    }

    .fx-live-stack {
        grid-column: 1;
        text-align: left;
    }
}

/* ================================================================
   Living Fleksi: real brand PNG with light overlay reactions.
   ================================================================ */

.fx-fleksi {
    position: relative;
    display: block;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fx-fleksi-stage {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    transform-origin: 50% 88%;
    filter:
        drop-shadow(0 12px 22px rgba(10, 47, 174, 0.2))
        drop-shadow(0 0 18px rgba(255, 250, 244, 0.16));
}

.fx-fleksi-img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.fx-fleksi-base {
    opacity: 1;
    transition: opacity 160ms var(--ease-out);
}

.fx-fleksi-happy,
.fx-fleksi-blink,
.fx-fleksi-face,
.fx-fleksi-glow,
.fx-fleksi-props {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.fx-fleksi-happy {
    opacity: 0;
    transition: opacity 180ms var(--ease-out);
}

.fx-fleksi[data-emotion="happy"] .fx-fleksi-happy {
    opacity: 1;
}

.fx-fleksi[data-emotion="happy"] .fx-fleksi-base {
    opacity: 0;
}

.fx-fleksi-hint {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 86%;
    width: max-content;
    max-width: min(220px, 82vw);
    padding: 8px 12px;
    border-radius: 15px 15px 15px 5px;
    background: var(--cream);
    color: var(--cobalt);
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 12px 32px rgba(10, 47, 174, 0.18);
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.98);
    transition:
        opacity 180ms var(--ease-out),
        transform 180ms var(--ease-out);
    pointer-events: none;
}

.fx-fleksi.has-hint .fx-fleksi-hint {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.fx-fleksi-hero {
    width: 100%;
}

.fx-fleksi-final {
    width: 100%;
}

.fx-fleksi-blink,
.fx-fleksi-face,
.fx-fleksi-glow,
.fx-fleksi-prop {
    opacity: 0;
    transition: opacity 160ms var(--ease-out);
}

.fx-fleksi.is-blink .fx-fleksi-blink,
.fx-fleksi[data-emotion="concerned"] .fx-fleksi-face,
.fx-fleksi[data-emotion="surprised"] .fx-fleksi-face,
.fx-fleksi[data-state="careful"] .fx-fleksi-face,
.fx-fleksi[data-state="pause"] .fx-fleksi-face {
    opacity: 1;
}

.fx-fleksi[data-emotion="happy"] .fx-fleksi-glow,
.fx-fleksi[data-emotion="soft"] .fx-fleksi-glow,
.fx-fleksi[data-emotion="working"] .fx-fleksi-glow,
.fx-fleksi[data-state="thinking"] .fx-fleksi-glow,
.fx-fleksi[data-state="matching"] .fx-fleksi-glow {
    opacity: 1;
}

.fx-fleksi-glow {
    background: radial-gradient(circle at 50% 58%, rgba(255, 250, 244, 0.36), rgba(255, 250, 244, 0) 58%);
    transform: scale(1.08);
}

.fx-fleksi-prop {
    position: absolute;
    z-index: 3;
    display: block;
    transform: translateY(4px) scale(0.96);
    transition:
        opacity 180ms var(--ease-out),
        transform 180ms var(--ease-out);
}

.fx-fleksi-prop-careful,
.fx-fleksi-prop-clock {
    right: 14%;
    top: 16%;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--cream);
    color: var(--cobalt);
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(10, 47, 174, 0.18);
}

.fx-fleksi-prop-careful::before {
    content: "бережно";
}

.fx-fleksi[data-state="pause"] .fx-fleksi-prop-careful::before {
    content: "пауза";
}

.fx-fleksi-prop-clock::before {
    content: "15 мин";
}

.fx-fleksi-prop-spark {
    left: 18%;
    top: 24%;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: #ffd166;
    transform: rotate(45deg) translateY(4px) scale(0.8);
    box-shadow:
        34px -18px 0 -1px rgba(255, 250, 244, 0.95),
        60px 14px 0 -2px rgba(255, 209, 102, 0.85);
}

.fx-fleksi[data-state="pause"] .fx-fleksi-prop-careful,
.fx-fleksi[data-state="careful"] .fx-fleksi-prop-careful,
.fx-fleksi[data-gesture="carefulStop"] .fx-fleksi-prop-careful,
.fx-fleksi[data-gesture="quickStep"] .fx-fleksi-prop-clock,
.fx-fleksi[data-gesture="spark"] .fx-fleksi-prop-spark {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fx-fleksi[data-gesture="spark"] .fx-fleksi-prop-spark {
    transform: rotate(45deg) translateY(0) scale(1);
}

.fx-fleksi-lid,
.fx-fleksi-brow,
.fx-fleksi-mouth {
    position: absolute;
    display: block;
    background: #1636c8;
}

.fx-fleksi-lid {
    top: 61%;
    width: 9%;
    height: 1.8%;
    border-radius: 999px;
}

.fx-fleksi-lid-left {
    left: 35%;
}

.fx-fleksi-lid-right {
    left: 59%;
}

.fx-fleksi-brow {
    top: 57.5%;
    width: 8%;
    height: 1.5%;
    border-radius: 999px;
    transform-origin: center;
}

.fx-fleksi-brow-left {
    left: 33.5%;
}

.fx-fleksi-brow-right {
    left: 58.5%;
}

.fx-fleksi[data-emotion="concerned"] .fx-fleksi-brow-left {
    transform: rotate(16deg);
}

.fx-fleksi[data-emotion="concerned"] .fx-fleksi-brow-right {
    transform: rotate(-16deg);
}

.fx-fleksi-mouth {
    left: 45.4%;
    top: 67.2%;
    width: 10%;
    height: 1.9%;
    border-radius: 999px;
}

.fx-fleksi-mouth-soft {
    transform: rotate(180deg);
}

.fx-fleksi-mouth-o {
    left: 48.2%;
    top: 66%;
    width: 4.8%;
    height: 4%;
    border-radius: 999px;
    opacity: 0;
}

.fx-fleksi[data-emotion="surprised"] .fx-fleksi-mouth-soft {
    opacity: 0;
}

.fx-fleksi[data-emotion="surprised"] .fx-fleksi-mouth-o {
    opacity: 1;
}

/* Reaction moves */
.fx-fleksi.is-bounce .fx-fleksi-stage,
.fx-fleksi.is-hop .fx-fleksi-stage {
    animation: fx-fleksi-hop 520ms var(--ease-out);
}

.fx-fleksi.is-spark .fx-fleksi-stage {
    animation: fx-fleksi-hop 520ms var(--ease-out);
}

.fx-fleksi.is-soft-breath .fx-fleksi-stage {
    animation: fx-fleksi-soft-breath 720ms var(--ease-out);
}

.fx-fleksi.is-careful-stop .fx-fleksi-stage {
    animation: fx-fleksi-careful-stop 640ms var(--ease-out);
}

.fx-fleksi.is-quick-step .fx-fleksi-stage {
    animation: fx-fleksi-quick-step 580ms var(--ease-out);
}

.fx-fleksi.is-stretch .fx-fleksi-stage {
    animation: fx-fleksi-stretch 560ms var(--ease-out);
}

.fx-fleksi.is-working .fx-fleksi-stage {
    animation: fx-fleksi-work 760ms ease-in-out 3;
}

@keyframes fx-fleksi-hop {
    0% {
        transform: scale(1, 1);
    }

    30% {
        transform: scale(1.045, 0.94) translateY(4px);
    }

    60% {
        transform: scale(0.97, 1.04) translateY(-8px);
    }

    100% {
        transform: scale(1, 1);
    }
}

@keyframes fx-fleksi-soft-breath {
    0% {
        transform: translateY(0) scale(1);
    }

    45% {
        transform: translateY(2px) scale(0.985, 1.012);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes fx-fleksi-careful-stop {
    0% {
        transform: translateX(0) scale(1);
    }

    28% {
        transform: translateX(-4px) scale(1.01, 0.99);
    }

    58% {
        transform: translateX(3px) scale(0.995, 1.005);
    }

    100% {
        transform: translateX(0) scale(1);
    }
}

@keyframes fx-fleksi-quick-step {
    0% {
        transform: translateX(0) scale(1);
    }

    32% {
        transform: translateX(7px) scale(0.98, 1.02);
    }

    64% {
        transform: translateX(-3px) scale(1.015, 0.99);
    }

    100% {
        transform: translateX(0) scale(1);
    }
}

@keyframes fx-fleksi-stretch {
    0% {
        transform: translateY(0) scale(1);
    }

    42% {
        transform: translateY(-3px) scale(0.965, 1.035);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes fx-fleksi-work {
    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

/* ================================================================
   Chat-style check-in
   ================================================================ */

.fx-chat-log {
    display: flex;
    flex-direction: column;
    gap: var(--s1);
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--s3);
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 250, 244, 0.3) transparent;
}

.fx-chat-bubble {
    max-width: 82%;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 22px;
    animation: fx-bubble-in 300ms var(--ease-out) both;
}

.fx-chat-bubble.is-fleksi {
    align-self: flex-start;
    border-radius: 18px 18px 18px 6px;
    background: rgba(255, 250, 244, 0.12);
    border: 1px solid rgba(255, 250, 244, 0.2);
    color: var(--cream);
}

.fx-chat-bubble.is-user {
    align-self: flex-end;
    border-radius: 18px 18px 6px 18px;
    background: var(--cream);
    color: var(--cobalt);
    font-weight: 600;
}

@keyframes fx-bubble-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Typing indicator: three pulsing dots */
.fx-chat-bubble.is-typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 42px;
}

.fx-chat-bubble.is-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cream-soft);
    animation: fx-typing 1.1s ease-in-out infinite;
}

.fx-chat-bubble.is-typing span:nth-child(2) {
    animation-delay: 0.18s;
}

.fx-chat-bubble.is-typing span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes fx-typing {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* ================================================================
   Persona "day of the heroine" micro-timeline
   ================================================================ */

.fx-persona-day {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 250, 244, 0.3);
    background: rgba(255, 250, 244, 0.05);
    font-size: 13px;
    line-height: 19px;
    color: var(--cream-soft);
}

.fx-day-time {
    font-family: var(--f-mono, monospace);
    font-size: 12px;
    font-weight: 700;
    color: var(--cream);
    min-width: 42px;
}

.fx-persona-day.is-tick .fx-day-text,
.fx-persona-day.is-tick .fx-day-time {
    animation: fx-day-tick 360ms var(--ease-out) both;
}

@keyframes fx-day-tick {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   Scroll companion
   ================================================================ */

.fx-companion {
    position: fixed;
    right: clamp(12px, 3vw, 40px);
    bottom: calc(clamp(12px, 3vh, 32px) + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    max-width: 240px;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 300ms var(--ease-out),
        transform 300ms var(--ease-out);
    pointer-events: none;
}

.fx-companion.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fx-companion .fx-fleksi {
    pointer-events: auto;
}

.fx-fleksi-companion {
    width: 74px;
}

.fx-companion-bubble {
    padding: 8px 14px;
    border-radius: 16px 16px 5px 16px;
    background: var(--cream);
    color: var(--cobalt);
    font-size: 13px;
    line-height: 19px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    text-wrap: pretty;
}

@media (max-width: 720px) {
    .fx-companion {
        display: none;
    }

    .fx-chat-log {
        max-height: 220px;
    }

    .fx-chat-bubble {
        max-width: 92%;
        font-size: 14px;
        line-height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fx-fleksi.is-working .fx-fleksi-stage,
    .fx-fleksi.is-bounce .fx-fleksi-stage,
    .fx-fleksi.is-hop .fx-fleksi-stage,
    .fx-fleksi.is-spark .fx-fleksi-stage,
    .fx-fleksi.is-soft-breath .fx-fleksi-stage,
    .fx-fleksi.is-careful-stop .fx-fleksi-stage,
    .fx-fleksi.is-quick-step .fx-fleksi-stage,
    .fx-fleksi.is-stretch .fx-fleksi-stage,
    .fx-chat-bubble,
    .fx-companion {
        animation: none;
        transition: none;
    }
}
