/* FMD Toolkit landing: epidemiological modelling platform index. */

.fmd-home-page {
    position: relative;
    max-width: min(1180px, 100%);
    padding-bottom: var(--sp-9);
    isolation: isolate;
}

.fmd-home-page::before,
.fmd-home-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.fmd-home-page::before {
    background:
        radial-gradient(circle at 18% 12%, rgba(181, 83, 60, 0.10), transparent 24rem),
        radial-gradient(circle at 82% 24%, rgba(31, 58, 95, 0.11), transparent 28rem),
        linear-gradient(135deg, rgba(245, 239, 225, 0.92), rgba(232, 220, 196, 0.46));
}

.fmd-home-page::after {
    display: none;
    mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}

.fmd-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin: var(--sp-5) 0 clamp(2.5rem, 6vw, 5.5rem);
    padding: clamp(2rem, 5vw, 4.5rem);
    overflow: hidden;
    border: 1px solid rgba(107, 85, 60, 0.16);
    border-radius: 34px;
    background: linear-gradient(140deg, rgba(255, 249, 238, 0.70), rgba(232, 220, 196, 0.38));
    box-shadow: inset 0 1px 0 rgba(255, 249, 238, 0.78), 0 28px 80px rgba(58, 46, 34, 0.10);
}

.fmd-hero::before {
    display: none;
}

.fmd-hero__copy,
.fmd-hero__viz {
    position: relative;
    z-index: 1;
}

.fmd-hero h1 {
    max-width: 15ch;
    font-size: clamp(1.75rem, 3.3vw, 3.35rem);
    font-weight: 500;
    line-height: 1.03;
    margin: var(--sp-2) 0 var(--sp-4);
    color: var(--ink-umber);
}

.fmd-hero h1 span {
    display: block;
}

.fmd-lede {
    max-width: 66ch;
    margin: 0;
    font-size: clamp(1.05rem, 1.45vw, 1.25rem);
    color: var(--ink-walnut);
    line-height: var(--leading-body);
}

.fmd-hero__meta,
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-5);
}

.fmd-hero__meta span,
.tool-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.62rem;
    border: 1px solid rgba(107, 85, 60, 0.18);
    border-radius: var(--radius-pill);
    background: rgba(245, 239, 225, 0.46);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-walnut);
}

.fmd-hero__viz {
    min-height: 360px;
    border: 1px solid rgba(31, 58, 95, 0.16);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(245, 239, 225, 0.32), rgba(232, 220, 196, 0.24));
    box-shadow: inset 0 0 0 1px rgba(255, 249, 238, 0.38), 0 18px 46px rgba(58, 46, 34, 0.08);
}

.fmd-hero__viz svg {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: block;
}

.fmd-hero__grid-line {
    fill: none;
    stroke: rgba(58, 46, 34, 0.10);
    stroke-width: 1;
}

.fmd-hero__curve {
    fill: none;
    stroke-linecap: round;
    stroke-width: 3;
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
    animation: fmd-draw 3.8s var(--ease-standard) forwards, fmd-curve-breathe 7s var(--ease-standard) 3.8s infinite;
}

.fmd-hero__curve--immunity { stroke: url(#fmdCurveGradient); }
.fmd-hero__curve--spread { stroke: rgba(31, 58, 95, 0.48); animation-delay: 0.45s, 4.2s; }

.fmd-hero__network path {
    fill: none;
    stroke: rgba(107, 85, 60, 0.24);
    stroke-width: 1.2;
}

.fmd-hero__network circle {
    fill: rgba(245, 239, 225, 0.82);
    stroke: rgba(181, 83, 60, 0.42);
    stroke-width: 1.5;
    transform-origin: center;
    animation: fmd-node-pulse 4.8s var(--ease-standard) infinite;
}

.fmd-hero__network circle:nth-child(3n) { animation-delay: 1.2s; stroke: rgba(107, 142, 78, 0.48); }
.fmd-hero__network circle:nth-child(2n) { animation-delay: 2s; stroke: rgba(31, 58, 95, 0.44); }

.tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.tool-card {
    --tool-accent: var(--accent-rust);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.7fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    min-height: 430px;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border-color: color-mix(in srgb, var(--tool-accent) 24%, var(--paper-shadow));
    border-radius: 28px;
    color: var(--ink-umber);
    text-decoration: none;
    background: linear-gradient(135deg, rgba(245, 239, 225, 0.80), rgba(232, 220, 196, 0.50));
    box-shadow: inset 0 1px 0 rgba(255, 249, 238, 0.78), 0 22px 58px rgba(58, 46, 34, 0.09);
    transition: transform var(--dur-med) var(--ease-standard), box-shadow var(--dur-med) var(--ease-standard), border-color var(--dur-med) var(--ease-standard);
}

.tool-card--outbreak {
    --tool-accent: var(--accent-ink);
}

.tool-card::before {
    display: none;
}

.tool-card__content,
.tool-viz {
    position: relative;
    z-index: 1;
}

.tool-card:hover,
.tool-card:focus-visible {
    color: var(--ink-umber);
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--tool-accent) 48%, var(--paper-shadow));
    box-shadow: inset 0 1px 0 rgba(255, 249, 238, 0.88), 0 32px 84px rgba(58, 46, 34, 0.14);
}

