.cfx { --cfx-dark: #1a1a1a; --cfx-cream: #f5f2ed; width: 100%; margin-bottom: 72px; }
/* Cards waiting to slide in sit 24px off-axis; keep them from widening the page on phones. */
.cfx--journey { overflow-x: clip; }
.cfx__explorer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); }
.cfx__tabs { display: flex; flex-direction: column; justify-content: center; }
.cfx__tab { position: relative; display: block; width: 100%; min-height: 64px; padding: 20px 0 20px 18px; border: 0; border-top: 1px solid var(--color-border); background: transparent; text-align: left; font: 600 clamp(18px, 1.35vw, 20px) / 1.4 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.045em; text-transform: uppercase; color: var(--color-text-secondary); cursor: pointer; transition: color 250ms ease; }
.cfx__tab:last-child { border-bottom: 1px solid var(--color-border); }
.cfx__tab::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--color-accent); content: ''; opacity: 0; transition: opacity 250ms ease; }
.cfx__tab[aria-selected='true'] { color: var(--color-text); }
.cfx__tab[aria-selected='true']::before { opacity: 1; }
.cfx__tab:focus-visible, .cfx__panel:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.cfx__progress { position: absolute; inset: auto 0 -1px; height: 2px; background: var(--color-accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.cfx__tab[aria-selected='true'].cfx__tab--playing .cfx__progress { animation: cfx-progress var(--cfx-duration, 7000ms) linear forwards; animation-play-state: var(--cfx-play-state, running); }
.cfx__stage { display: grid; min-height: 380px; padding: 48px; background: var(--cfx-dark); color: var(--cfx-cream); }
.cfx__panel { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.cfx__panel[hidden] { display: none; }
.cfx__eyebrow { font: 600 13px / 1.5 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; color: #f6a17e; }
.cfx__statement { max-width: 29ch; margin: auto 0; padding: 34px 0; font-size: clamp(24px, 2vw, 26px); line-height: 1.45; font-weight: 500; color: var(--cfx-cream); overflow-wrap: anywhere; }
.cfx__position { margin-top: auto; font: 13px / 1.5 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; color: var(--cfx-cream); }
@keyframes cfx-progress { to { transform: scaleX(1); } }

.cfx__journey { position: relative; isolation: isolate; --cfx-rail-x: 50%; }
.cfx__rail { position: absolute; z-index: 0; top: 130px; bottom: 130px; left: var(--cfx-rail-x); width: 2px; background: var(--color-border); transform: translateX(-50%); pointer-events: none; }
.cfx__rail-fill { position: absolute; inset: 0; background: var(--color-accent); transform-origin: top; }
.cfx__traveller { position: absolute; z-index: 2; left: 50%; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-accent) 18%, transparent), 0 0 20px color-mix(in srgb, var(--color-accent) 40%, transparent); transform: translate(-50%, 50%); }
.cfx__end-cap { position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-bg); transform: translateX(-50%); }
.cfx__step { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); align-items: center; min-height: 260px; }
.cfx__node { position: absolute; z-index: 2; top: 50%; left: var(--cfx-rail-x); width: 18px; height: 18px; border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-accent); transform: translate(-50%, -50%); }
.cfx__journey.cfx--motion .cfx__node:not(.is-reached) { border-color: var(--color-border); background: var(--color-bg); }
.cfx__node.is-reached { border-color: var(--color-accent); background: var(--color-accent); }
.cfx__node.has-pulsed::after { position: absolute; inset: -2px; border: 2px solid var(--color-accent); border-radius: 50%; content: ''; animation: cfx-pulse 650ms ease-out both; }
@keyframes cfx-pulse { to { opacity: 0; transform: scale(2.6); } }
.cfx__card { position: relative; grid-column: 1; min-width: 0; padding: clamp(24px, 3vw, 42px); border: 1px solid var(--color-border); background: var(--color-bg-section); transition: border-color 250ms ease, opacity 450ms ease-out, transform 450ms ease-out; }
.cfx__step:nth-of-type(odd) .cfx__card { grid-column: 3; }
.cfx__card::after { position: absolute; top: 50%; left: 100%; width: 40px; height: 1px; background: var(--color-border); content: ''; }
.cfx__step:nth-of-type(odd) .cfx__card::after { left: auto; right: 100%; }
.cfx__step.is-active .cfx__card { border-color: var(--color-text); }
.cfx__actor { display: inline-block; margin-bottom: 20px; padding: 7px 10px; font: 700 11px / 1.3 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text); background: color-mix(in srgb, var(--color-text) 9%, var(--color-bg)); }
.cfx__actor--buyer, .cfx__actor--patient { color: #803318; background: #f6dfd3; }
.cfx__card-title { margin: 0 0 18px; font: 700 clamp(20px, 2vw, 26px) / 1.35 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.045em; text-transform: uppercase; color: var(--color-text); overflow-wrap: anywhere; text-wrap: balance; }
.cfx__card-description { max-width: 60ch; margin: 0; font-size: 17px; line-height: 1.6; color: color-mix(in srgb, var(--color-text-secondary) 75%, var(--color-text)); overflow-wrap: anywhere; }
.cfx__journey.cfx--motion .cfx__rail-fill { transform: scaleY(var(--cfx-progress, 0)); }
.cfx__journey.cfx--motion .cfx__traveller { top: calc(var(--cfx-progress, 0) * 100%); bottom: auto; transform: translate(-50%, -50%); }
.cfx__journey.cfx--motion .cfx__step:not(.is-visible) .cfx__card { opacity: 0; transform: translateX(-24px); }
.cfx__journey.cfx--motion .cfx__step:nth-of-type(odd):not(.is-visible) .cfx__card { transform: translateX(24px); }
@media (max-width: 1023px) {
    .cfx__explorer { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .cfx__stage { min-height: 280px; padding: 32px; }
    .cfx__journey { --cfx-rail-x: 20px; }
    .cfx__step { grid-template-columns: 56px minmax(0, 1fr); min-height: 220px; padding: 16px 0; }
    .cfx__card, .cfx__step:nth-of-type(odd) .cfx__card { grid-column: 2; }
    .cfx__card::after, .cfx__step:nth-of-type(odd) .cfx__card::after { left: auto; right: 100%; width: 36px; }
    .cfx__journey.cfx--motion .cfx__step:not(.is-visible) .cfx__card, .cfx__journey.cfx--motion .cfx__step:nth-of-type(odd):not(.is-visible) .cfx__card { transform: translateX(24px); }
}
@media (max-width: 480px) { .cfx__card { padding: 22px 18px; } .cfx__card-title { font-size: 20px; } .cfx__card-description { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
    .cfx *, .cfx *::before, .cfx *::after { animation: none !important; transition: none !important; }
    .cfx__journey.cfx--motion .cfx__rail-fill { transform: none; }
    .cfx__journey.cfx--motion .cfx__traveller { top: auto; bottom: 0; transform: translate(-50%, 50%); }
    .cfx__journey.cfx--motion .cfx__step:not(.is-visible) .cfx__card { opacity: 1; transform: none; }
}

.cfx__mobile-list { display: none; }
.cfx__card-title a, .cfx__eyebrow a, .cfx__mobile-title a { color: inherit; text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: .2em; }
.cfx__card-title a, .cfx__mobile-title a { display: inline-flex; align-items: center; min-height: 44px; }
.cfx__eyebrow a { display: inline-flex; align-items: center; min-height: 44px; text-decoration-color: #f6a17e; }
.cfx__card-title a:focus-visible, .cfx__eyebrow a:focus-visible, .cfx__mobile-title a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.cfx__eyebrow a:focus-visible { outline-color: #f6a17e; }
@media (max-width: 1023px) {
    .cfx__explorer { display: none; }
    .cfx__mobile-list { display: block; border-top: 1px solid var(--color-border); }
    .cfx__mobile-row { padding: 22px 0; border-bottom: 1px solid var(--color-border); }
    .cfx__mobile-title { margin: 0 0 10px; font: 700 clamp(17px, 3vw, 20px) / 1.4 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; overflow-wrap: anywhere; color: var(--color-text); }
    .cfx__mobile-description { max-width: 70ch; margin: 0; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; color: var(--color-text); }
}