.tool-card:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--tool-accent) 68%, var(--ink-umber));
    outline-offset: 6px;
}

.tool-index {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: 0 0 var(--sp-4);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: color-mix(in srgb, var(--tool-accent) 68%, var(--ink-walnut));
}

.tool-index span {
    color: var(--ink-mist);
}

.tool-card h2 {
    max-width: 13ch;
    margin: 0;
    font-size: clamp(1.5rem, 2.7vw, 2.85rem);
    font-weight: 500;
    line-height: 0.98;
}

.tool-blurb {
    max-width: 62ch;
    margin: var(--sp-5) 0 0;
    color: var(--ink-walnut);
    font-size: clamp(1rem, 1.15vw, 1.12rem);
    line-height: var(--leading-body);
}

.tool-detail {
    max-width: 46ch;
    margin: var(--sp-5) 0 0;
    color: var(--ink-mist);
    font-size: var(--text-sm);
    line-height: var(--leading-body);
}

.tool-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    width: fit-content;
    margin-top: var(--sp-5);
    color: color-mix(in srgb, var(--tool-accent) 74%, var(--ink-umber));
    font-weight: 600;
    transition: gap var(--dur-fast) var(--ease-standard), color var(--dur-med) var(--ease-standard);
}

.tool-card:hover .tool-cta { gap: var(--sp-3); }

.tool-viz {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-height: 300px;
    border: 1px solid color-mix(in srgb, var(--tool-accent) 22%, var(--paper-shadow));
    border-radius: 22px;
    background: rgba(245, 239, 225, 0.30);
    box-shadow: inset 0 0 0 1px rgba(255, 249, 238, 0.46);
}

.tool-viz svg {
    width: 100%;
    max-width: 440px;
    height: auto;
}

.tool-viz__axis,
.tool-viz__curve,
.tool-viz__route {
    fill: none;
    stroke-linecap: round;
}

.tool-viz__axis {
    stroke: rgba(58, 46, 34, 0.22);
    stroke-width: 1.2;
}

.tool-viz__band {
    fill: rgba(107, 142, 78, 0.12);
}

.tool-viz--immunity {
    overflow: hidden;
    background:
        radial-gradient(circle at 34% 48%, rgba(107, 142, 78, 0.10), transparent 9.5rem),
        radial-gradient(circle at 78% 34%, rgba(31, 58, 95, 0.07), transparent 8rem),
        linear-gradient(180deg, rgba(255, 249, 238, 0.48), rgba(232, 220, 196, 0.24));
}

.tool-viz--immunity svg {
    max-width: 470px;
}

.immunity-system {
    transform-origin: 150px 110px;
    animation: fmd-system-drift 14s var(--ease-standard) infinite;
}

.immunity-system__halo,
.immunity-system__boundary,
.immunity-system__core {
    transform-origin: 150px 110px;
}

.immunity-system__halo {
    fill: none;
    stroke: rgba(107, 85, 60, 0.14);
    stroke-dasharray: 2 9;
    stroke-linecap: round;
    stroke-width: 1;
    animation: fmd-system-orbit 24s linear infinite;
}

.immunity-system__boundary {
    fill: rgba(245, 239, 225, 0.20);
    stroke: rgba(31, 58, 95, 0.20);
    stroke-width: 1.2;
}

.immunity-system__core {
    fill: url(#populationCoreGradient);
    stroke: rgba(255, 249, 238, 0.44);
    stroke-width: 1;
}

.immunity-links path {
    fill: none;
    stroke: rgba(58, 46, 34, 0.10);
    stroke-linecap: round;
    stroke-width: 1;
    stroke-dasharray: 6 10;
    animation: fmd-link-flow 9s linear infinite;
}

.immunity-vaccine-waves circle {
    fill: rgba(201, 154, 74, 0.08);
    stroke: rgba(201, 154, 74, 0.36);
    stroke-width: 1.1;
    transform-box: fill-box;
    transform-origin: center;
    animation: fmd-vaccine-wave 6.2s var(--ease-standard) infinite;
}

.immunity-vaccine-waves circle:nth-child(2) {
    animation-delay: 2.6s;
}

.particle {
    stroke: rgba(255, 249, 238, 0.72);
    stroke-width: 0.75;
    transform-box: fill-box;
    transform-origin: center;
    animation: fmd-particle-ambient 8s var(--ease-standard) infinite;
}

.particle:nth-child(3n) { animation-delay: 0.8s; }
.particle:nth-child(4n) { animation-delay: 1.7s; }
.particle:nth-child(5n) { animation-delay: 2.4s; }
.particle:nth-child(7n) { animation-delay: 3.2s; }

.particle--susceptible {
    fill: rgba(31, 58, 95, 0.58);
    animation-name: fmd-susceptible-cycle;
}

.particle--vaccinated {
    fill: rgba(201, 154, 74, 0.68);
    animation-name: fmd-vaccinated-cycle;
}

.particle--immune {
    fill: rgba(107, 142, 78, 0.74);
    animation-name: fmd-immune-cycle;
}

.particle--infected {
    fill: rgba(181, 83, 60, 0.78);
    animation-name: fmd-infected-cycle;
}

.particle--waning {
    fill: rgba(107, 142, 78, 0.52);
    animation-name: fmd-waning-cycle;
}

.infection-cluster circle {
    fill: rgba(181, 83, 60, 0.06);
    stroke: rgba(181, 83, 60, 0.22);
    stroke-width: 1;
    transform-origin: 154px 126px;
    animation: fmd-infection-spread 7.2s var(--ease-standard) infinite;
}

.infection-cluster circle:nth-child(2) {
    animation-delay: 1.8s;
}

.mini-projection__grid,
.mini-projection__axis,
.mini-projection__curve,
.mini-projection__waning {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-projection__grid {
    stroke: rgba(58, 46, 34, 0.08);
    stroke-width: 1;
}

.mini-projection__axis {
    stroke: rgba(58, 46, 34, 0.20);
    stroke-width: 1.1;
}

.mini-projection__band {
    fill: rgba(107, 142, 78, 0.14);
    animation: fmd-mini-band 8s var(--ease-standard) infinite;
}

.mini-projection__curve {
    stroke: url(#miniProjectionGradient);
    stroke-width: 2.4;
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    animation: fmd-mini-draw 4.2s var(--ease-standard) forwards, fmd-mini-breathe 7s var(--ease-standard) 4.2s infinite;
}

.mini-projection__waning {
    stroke: rgba(31, 58, 95, 0.42);
    stroke-dasharray: 5 7;
    stroke-width: 1.4;
    animation: fmd-mini-waning 8s linear infinite;
}

.mini-projection__pulse {
    fill: var(--paper-cream);
    stroke: rgba(201, 154, 74, 0.68);
    stroke-width: 1.4;
    transform-box: fill-box;
    transform-origin: center;
    animation: fmd-mini-pulse 5.6s var(--ease-standard) infinite;
}

.mini-projection__pulse:nth-of-type(2) {
    animation-delay: 2s;
}

.tool-viz__curve {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: fmd-draw 4.2s var(--ease-standard) infinite;
}

.tool-viz__curve--primary {
    stroke: rgba(181, 83, 60, 0.80);
    stroke-width: 3.5;
}

.tool-viz__curve--secondary {
    stroke: rgba(107, 142, 78, 0.56);
    stroke-width: 2;
    animation-delay: 0.4s;
}

.tool-viz__point,
.tool-viz__node {
    fill: var(--paper-cream);
    stroke: color-mix(in srgb, var(--tool-accent) 70%, var(--ink-walnut));
    stroke-width: 2;
    animation: fmd-node-pulse 4.8s var(--ease-standard) infinite;
}

.tool-viz__territory {
    fill: rgba(31, 58, 95, 0.07);
    stroke: rgba(31, 58, 95, 0.26);
    stroke-width: 1.4;
}

.tool-viz--outbreak {
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 42%, rgba(181, 83, 60, 0.08), transparent 8rem),
        radial-gradient(circle at 72% 58%, rgba(31, 58, 95, 0.08), transparent 9rem),
        linear-gradient(180deg, rgba(255, 249, 238, 0.42), rgba(232, 220, 196, 0.24));
}

.outbreak-territory {
    fill: rgba(31, 58, 95, 0.055);
    stroke: rgba(31, 58, 95, 0.24);
    stroke-width: 1.25;
}

.outbreak-region-line {
    fill: none;
    stroke: rgba(58, 46, 34, 0.09);
    stroke-width: 1;
}

.outbreak-route {
    fill: none;
    stroke-linecap: round;
    stroke-width: 1.55;
}

.outbreak-route--active {
    stroke: rgba(181, 83, 60, 0.48);
    stroke-dasharray: 7 9;
    animation: fmd-outbreak-route 6s linear infinite, fmd-outbreak-route-live 10s var(--ease-standard) infinite;
}

.outbreak-route--delay-1 { animation-delay: 1.2s, 1.2s; }
.outbreak-route--delay-2 { animation-delay: 2.2s, 2.2s; }
.outbreak-route--delay-3 { animation-delay: 3s, 3s; }

.outbreak-route--muted {
    stroke: rgba(31, 58, 95, 0.24);
    stroke-dasharray: 4 8;
    animation: fmd-outbreak-route 8.5s linear infinite;
}

.outbreak-route--protected {
    stroke: rgba(107, 142, 78, 0.42);
    stroke-dasharray: 2 8;
    animation: fmd-outbreak-contained-route 8s var(--ease-standard) infinite;
}

.outbreak-flow__dot {
    fill: rgba(181, 83, 60, 0.58);
    opacity: 0.72;
    offset-path: path("M96 116 C132 92 158 88 194 98 C224 94 238 118 264 130 C292 124 314 136 336 154");
    animation: fmd-outbreak-flow 8s var(--ease-standard) infinite;
}

.outbreak-flow__dot--delay-1 {
    fill: rgba(31, 58, 95, 0.44);
    animation-delay: 2.4s;
}

.outbreak-flow__dot--delay-2 {
    fill: rgba(181, 83, 60, 0.42);
    animation-delay: 4.5s;
}

.outbreak-node {
    transform-box: fill-box;
    transform-origin: center;
}

.outbreak-node__wave {
    fill: url(#outbreakSeedGradient);
    stroke: rgba(181, 83, 60, 0.22);
    stroke-width: 1;
    animation: fmd-outbreak-wave 5.8s var(--ease-standard) infinite;
}

.outbreak-node__core {
    fill: var(--paper-cream);
    stroke-width: 2;
}

.outbreak-node--seed .outbreak-node__core {
    fill: rgba(181, 83, 60, 0.24);
    stroke: rgba(181, 83, 60, 0.76);
    animation: fmd-seed-pulse 4.8s var(--ease-standard) infinite;
}

.outbreak-node--infected .outbreak-node__core {
    fill: rgba(181, 83, 60, 0.16);
    stroke: rgba(181, 83, 60, 0.62);
    animation: fmd-infected-node 8.8s var(--ease-standard) infinite;
}

.outbreak-node--stage-1 .outbreak-node__core,
.outbreak-node--stage-1 .outbreak-node__wave {
    animation-delay: 1.4s;
}

.outbreak-node--stage-2 .outbreak-node__core,
.outbreak-node--stage-2 .outbreak-node__wave {
    animation-delay: 2.8s;
}

.outbreak-node--stage-3 .outbreak-node__core,
.outbreak-node--stage-3 .outbreak-node__wave {
    animation-delay: 4.2s;
}

.outbreak-node--neutral {
    fill: var(--paper-cream);
    stroke: rgba(31, 58, 95, 0.42);
    stroke-width: 1.8;
    animation: fmd-neutral-node 9s var(--ease-standard) infinite;
}

.outbreak-node--protected {
    fill: rgba(107, 142, 78, 0.18);
    stroke: rgba(107, 142, 78, 0.64);
    stroke-width: 2;
    animation: fmd-protected-node 7s var(--ease-standard) infinite;
}

.tool-viz__route {
    stroke: rgba(31, 58, 95, 0.62);
    stroke-width: 2.4;
    stroke-dasharray: 12 12;
    animation: fmd-route 5.4s linear infinite;
}

.tool-viz__route--secondary {
    stroke: rgba(181, 83, 60, 0.46);
    animation-duration: 6.8s;
}

.tool-viz__node--seed {
    fill: rgba(181, 83, 60, 0.24);
}

.fmd-virion-figure {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    margin: 0 0 clamp(2rem, 5vw, 4rem);
    padding: clamp(1.5rem, 4vw, 3.25rem);
    overflow: hidden;
    border: 1px solid rgba(107, 85, 60, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at 24% 42%, rgba(107, 142, 78, 0.12), transparent 18rem),
        linear-gradient(135deg, rgba(245, 239, 225, 0.78), rgba(232, 220, 196, 0.40));
    box-shadow: inset 0 1px 0 rgba(255, 249, 238, 0.78), 0 22px 62px rgba(58, 46, 34, 0.08);
}

.fmd-virion-figure::before {
    content: "";
    position: absolute;
    inset: 12% auto auto 8%;
    width: 34%;
    aspect-ratio: 1;
    border: 1px dashed rgba(31, 58, 95, 0.16);
    border-radius: 50%;
}

.fmd-virion-figure__image {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 320px;
    border: 1px solid rgba(107, 85, 60, 0.14);
    border-radius: 22px;
    background:
        radial-gradient(circle, rgba(245, 239, 225, 0.82), rgba(232, 220, 196, 0.22) 68%),
        linear-gradient(140deg, rgba(255, 249, 238, 0.36), transparent 58%);
    box-shadow: inset 0 0 40px rgba(245, 239, 225, 0.42);
}

.fmd-virion-figure img {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 26px rgba(58, 46, 34, 0.12));
}

.fmd-virion-figure figcaption {
    position: relative;
    z-index: 1;
    max-width: 60ch;
    margin: 0;
    color: var(--ink-walnut);
    font-size: clamp(1rem, 1.18vw, 1.12rem);
    line-height: var(--leading-body);
}

.fmd-virion-figure figcaption strong {
    display: block;
    max-width: 16ch;
    margin: var(--sp-2) 0 var(--sp-4);
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.2vw, 3rem);
    font-weight: 500;
    line-height: 1.02;
    color: var(--ink-umber);
}

.fmd-virion-figure figcaption em {
    color: var(--accent-rust);
    font-style: italic;
    font-weight: 500;
}

.fmd-attrib {
    display: block;
    margin-top: var(--sp-4);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--ink-mist);
}

.fmd-attrib a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.fmd-aside {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: clamp(1rem, 4vw, 4rem);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid rgba(107, 85, 60, 0.18);
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(245, 239, 225, 0.66), rgba(232, 220, 196, 0.32)),
        rgba(245, 239, 225, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 249, 238, 0.72);
    color: var(--ink-walnut);
}

.fmd-aside h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 2.2rem);
    font-weight: 500;
    line-height: 1.08;
}

.fmd-aside p {
    margin: 0;
    line-height: 1.75;
}

.fmd-aside p:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.fmd-aside a {
    color: var(--ink-umber);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-rust) 48%, var(--paper-shadow));
    transition: color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}

.fmd-aside a:hover,
.fmd-aside a:focus-visible {
    color: var(--accent-rust-deep);
    border-color: var(--accent-rust-deep);
}

.fmd-aside a:focus-visible {
    outline: 2px solid var(--accent-rust);
    outline-offset: 4px;
}

@keyframes fmd-draw {
    0% { stroke-dashoffset: 620; }
    48%, 100% { stroke-dashoffset: 0; }
}

@keyframes fmd-curve-breathe {
    0%, 100% { opacity: 0.68; }
    50% { opacity: 1; }
}

@keyframes fmd-node-pulse {
    0%, 100% { transform: scale(1); opacity: 0.72; }
    50% { transform: scale(1.18); opacity: 1; }
}

@keyframes fmd-route {
    to { stroke-dashoffset: -48; }
}

@keyframes fmd-system-drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(1.5px, -1px); }
}

@keyframes fmd-system-orbit {
    to { transform: rotate(360deg); }
}

@keyframes fmd-link-flow {
    to { stroke-dashoffset: -64; }
}

@keyframes fmd-vaccine-wave {
    0%, 100% {
        opacity: 0;
        transform: scale(0.72);
    }
    18% {
        opacity: 0.42;
    }
    62% {
        opacity: 0;
        transform: scale(4.4);
    }
}

@keyframes fmd-particle-ambient {
    0%, 100% {
        opacity: 0.72;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.96;
        transform: translate(1px, -1px) scale(1.08);
    }
}

@keyframes fmd-susceptible-cycle {
    0%, 100% {
        fill: rgba(31, 58, 95, 0.58);
        opacity: 0.68;
        transform: translate(0, 0) scale(1);
    }
    34% {
        fill: rgba(201, 154, 74, 0.68);
        opacity: 0.92;
        transform: translate(1px, -1px) scale(1.08);
    }
    68% {
        fill: rgba(107, 142, 78, 0.72);
        opacity: 0.96;
        transform: translate(0, -2px) scale(1.04);
    }
}

@keyframes fmd-vaccinated-cycle {
    0%, 100% {
        fill: rgba(201, 154, 74, 0.68);
        opacity: 0.76;
        transform: scale(1);
    }
    52% {
        fill: rgba(107, 142, 78, 0.76);
        opacity: 1;
        transform: translate(0, -1.5px) scale(1.1);
    }
}

@keyframes fmd-immune-cycle {
    0%, 100% {
        fill: rgba(107, 142, 78, 0.74);
        opacity: 0.88;
        transform: scale(1);
    }
    58% {
        fill: rgba(107, 142, 78, 0.90);
        opacity: 1;
        transform: translate(-1px, 0) scale(1.08);
    }
}

@keyframes fmd-infected-cycle {
    0%, 100% {
        fill: rgba(181, 83, 60, 0.58);
        opacity: 0.42;
        transform: scale(0.86);
    }
    42% {
        fill: rgba(181, 83, 60, 0.82);
        opacity: 0.92;
        transform: scale(1.2);
    }
    72% {
        fill: rgba(107, 142, 78, 0.70);
        opacity: 0.86;
        transform: scale(1);
    }
}

@keyframes fmd-waning-cycle {
    0%, 100% {
        fill: rgba(107, 142, 78, 0.56);
        opacity: 0.78;
        transform: scale(1);
    }
    64% {
        fill: rgba(31, 58, 95, 0.52);
        opacity: 0.64;
        transform: translate(1px, 1px) scale(0.94);
    }
}

@keyframes fmd-infection-spread {
    0%, 100% {
        opacity: 0;
        transform: scale(0.65);
    }
    42% {
        opacity: 0.46;
        transform: scale(1.2);
    }
    78% {
        opacity: 0;
        transform: scale(1.75);
    }
}

@keyframes fmd-mini-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes fmd-mini-breathe {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

@keyframes fmd-mini-band {
    0%, 100% {
        opacity: 0.54;
        transform: translateY(0);
    }
    50% {
        opacity: 0.82;
        transform: translateY(-1px);
    }
}

@keyframes fmd-mini-waning {
    to { stroke-dashoffset: -48; }
}

@keyframes fmd-mini-pulse {
    0%, 100% {
        opacity: 0.68;
        transform: scale(1);
    }
    52% {
        opacity: 1;
        transform: scale(1.45);
    }
}

@keyframes fmd-outbreak-route {
    to { stroke-dashoffset: -48; }
}

@keyframes fmd-outbreak-route-live {
    0%, 100% { opacity: 0.34; }
    45%, 68% { opacity: 0.82; }
}

@keyframes fmd-outbreak-contained-route {
    0%, 100% {
        opacity: 0.48;
        stroke-dashoffset: 0;
    }
    50% {
        opacity: 0.22;
        stroke-dashoffset: -18;
    }
}

@keyframes fmd-outbreak-flow {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }
    12% {
        opacity: 0.72;
    }
    86% {
        opacity: 0.62;
    }
    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

@keyframes fmd-outbreak-wave {
    0%, 100% {
        opacity: 0;
        transform: scale(0.72);
    }
    38% {
        opacity: 0.46;
        transform: scale(1.78);
    }
    70% {
        opacity: 0;
        transform: scale(2.35);
    }
}

@keyframes fmd-seed-pulse {
    0%, 100% {
        opacity: 0.82;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes fmd-infected-node {
    0%, 18%, 100% {
        fill: rgba(245, 239, 225, 0.82);
        stroke: rgba(31, 58, 95, 0.34);
        opacity: 0.72;
        transform: scale(0.96);
    }
    42%, 76% {
        fill: rgba(181, 83, 60, 0.20);
        stroke: rgba(181, 83, 60, 0.68);
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes fmd-neutral-node {
    0%, 100% {
        opacity: 0.72;
        transform: scale(1);
    }
    50% {
        opacity: 0.92;
        transform: scale(1.04);
    }
}

@keyframes fmd-protected-node {
    0%, 100% {
        opacity: 0.80;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@media (max-width: 960px) {
    .fmd-hero,
    .tool-card,
    .fmd-virion-figure,
    .fmd-aside {
        grid-template-columns: 1fr;
    }

    .fmd-hero h1 {
        max-width: 14ch;
    }

    .tool-viz {
        min-height: 260px;
    }
}

@media (max-width: 620px) {
    .fmd-home-page {
        padding-bottom: var(--sp-8);
    }

    .fmd-hero,
    .tool-card,
    .fmd-virion-figure {
        border-radius: 22px;
        padding: var(--sp-4);
    }

    .fmd-hero__viz {
        min-height: 220px;
        border-radius: 18px;
    }

    .fmd-hero__viz svg {
        min-height: 220px;
    }

    .fmd-hero h1 {
        max-width: none;
        font-size: clamp(2rem, 11vw, 2.75rem);
    }

    .fmd-hero__meta span,
    .tool-tags span {
        max-width: 100%;
        line-height: 1.35;
    }

    .tool-card {
        min-height: 0;
    }

    .tool-index {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--sp-1);
    }

    .tool-card h2 {
        max-width: none;
        font-size: clamp(1.8rem, 10vw, 2.6rem);
        line-height: 1.04;
    }

    .tool-viz {
        min-height: 220px;
        border-radius: 18px;
    }

    .tool-viz svg {
        max-height: 260px;
    }

    .fmd-virion-figure__image {
        min-height: 240px;
    }

    .fmd-aside {
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .fmd-hero,
    .tool-card,
    .fmd-virion-figure,
    .fmd-aside {
        padding: var(--sp-3);
    }

    .fmd-hero__viz,
    .tool-viz,
    .fmd-virion-figure__image {
        min-height: 190px;
    }

    .fmd-hero__viz svg {
        min-height: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fmd-hero__curve,
    .fmd-hero__network circle,
    .tool-viz__curve,
    .tool-viz__route,
    .tool-viz__point,
    .tool-viz__node,
    .immunity-system,
    .immunity-system__halo,
    .immunity-links path,
    .immunity-vaccine-waves circle,
    .particle,
    .infection-cluster circle,
    .mini-projection__band,
    .mini-projection__curve,
    .mini-projection__waning,
    .mini-projection__pulse,
    .outbreak-route,
    .outbreak-flow__dot,
    .outbreak-node__wave,
    .outbreak-node__core,
    .outbreak-node--neutral,
    .outbreak-node--protected {
        animation: none;
        stroke-dashoffset: 0;
    }

    .tool-card,
    .tool-cta,
    .fmd-aside a {
        transition: none;
    }
}
