/* ==========================================================================
   SynthForensics — NeurIPS 2026 project page
   ========================================================================== */

:root {
    --sidebar: 280px;
    --wrap: 1120px;
    --pad: 56px;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-inout: cubic-bezier(.77, 0, .175, 1);

    --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* Dark (default) */
:root,
[data-theme="dark"] {
    --bg: #0a0a0b;
    --bg-2: #111113;
    --surface: #161619;
    --surface-2: #1d1d21;
    --line: #26262b;
    --line-2: #34343a;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --dim: #86868b;
    --blue: #3584e4;
    --red: #e01b24;
    --red-text: #ff5a5f;
    --code-bg: #0e0e11;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-2: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --line: #e5e5e7;
    --line-2: #d2d2d7;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --dim: #6e6e73;
    --blue: #1a5fb4;
    --red: #c01c28;
    --red-text: #c01c28;
    --code-bg: #f5f5f7;
    --shadow: 0 30px 60px -24px rgba(0, 0, 0, .18);
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .5s ease, color .5s ease;
    overflow-x: hidden;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--red);
    color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ==========================================================================
   Brand (hero title that becomes the sidebar logo)
   ========================================================================== */

.brand {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    transform-origin: 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    will-change: transform;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
    transition: color .45s ease, text-shadow .45s ease;
}

/* docked in the sidebar or the top bar: theme colour, no shadow (switched once, not per frame) */
.brand.is-docked {
    color: var(--text);
    text-shadow: none;
}

.brand .ch {
    display: inline-block;
}

.js-ready .brand {
    display: block;
}

.js-ready .brand-hero-slot,
.js-ready .brand-slot,
.js-ready .brand-slot-mobile {
    visibility: hidden;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: var(--sidebar);
    background: var(--bg);
    border-right: 1px solid var(--line);
    transition: background-color .5s ease, border-color .5s ease;
}

.sidebar-inner {
    height: 100%;
    padding: 40px 32px 28px;
    display: flex;
    flex-direction: column;
}

.brand-slot,
.brand-slot-mobile {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.brand-slot {
    font-size: 27px;
}

.sidebar-tagline {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.sidenav {
    position: relative;
    margin-top: 44px;
    flex-grow: 1;
}

.sidenav ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidenav a {
    display: block;
    padding: 7px 0 7px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dim);
    text-decoration: none;
    transition: color .3s ease, transform .4s var(--ease-out);
}

.sidenav a:hover {
    color: var(--text);
}

.sidenav a.is-active {
    color: var(--text);
    transform: translateX(4px);
}

.sidenav-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 20px;
    border-radius: 2px;
    background: var(--red);
    opacity: 0;
    transition: transform .6s var(--ease-out), height .6s var(--ease-out), opacity .3s ease;
}

.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
    font-weight: 600;
}

.sidebar-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--muted);
    transition: color .25s ease;
}

.sidebar-links .is-soon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--dim);
}

.sidebar-links .is-soon small {
    margin-left: 2px;
    padding: 1px 6px;
    font-size: 9px;
}

.sidebar-links .btn-emoji {
    font-size: 14px;
}

.sidebar-links .btn-ico {
    width: 14px;
    height: 14px;
}

.sidebar-links a:hover {
    color: var(--text);
}

.theme-toggle {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    transition: border-color .25s ease, color .25s ease;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--text);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

[data-theme="dark"] .i-sun,
[data-theme="light"] .i-moon {
    display: none;
}

/* ==========================================================================
   Mobile top bar
   ========================================================================== */

.topbar {
    display: none;
}

.mobile-menu {
    display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    z-index: 2;
}

.hero-stage {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #000;
    isolation: isolate;
}

.wall {
    position: absolute;
    width: max(100vw, 177.78vh);
    aspect-ratio: 16 / 9;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.js-ready .wall {
    transform: none;
}

.wall-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wall-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(5, 1fr);
}

.cell {
    position: relative;
}

/* while zooming, everything but the target tile is dimmed: one layer whose opacity is animated
   (the target tile at row 2, column 5 of the 10 x 5 wall is left open) */
.wall-dim {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

.wall-dim i {
    position: absolute;
    background: #000;
}

.wall-dim i:nth-child(1) { left: 0; top: 0; width: 100%; height: 40%; }
.wall-dim i:nth-child(2) { left: 0; top: 60%; width: 100%; height: 40%; }
.wall-dim i:nth-child(3) { left: 0; top: 39.9%; width: 50%; height: 20.2%; }
.wall-dim i:nth-child(4) { left: 60%; top: 39.9%; width: 40%; height: 20.2%; }

.cell .cover {
    position: absolute;
    inset: 0;
    background: #000;
}

.cell::after {
    --c: #fff;
    content: "";
    position: absolute;
    inset: 8%;
    opacity: 0;
    transition: opacity .25s ease, inset .35s var(--ease-out);
    background:
        linear-gradient(var(--c), var(--c)) top left / 14% 2px no-repeat,
        linear-gradient(var(--c), var(--c)) top left / 2px 12% no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 14% 2px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 2px 12% no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 14% 2px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 2px 12% no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 14% 2px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 2px 12% no-repeat;
    pointer-events: none;
}

.cell-label {
    position: absolute;
    left: 10%;
    bottom: 10%;
    padding: 3px 7px;
    border-radius: 3px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .35s var(--ease-out);
    pointer-events: none;
}

@media (hover: hover) {
    .wall:not(.is-zooming) .cell:hover::after {
        opacity: 1;
        inset: 11%;
    }

    .wall:not(.is-zooming) .cell:hover .cell-label {
        opacity: 1;
        transform: none;
    }
}

.cell.is-locked::after {
    --c: var(--red);
    opacity: 1;
    inset: 6%;
}

.cell.is-locked .cell-label {
    opacity: 1;
    transform: none;
    top: 10%;
    bottom: auto;
    font-size: 4px;
    padding: 1px 3px;
    border-radius: 1px;
}

.hero-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 50% 48%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .25) 60%, rgba(0, 0, 0, .55) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .7) 100%);
}

.hero-copy {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    pointer-events: none;
    color: #fff;
}

.hero-venue {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 8px 16px 8px 14px;
    border-radius: 999px;
    background: rgba(192, 28, 40, .9);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.hero-venue .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        opacity: .35;
        transform: scale(.7);
    }
}

.hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 11.5vw, 164px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.brand-hero-slot {
    display: inline-block;
    line-height: 1;
}

.hero-sub {
    margin: 26px 0 0;
    font-family: var(--font-display);
    font-size: clamp(18px, 2.1vw, 28px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
}

.hero-cta {
    margin-top: 40px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 26px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .35s var(--ease-out), background-color .25s ease, color .25s ease, border-color .25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* the code repository is not public yet: shown, but not a link */
.is-soon {
    cursor: default;
}

.is-soon small {
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: .85;
}

.btn.is-soon {
    opacity: .62;
}

.btn.is-soon:hover {
    transform: none;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .45);
}

.brandlink.is-soon {
    opacity: .5;
}

.btn:has(.btn-emoji, .btn-ico) {
    gap: 10px;
    padding-left: 20px;
}

.btn-emoji {
    font-size: 20px;
    line-height: 1;
}

.btn-ico {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-light {
    background: #fff;
    color: #111;
}

.btn-light:hover {
    background: var(--blue);
    color: #fff;
}

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, .24);
    border-color: #fff;
}

.hero-reveal {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 9vh;
    z-index: 4;
    text-align: center;
    color: #fff;
    padding: 0 32px;
    pointer-events: none;
}

@media (min-width: 1024px) {
    .hero-reveal {
        left: var(--sidebar);
    }
}

.reveal-big {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(38px, 5.6vw, 92px);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

.reveal-big span {
    display: inline-block;
}

.reveal-small {
    margin: 22px auto 0;
    max-width: 560px;
    font-size: 17px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .82);
    text-shadow: 0 2px 16px rgba(0, 0, 0, .6);
}

.js-ready .reveal-big span,
.js-ready .reveal-small {
    opacity: 0;
    visibility: hidden;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
    animation: cueIn 1s ease 1.6s backwards;
}

@keyframes cueIn {
    from {
        opacity: 0;
    }
}

.scroll-cue span {
    position: relative;
    width: 1px;
    height: 44px;
    overflow: hidden;
    background: rgba(255, 255, 255, .2);
}

.scroll-cue span::after {
    content: "";
    position: absolute;
    left: 0;
    top: -50%;
    width: 1px;
    height: 50%;
    background: #fff;
    animation: cue 1.8s var(--ease-inout) infinite;
}

@keyframes cue {
    0% {
        top: -50%;
    }

    100% {
        top: 100%;
    }
}

/* ==========================================================================
   Content
   ========================================================================== */

.content {
    position: relative;
    z-index: 1;
    margin-left: var(--sidebar);
    background: var(--bg);
    transition: background-color .5s ease;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.block {
    padding: 150px 0;
}

.block-alt {
    background: var(--bg-2);
    transition: background-color .5s ease;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 28px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    max-width: 18ch;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(40px, 5.2vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.section-title .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .08em;
    margin-bottom: -.08em;
}

.section-title .w>span {
    display: inline-block;
}

.lead {
    margin: 28px 0 0;
    max-width: 640px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--muted);
    text-wrap: pretty;
}

/* ---------- Abstract ---------- */

.paper-title {
    margin: 0;
    max-width: 22ch;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(30px, 3.4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.authors {
    margin: 32px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: 17px;
    font-weight: 500;
}

.authors-break {
    flex-basis: 100%;
    height: 0;
}

.authors sup,
.affil sup {
    font-size: .65em;
    color: var(--muted);
    margin-left: 1px;
}

.affil {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.abstract-text {
    margin: 72px 0 0;
    font-size: clamp(20px, 1.85vw, 26px);
    line-height: 1.5;
    letter-spacing: -0.012em;
    font-weight: 500;
    text-wrap: pretty;
}

/* justified like the paper on wide screens only; narrow columns stay ragged */
@media (min-width: 1024px) {
    .abstract-text {
        text-align: justify;
        -webkit-hyphens: auto;
        hyphens: auto;
        hyphenate-limit-chars: 8 4 4;
    }
}

.abstract-text .word {
    transition: color .2s ease;
}

.js-ready .abstract-text .word {
    opacity: .16;
}

.abstract-text strong {
    font-weight: 700;
}

.stats {
    margin-top: 96px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.stat {
    padding: 30px 24px 34px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat:nth-child(3n+2),
.stat:nth-child(3n) {
    padding-left: 28px;
    border-left: 1px solid var(--line);
}

.stat-num {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(40px, 4.6vw, 66px);
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Updates ---------- */

.updates {
    padding: 0 0 150px;
}

.upd-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 64px;
    padding: 56px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        radial-gradient(110% 130% at 0% 0%, color-mix(in srgb, var(--red) 16%, transparent), transparent 55%),
        var(--surface);
    box-shadow: var(--shadow);
}

.upd-now .section-title {
    font-size: clamp(36px, 4vw, 56px);
}

.upd-live {
    margin-top: 32px;
    padding: 26px 28px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--red) 55%, transparent);
    background: color-mix(in srgb, var(--red) 7%, transparent);
}

.upd-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red-text);
}

.upd-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent);
    animation: pulse 2s ease-in-out infinite;
}

.upd-live h3 {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.upd-live p {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--muted);
}

.upd-chips {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upd-chips li {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}

.upd-log {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* the timeline rail */
.upd-log::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--line-2);
}

.upd-log li {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 4px 20px;
    padding-left: 30px;
}

.upd-log li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--red-text);
}

.upd-log time {
    font-size: 15px;
    font-weight: 600;
    color: var(--red-text);
}

.upd-log b {
    display: block;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.upd-log span {
    display: block;
    margin-top: 4px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
}

.upd-log a {
    color: var(--text);
    text-underline-offset: 3px;
}

@media (max-width: 1279px) {
    .upd-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        padding: 36px 28px;
    }
}

@media (max-width: 560px) {
    .upd-panel {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .upd-live {
        padding: 22px 20px;
    }

    .upd-live h3 {
        font-size: 26px;
    }

    .upd-log li {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Shared: segmented control, tags ---------- */

.seg {
    position: relative;
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.seg button {
    position: relative;
    z-index: 1;
    height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: color .3s ease, background-color .3s ease;
}

.tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}

.tag-real {
    background: var(--blue);
}

.tag-fake {
    background: var(--red);
}

/* ---------- Paired protocol (pinned story) ----------
   Default styles are the final state (real video in the centre, eight twins
   around it); main.js builds the four-step sequence on top of it. */

.protocol {
    position: relative;
    background: var(--bg-2);
    transition: background-color .5s ease;
}

.protocol-pin {
    min-height: 100vh;
    min-height: 100svh;
    box-sizing: border-box;
    padding: 72px 0;
    display: flex;
    align-items: center;
}

.protocol-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 56px;
    align-items: center;
}

.p-text .section-title {
    font-size: clamp(34px, 3.3vw, 50px);
}

.p-steps {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
}

.p-steps li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    opacity: .34;
    transition: opacity .45s ease;
}

.p-steps li.is-active {
    opacity: 1;
}

.p-n {
    flex-shrink: 0;
    padding-top: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--red-text);
}

.p-steps h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.p-steps p {
    margin: 6px 0 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--muted);
}

.p-stage-wrap {
    position: relative;
    min-width: 0;
    height: 540px;
}

.p-stage {
    position: relative;
    width: 640px;
    height: 540px;
    transform-origin: 0 0;
}

.p-card,
.p-real,
.p-caption {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
}

.p-card {
    width: 200px;
    height: 150px;
    background: #000;
    box-shadow: var(--shadow);
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: outline-color .5s ease;
}

.p-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

.p-card::after {
    content: "";
    position: absolute;
    inset: 55% 0 0 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .7));
    pointer-events: none;
}

.p-label {
    position: absolute;
    left: 12px;
    bottom: 9px;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.p-tag {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--red);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.protocol.is-final .p-card {
    outline-color: color-mix(in srgb, var(--red) 75%, transparent);
}

.p-real {
    left: 220px;
    top: 180px;
    width: 200px;
    height: 150px;
    margin: 0;
    background: #000;
    box-shadow: var(--shadow);
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: outline-color .5s ease;
}

.protocol.is-final .p-real {
    outline-color: var(--blue);
}

.p-real img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-real figcaption {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

.p-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 18%;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--blue) 45%, transparent) 85%, #9cc6ff);
    border-bottom: 2px solid #9cc6ff;
    box-shadow: 0 6px 24px color-mix(in srgb, var(--blue) 60%, transparent);
}

.p-caption {
    left: 220px;
    top: 180px;
    width: 200px;
    height: 150px;
    opacity: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.cap-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 350px;
    padding: 18px 20px;
}

.cap-head {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.cap-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cap-row:last-child {
    border-bottom: 0;
}

.cap-row b {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
}

.cap-val {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cap-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}

.cap-val i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--line) 0%, var(--line-2) 50%, var(--line) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.cap-prompt {
    position: absolute;
    inset: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text);
}

.cap-prompt b {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red-text);
}

.p-note {
    position: absolute;
    left: 0;
    right: 0;
    top: 516px;
    margin: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

/* ---------- Pipeline (depth fly-through) ----------
   Base layout: the steps stacked one after another (no JS / reduced motion).
   .z-anim (main.js): the section is pinned and every step is placed on the
   z axis of a perspective scene; the camera travels towards the viewer. */

.pipeline {
    position: relative;
    background: var(--bg);
}

.z-scene {
    display: flex;
    flex-direction: column;
    gap: 140px;
    padding: 150px 0;
}

.z-stage {
    width: min(1000px, calc(100% - 2 * var(--pad)));
    margin: 0 auto;
}

.z-progress {
    display: none;
}

/* ---- animated 3D mode ---- */
.z-anim .pipeline-pin {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}

.z-anim .z-scene {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    perspective: 1000px;
    perspective-origin: 50% 46%;
}

.z-anim .z-stage {
    position: absolute;
    left: 50%;
    top: 47%;
    margin: 0;
    visibility: hidden;
    will-change: transform, opacity, filter;
}

/* lite scene on touch devices (Z_LITE in main.js): the steps are not blurred */
.z-lite .z-stage {
    will-change: transform, opacity;
}

.z-bit {
    display: none;
}

.z-anim .z-bit {
    display: block;
    position: absolute;
    left: 50%;
    top: 47%;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity .3s ease;
}

.z-bit.sq {
    width: var(--s);
    height: var(--s);
    border: 1px solid var(--line-2);
    border-radius: 3px;
}

.z-bit.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
}

.z-bit.img {
    width: var(--img, 150px);
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: opacity .3s ease;
}

.z-bit.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.z-anim .z-progress {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5000;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: opacity .4s ease;
}

.z-progress.is-idle {
    opacity: 0;
    pointer-events: none;
}

.z-progress button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--dim);
    white-space: nowrap;
    transition: color .3s ease, background-color .3s ease;
}

.z-progress button i {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 10px;
}

.z-progress button:hover {
    color: var(--text);
}

.z-progress button.is-on {
    background: var(--text);
    color: var(--bg);
}

.z-progress button.is-done {
    color: var(--muted);
}

/* ---- step typography ---- */
.z-intro {
    text-align: center;
}

.z-kicker {
    margin: 0 0 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--red-text);
}

.z-intro .section-title {
    margin: 0 auto;
    max-width: 15ch;
    font-size: clamp(40px, 5.6vw, 88px);
}

.z-lead {
    margin: 26px auto 0;
    max-width: 520px;
    font-size: 18px;
    color: var(--muted);
}

.z-head {
    text-align: center;
    margin-bottom: 40px;
}

.z-n {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--red-text);
}

.z-head h3 {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 3.5vw, 54px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.z-head p {
    margin: 14px auto 0;
    max-width: 620px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--muted);
}

.z-v {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: 260px;
}

.z-ico {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.z-arrow {
    width: 80px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.z-arrow-s {
    width: 48px;
}

/* in-step animations: elements settle when the step is in focus */
.z-anim .z-stage .z-fields li,
.z-anim .z-stage .z-cats li,
.z-anim .z-stage .z-gen,
.z-anim .z-stage .z-crit li {
    opacity: 0;
    transform: translateY(10px) scale(.9);
    transition: opacity .45s ease calc(var(--i, 0) * 70ms), transform .6s var(--ease-out) calc(var(--i, 0) * 70ms);
}

.z-anim .z-stage.is-active .z-fields li,
.z-anim .z-stage.is-active .z-cats li,
.z-anim .z-stage.is-active .z-gen,
.z-anim .z-stage.is-active .z-crit li {
    opacity: 1;
    transform: none;
}

/* 1 · source */
.z-stack {
    position: relative;
    width: 250px;
    height: 180px;
}

.z-stack img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: transform .9s var(--ease-out);
}

.z-stage.is-active .z-stack img:nth-child(1) {
    transform: translate(-22px, 10px) rotate(-7deg);
}

.z-stage.is-active .z-stack img:nth-child(2) {
    transform: translate(12px, -6px) rotate(4deg);
}

.z-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.z-cap b {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
}

.z-merge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 18px;
}

.z-count {
    font-family: var(--font-display);
    font-size: clamp(56px, 6vw, 96px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}

.z-merge span {
    margin-top: 8px;
    color: var(--muted);
}

/* 2 · captions */
.z-frame {
    position: relative;
    margin: 0;
    width: 320px;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.z-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.z-frame figcaption {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.z-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: -20%;
    height: 20%;
    opacity: 0;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--blue) 45%, transparent) 85%, #9cc6ff);
    border-bottom: 2px solid #9cc6ff;
}

.z-stage.is-active .z-scan {
    opacity: 1;
    animation: z-scan 2.4s cubic-bezier(.45, 0, .55, 1) infinite;
}

@keyframes z-scan {
    to {
        top: 100%;
    }
}

.z-fields {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.z-fields li {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* 3 · validation */
.z-v-valid {
    flex-wrap: nowrap;
    gap: 12px;
    padding-bottom: 70px;
}

.z-doc {
    width: 110px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
}

.z-doc b {
    font-size: 12px;
    color: var(--muted);
}

.z-doc i {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--line-2);
}

.z-doc i:nth-child(odd) {
    width: 70%;
}

.z-gate {
    width: 210px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    transition: border-color .5s ease .3s, box-shadow .5s ease .3s;
}

.z-gate .z-ico {
    width: 22px;
    height: 22px;
    color: var(--blue);
    margin-bottom: 6px;
}

.z-gate b {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
}

.z-gate>span {
    font-size: 13px;
    color: var(--muted);
}

.z-stage.is-active .z-gate {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}

.z-cats {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.z-cats li {
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
}

.z-pass {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 13px;
}

.z-pass svg {
    width: 52px;
    height: 52px;
    padding: 12px;
    border-radius: 50%;
    background: var(--blue);
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.z-loop {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.z-loop svg {
    position: absolute;
    left: 0;
    top: 0;
    overflow: visible;
}

.z-loop-path {
    fill: none;
    stroke: var(--red);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 5 6;
    animation: pl-dash 1s linear infinite;
}

#z-loop-head path {
    fill: var(--red);
}

.z-loop-x circle {
    fill: var(--red);
    stroke: var(--surface);
    stroke-width: 2;
}

.z-loop-x path {
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.z-loop-label {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12.5px;
    color: var(--red-text);
}

.z-loop-label b {
    font-weight: 700;
}

/* the loop appears once the forward flow has settled */
.z-anim .z-stage .z-loop {
    opacity: 0;
    transition: opacity .6s ease .9s;
}

.z-anim .z-stage.is-active .z-loop {
    opacity: 1;
}

@keyframes pl-dash {
    to {
        stroke-dashoffset: -11;
    }
}

/* 4 · synthesis */
.z-v-synth {
    flex-direction: column;
    gap: 22px;
}

.z-prompt {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1.5px solid var(--text);
    font-size: 14px;
    color: var(--muted);
}

.z-prompt b {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--text);
}

.z-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.z-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.z-row-label {
    width: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.z-row-label b {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.04em;
    order: -1;
}

.z-row-label em {
    font-style: normal;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.z-gens {
    display: flex;
    gap: 8px;
}

.z-gen {
    width: 80px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

.z-gen .logo {
    width: 70%;
    height: 48%;
    background: var(--text);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.z-gen-word {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* 5 · quality control: one video goes round the review loop.
   data-phase on .z-v-qc: try1 -> rejected -> fix -> regen -> try2 -> accepted */
.z-v-qc {
    display: grid;
    grid-template-columns: 360px 340px;
    column-gap: 40px;
    row-gap: 18px;
    align-items: center;
    justify-content: center;
}

.qc-video {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: outline-color .4s ease;
}

.qc-video img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

/* an illustrative defect on the face, gone after the regeneration */
.qc-artifact {
    position: absolute;
    left: 38%;
    top: 33%;
    width: 20%;
    height: 22%;
    border-radius: 45%;
    border: 1.5px dashed #ff6b6f;
    -webkit-backdrop-filter: blur(3.5px) contrast(1.15);
    backdrop-filter: blur(3.5px) contrast(1.15);
    opacity: 0;
    transition: opacity .4s ease;
}

.qc-artifact em {
    position: absolute;
    left: 100%;
    top: -4px;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.qc-try {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}

.qc-verdict {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 14px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .78));
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    opacity: 0;
    transition: opacity .35s ease;
}

.qc-verdict span {
    display: none;
}

.qc-v-no b {
    color: #ff6b6f;
}

.qc-v-ok b {
    color: #8fc1ff;
}

.qc-side {
    min-width: 0;
}

.z-qn {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text);
}

.z-qn .z-ico {
    width: 24px;
    height: 24px;
    color: var(--blue);
}

.z-crit {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.z-crit li {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 13px;
    font-weight: 600;
}

.qc-people {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.qc-people li {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .3s ease;
}

.qc-people i {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.qc-mark {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    transform: scale(0);
    transition: transform .35s var(--ease-out);
}

.qc-mark svg {
    display: none;
    width: 100%;
    height: 100%;
    padding: 3px;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qc-people li.is-ok,
.qc-people li.is-no {
    border-color: var(--line-2);
}

.qc-people li.is-ok .qc-mark,
.qc-people li.is-no .qc-mark {
    transform: scale(1);
}

.qc-people li.is-ok .qc-mark {
    background: var(--blue);
}

.qc-people li.is-ok .qc-mark svg:first-child,
.qc-people li.is-no .qc-mark svg:last-child {
    display: block;
}

.qc-people li.is-no {
    border-color: var(--red);
}

.qc-people li.is-no .qc-mark {
    background: var(--red);
}

.qc-fix {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    opacity: .7;
    transition: opacity .4s ease, border-color .4s ease, box-shadow .4s ease;
}

.qc-fix-t {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
}

.qc-prompt {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.qc-params {
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--muted);
}

.qc-fix ins {
    padding: 0 3px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    background: color-mix(in srgb, var(--blue) 24%, transparent);
}

.qc-fix del {
    opacity: .55;
}

.qc-loop {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    transition: color .3s ease;
}

.qc-loop span {
    display: inline-block;
    font-weight: 700;
    color: var(--red-text);
}

/* phases */
[data-phase="try1"] .qc-artifact,
[data-phase="rejected"] .qc-artifact,
[data-phase="fix"] .qc-artifact {
    opacity: 1;
}

[data-phase="rejected"] .qc-verdict,
[data-phase="fix"] .qc-verdict,
[data-phase="accepted"] .qc-verdict {
    opacity: 1;
}

[data-phase="rejected"] .qc-v-no,
[data-phase="fix"] .qc-v-no,
[data-phase="accepted"] .qc-v-ok {
    display: inline;
}

[data-phase="rejected"] .qc-video,
[data-phase="fix"] .qc-video {
    outline-color: var(--red);
}

[data-phase="accepted"] .qc-video {
    outline-color: var(--blue);
}

/* the criterion the rejection was about */
[data-phase="rejected"] .z-crit li:first-child,
[data-phase="fix"] .z-crit li:first-child {
    border-color: var(--red);
    color: var(--red-text);
}

/* before the fix the words are not in the prompt yet and the old values stand */
[data-phase="try1"] .qc-fix ins,
[data-phase="rejected"] .qc-fix ins {
    display: none;
}

[data-phase="try1"] .qc-fix del,
[data-phase="rejected"] .qc-fix del {
    text-decoration: none;
    opacity: 1;
}

[data-phase="fix"] .qc-fix {
    opacity: 1;
    border-color: var(--red);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent);
}

/* typing: a blinking caret while the words go in; nothing shown before the first letter */
.qc-fix ins:empty:not(.is-typing) {
    display: none;
}

.qc-fix ins.is-typing::after {
    content: "";
    display: inline-block;
    width: 1.5px;
    height: 1.05em;
    margin-left: 1px;
    vertical-align: -0.15em;
    background: currentColor;
    animation: qc-caret .6s steps(1) infinite;
}

@keyframes qc-caret {
    50% {
        opacity: 0;
    }
}

[data-phase="regen"] .qc-video img {
    animation: qc-regen 1.1s ease;
}

[data-phase="regen"] .qc-loop {
    color: var(--text);
}

[data-phase="regen"] .qc-loop span {
    animation: qc-spin 1.1s var(--ease-out);
}

@keyframes qc-regen {
    40% {
        filter: blur(12px) brightness(1.7);
        opacity: .35;
    }
}

@keyframes qc-spin {
    to {
        transform: rotate(-360deg);
    }
}

/* 6 · versions */
.z-v-versions {
    gap: 18px;
}

.z-ver {
    margin: 0;
    width: 210px;
    transition: transform 1s var(--ease-out) calc(var(--i) * 70ms);
}

.z-anim .z-stage:not(.is-active) .z-ver {
    transform: translateX(calc((1.5 - var(--i)) * 170px)) rotate(calc((var(--i) - 1.5) * 5deg)) scale(.92);
}

.z-zoom {
    position: relative;
    display: block;
    height: 158px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.z-zoom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.z-ver figcaption {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.z-ver b {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}

.z-ver span {
    font-size: 13px;
    color: var(--muted);
}

/* 7 · dataset */
.z-v-final {
    gap: 44px;
}

.z-mosaic {
    width: 460px;
    height: 260px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.z-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.z-final {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
}

.z-final span {
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

/* same button as the hero ("btn btn-light"); on the light theme it needs an edge */
.z-cta {
    align-self: flex-start;
    margin-top: 8px;
}

[data-theme="light"] .z-cta {
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
}

@media (max-width: 760px) {
    .z-v {
        flex-direction: column;
        gap: 18px;
    }

    .z-head {
        margin-bottom: 24px;
    }

    .z-head p {
        font-size: 14px;
    }

    .z-stack {
        width: 190px;
        height: 130px;
    }

    .z-cap {
        position: static;
        display: block;
        margin-top: 8px;
    }

    .z-frame {
        width: 240px;
        height: 170px;
    }

    .z-arrow {
        transform: rotate(90deg);
        width: 40px;
    }

    .z-fields li {
        padding: 8px 10px;
        font-size: 12px;
    }

    .z-v-valid {
        flex-direction: column;
        gap: 6px;
        padding-bottom: 0;
    }

    .z-v-valid .z-arrow {
        width: 26px;
        height: 14px;
    }

    .z-doc {
        width: 150px;
        padding: 10px 12px;
        gap: 5px;
    }

    .z-cats {
        display: none;
    }

    .z-gate {
        padding: 12px 14px;
    }

    .z-gate .z-ico {
        margin-bottom: 2px;
    }

    .z-pass svg {
        width: 40px;
        height: 40px;
        padding: 9px;
    }

    .z-loop {
        position: static;
        max-width: 240px;
    }

    .z-loop svg {
        display: none;
    }

    .z-loop-label {
        position: static;
        display: block;
        transform: none;
        white-space: normal;
        text-align: center;
        font-size: 12px;
    }

    .z-gate {
        width: 240px;
    }

    .z-gate b {
        font-size: 15px;
    }

    .z-row {
        flex-direction: column;
        gap: 8px;
    }

    .z-row-label {
        width: auto;
        text-align: center;
    }

    .z-gens {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 300px;
    }

    .z-gen {
        width: 66px;
        height: 40px;
    }

    .z-v-qc {
        grid-template-columns: 300px;
        row-gap: 14px;
    }

    .qc-people li {
        width: 38px;
        height: 38px;
    }

    .qc-fix {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .z-v-versions {
        display: grid;
        grid-template-columns: repeat(2, 150px);
    }

    .z-ver {
        width: 150px;
    }

    .z-zoom {
        height: 110px;
    }

    .z-anim .z-stage:not(.is-active) .z-ver {
        transform: scale(.94);
    }

    .z-mosaic {
        width: 300px;
        height: 170px;
    }

    .z-final {
        align-items: center;
        text-align: center;
    }

    .z-cta {
        align-self: center;
    }

    .z-anim .z-progress button span {
        display: none;
    }

    .chart-axis em {
        display: none;
    }

    .z-anim .z-progress button {
        align-items: center;
        justify-content: center;
        min-width: 34px;
        padding: 0 9px;
    }

    /* frames flying past would cross the text on a narrow screen */
    .z-bit.img {
        display: none;
    }

}

/* ---------- Generators ---------- */

.gens {
    margin-top: 96px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 88px;
}

.gen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
    text-decoration: none;
    transition: opacity .45s ease, filter .45s ease;
}

/* Spotlight: hovering one generator dims the others */
@media (hover: hover) {
    .gens:hover .gen:not(:hover) {
        opacity: .28;
        filter: blur(1px);
    }
}

.gen-logo {
    width: 100%;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-logo .logo {
    width: 100%;
    max-width: 210px;
    height: 100%;
    background: var(--text);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transform: scale(var(--s, 1));
    transition: transform .9s var(--ease-out);
}

.wordmark {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--text);
    transition: transform .9s var(--ease-out);
}

.wordmark-2l {
    font-size: clamp(20px, 1.8vw, 26px);
}

.commit {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .35s ease, transform .5s var(--ease-out);
}

.gen:hover .commit,
.gen:focus-visible .commit {
    opacity: 1;
    transform: none;
}

.gen:hover .logo {
    transform: scale(calc(var(--s, 1) * 1.08));
}

.gen:hover .wordmark {
    transform: scale(1.08);
}

.gen-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gen-body h3 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
}

.gen-body p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.modes {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}

.modes i {
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--dim);
}

.modes i+i::before {
    content: "·";
    margin-right: 6px;
}

/* ---------- Realism ---------- */

.realism-nums {
    margin-top: 72px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.realism-nums p {
    margin: 12px 0 0;
    font-size: 16px;
    color: var(--muted);
    max-width: 28ch;
}

.big {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(56px, 6.4vw, 104px);
    line-height: .95;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}

.big-red {
    color: var(--red-text);
}

/* Realism charts: one row each, copy beside a large chart.
   SynthForensics red, real videos blue, everything else a quiet grey. */
.rz {
    --c-other: color-mix(in srgb, var(--text) 36%, var(--surface));
    margin-top: 120px;
    display: flex;
    flex-direction: column;
    gap: 130px;
}

.rz-row {
    display: grid;
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr);
    gap: 64px;
    align-items: center;
}

.rz-flip {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, .72fr);
}

.rz-flip .rz-copy {
    order: 2;
}

.rz-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red-text);
}

.rz-copy h3 {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 2.6vw, 38px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.rz-copy p {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
}

.rz-chart {
    position: relative;
    padding: 34px 30px 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--red) 8%, transparent), transparent 60%),
        var(--surface);
    box-shadow: var(--shadow);
}

.chart-legend {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
    color: var(--muted);
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sw {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.sw-sf { background: var(--red); }
.sw-real { background: var(--blue); }
.sw-other { background: var(--c-other); }

.ln {
    width: 18px;
    border-top: 2px solid var(--c-other);
}

.ln-sf { border-top: 2.5px solid var(--red); }
.ln-ff { border-top-color: var(--blue); }
.ln-dfd { border-top: 2px dashed var(--blue); }

.chart-caption {
    margin: 6px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--dim);
}

/* face quality: horizontal bars */
.fq {
    --fq-name: 124px;
    --fq-end: 44px;
    --fq-gap: 14px;
}

.fq-plot {
    position: relative;
    padding-top: 26px;
}

.fq-guides {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--fq-name) + var(--fq-gap));
    right: calc(var(--fq-end) + var(--fq-gap));
    pointer-events: none;
}

.fq-guides i {
    position: absolute;
    top: 26px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.fq-band {
    position: absolute;
    top: 0;
    bottom: 0;
    transform-origin: left center;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--blue) 22%, transparent), color-mix(in srgb, var(--blue) 9%, transparent));
    border-inline: 1px solid color-mix(in srgb, var(--blue) 60%, transparent);
}

.fq-band em {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text);
}

.fq-row {
    position: relative;
    display: grid;
    grid-template-columns: var(--fq-name) minmax(0, 1fr) var(--fq-end);
    column-gap: var(--fq-gap);
    align-items: center;
    height: 32px;
}

.fq-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: 14px;
    color: var(--muted);
}

.fq-row.is-sf .fq-name {
    color: var(--text);
    font-weight: 600;
}

.fq-track {
    position: relative;
    height: 14px;
}

.fq-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 0 4px 4px 0;
    background: var(--c-other);
    transform-origin: left;
}

.is-sf .fq-bar {
    background: var(--red);
    box-shadow: 0 0 calc(var(--glow, 1) * 22px) color-mix(in srgb, var(--red) 70%, transparent);
}

.is-real .fq-bar {
    background: var(--blue);
}

.fq-val {
    position: absolute;
    top: 50%;
    transform: translate(7px, -50%);
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.is-sf .fq-val {
    color: var(--text);
}

.fq-flag {
    position: absolute;
    top: 50%;
    margin-left: 54px;
    transform: translateY(-50%);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--red) 60%, transparent);
    background: color-mix(in srgb, var(--red) 14%, var(--surface));
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text);
}

.fq-axis {
    position: relative;
    height: 18px;
    margin: 8px calc(var(--fq-end) + var(--fq-gap)) 0 calc(var(--fq-name) + var(--fq-gap));
    font-size: 11px;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

.fq-axis span {
    position: absolute;
    transform: translateX(-50%);
}

/* landmark completeness: lines drawn by a scanner */
.lm {
    position: relative;
}

.lm svg {
    display: block;
    overflow: visible;
}

.lm-grid line {
    stroke: var(--line);
    stroke-width: 1;
}

.lm-tick {
    font-size: 11px;
    fill: var(--dim);
    font-variant-numeric: tabular-nums;
}

.lm-title {
    font-size: 12px;
    fill: var(--dim);
}

.lm-line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke .2s ease, stroke-width .2s ease;
}

.lm-other { stroke: var(--c-other); stroke-width: 1.5; }
.lm-ff { stroke: var(--blue); }
.lm-dfd { stroke: var(--blue); stroke-dasharray: 6 4; stroke-linecap: butt; }
.lm-sf { stroke: var(--red); stroke-width: 3; }

.lm-area { fill: url(#lm-fill); }
.lm-fill-a { stop-color: var(--red); stop-opacity: .14; }
.lm-fill-b { stop-color: var(--red); stop-opacity: 0; }

.lm-head {
    stroke: var(--surface);
    stroke-width: 2;
    transition: opacity .4s ease;
}

.lm-head-other { fill: var(--c-other); }
.lm-head-ff,
.lm-head-dfd { fill: var(--blue); }
.lm-head-sf { fill: var(--red); }

.lm svg.is-empty .lm-head,
.lm svg.is-done .lm-head-other {
    opacity: 0;
}

.lm-scan {
    opacity: 0;
    transition: opacity .3s ease;
}

.lm svg.is-scanning .lm-scan {
    opacity: 1;
}

.lm-scan-line {
    stroke: var(--text);
    stroke-opacity: .35;
    stroke-width: 1;
}

.lm-scan-pill { fill: var(--text); }

.lm-scan-txt {
    fill: var(--bg);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lm-ann {
    opacity: 0;
    transition: opacity .7s ease;
}

.lm svg.is-done .lm-ann {
    opacity: 1;
}

.lm-ann-txt {
    font-size: 12.5px;
    font-weight: 500;
    fill: var(--muted);
}

.lm-ann-txt.is-sf {
    font-weight: 700;
    fill: var(--text);
}

.lm-key { stroke-width: 2.5; }
.lm-key-real { stroke: var(--blue); }
.lm-key-sf { stroke: var(--red); stroke-width: 3; }

.lm-bracket {
    fill: none;
    stroke: var(--line-2);
    stroke-width: 1.5;
}

.lm-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 14;
    pointer-events: stroke;
    cursor: pointer;
}

.lm-s {
    transition: opacity .2s ease;
}

.lm svg.is-hl .lm-s {
    opacity: .2;
}

.lm svg.is-hl .lm-s.is-on {
    opacity: 1;
}

.lm-s.is-on .lm-other {
    stroke: var(--text);
    stroke-width: 2.5;
}

.lm-tag {
    position: absolute;
    z-index: 3;
    transform: translate(12px, -140%);
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
}

.lm-tag.is-on {
    opacity: 1;
}

@media (max-width: 1279px) {
    .rz {
        margin-top: 90px;
        gap: 90px;
    }

    .rz-row,
    .rz-flip {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .rz-flip .rz-copy {
        order: 0;
    }
}

@media (max-width: 560px) {
    .rz-chart {
        padding: 24px 14px 16px;
        border-radius: 18px;
    }

    .fq {
        --fq-name: 100px;
        --fq-end: 38px;
        --fq-gap: 8px;
    }

    .fq-name {
        font-size: 12px;
    }

    .fq-row {
        height: 28px;
    }

    .fq-flag {
        display: none;
    }

    .fq-axis span:nth-child(2n) {
        display: none;
    }
}

/* ---------- Results ---------- */

.results {
    margin-top: 64px;
}

.results-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.seg-pill {
    position: absolute;
    z-index: 0;
    top: 4px;
    left: 0;
    height: 40px;
    border-radius: 999px;
    background: var(--text);
    transition: transform .55s var(--ease-out), width .55s var(--ease-out);
}

.seg button[aria-selected="true"] {
    color: var(--bg);
}

.legend {
    display: flex;
    gap: 22px;
    font-size: 14px;
    color: var(--muted);
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend b {
    font-weight: 500;
}

.legend i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-blue {
    background: var(--blue);
}

.dot-red {
    background: var(--red);
}

.results-body {
    margin-top: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
    align-items: start;
}

.chart-head,
.row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 76px;
    align-items: center;
}

.chart-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
}

.delta-head {
    text-align: right;
}

.chart-rows {
    position: relative;
}

.gridlines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 132px;
    right: 76px;
    pointer-events: none;
}

.gridlines i {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px solid var(--line);
}

.gridlines i.chance {
    border-left: 1px dashed var(--line-2);
}

.row {
    height: 34px;
    position: relative;
}

.row-name {
    font-size: 14px;
    font-weight: 500;
}

.row-plot {
    position: relative;
    height: 100%;
}

.row-bar {
    position: absolute;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    opacity: .6;
    background: linear-gradient(90deg, var(--blue), var(--red));
}

.row-bar.rev {
    background: linear-gradient(90deg, var(--red), var(--blue));
}

.row-dot {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg);
    cursor: default;
}

.block-alt .row-dot {
    box-shadow: 0 0 0 2px var(--bg-2);
}

.row-dot.b {
    background: var(--blue);
}

.row-dot.r {
    background: var(--red);
}

.row-dot:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
}

.row-delta {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.row-group {
    height: 44px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
}

.chart-axis {
    position: relative;
    height: 26px;
    margin: 6px 76px 0 132px;
    font-size: 12px;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

.chart-axis span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.chart-axis em {
    font-style: normal;
}

.results-more {
    margin: 44px 0 0;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
}

.results-more a {
    color: var(--text);
    font-weight: 600;
    text-underline-offset: 3px;
}

.footnote {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--dim);
}

.takeaway {
    position: sticky;
    top: 40px;
    padding: 28px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.tk-big {
    display: block;
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--red-text);
}

.tk-label {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.tk-body {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- Dataset ---------- */

.ds-grid {
    margin-top: 64px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
    gap: 20px;
    align-items: start;
}

.tree {
    padding: 26px 28px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
}

.tree details {
    margin-left: 18px;
}

.tree>details {
    margin-left: 0;
}

.tree summary {
    list-style: none;
    cursor: pointer;
    padding: 5px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree summary::-webkit-details-marker {
    display: none;
}

.tree summary::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform .3s var(--ease-out);
}

.tree details[open]>summary::before {
    transform: rotate(45deg);
}

.leaf {
    margin-left: 18px;
    padding: 4px 0 4px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    border-left: 1px solid var(--line);
}

.leaf b {
    min-width: 0;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.leaf em {
    font-style: normal;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted);
}

.code-card {
    border-radius: 20px;
    background: var(--code-bg);
    border: 1px solid var(--line);
    overflow: hidden;
}

.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 12px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.copy {
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    transition: color .25s ease, border-color .25s ease;
}

.copy:hover,
.copy.is-done {
    color: var(--text);
    border-color: var(--text);
}

.code-card pre {
    margin: 0;
    padding: 22px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
}

.code-card .tk {
    color: var(--blue);
}

.code-card .tn {
    color: var(--red-text);
}

.code-card .tc {
    color: var(--dim);
}

/* ---------- Download ---------- */

/* Logo lockups: the outline of logo and lettering draws itself on reveal;
   on hover the fill empties and a light runs along the contour */
.brandlinks {
    margin: 64px 0 56px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 48px 112px;
}

.brandlink-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.brandlink {
    --hl: #ffd21e;
    display: inline-flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text);
    text-decoration: none;
}

[data-theme="light"] .brandlink {
    --hl: #ff9d0b;
}

.bl-art {
    display: block;
    height: 86px;
    width: auto;
    max-width: 100%;
    overflow: visible;
}

.bl-draw,
.bl-word {
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill-opacity .45s ease;
}

.bl-draw {
    stroke-width: 1.2;
}

.bl-gh {
    --hl: var(--blue);
}

[data-theme="light"] .bl-gh {
    --hl: var(--blue);
}

.bl-gh .bl-draw {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: .22;
}

.bl-gh .bl-trace {
    stroke-width: .5;
}

.bl-word,
.bl-word-trace {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.bl-word {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.1;
}

/* before the reveal (JS only): outlines undrawn, fills hidden */
.js-ready .brandlink .bl-draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    fill-opacity: 0;
}

.js-ready .brandlink .bl-word {
    stroke-dasharray: 720;
    stroke-dashoffset: 720;
    fill-opacity: 0;
}

.js-ready .brandlink .bl-meta,
.js-ready .bl-sub {
    opacity: 0;
    transform: translateY(8px);
}

.js-ready .brandlink.is-drawn .bl-draw,
.js-ready .brandlink.is-drawn .bl-word {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    transition: stroke-dashoffset 1.9s cubic-bezier(.65, 0, .35, 1), fill-opacity .9s ease 1.35s;
}

.js-ready .brandlink.is-drawn .bl-word {
    transition-delay: .25s, 1.55s;
}

.js-ready .brandlink.is-drawn .bl-meta,
.js-ready .is-drawn+.bl-sub {
    opacity: 1;
    transform: none;
    transition: opacity .8s ease 1.6s, transform .8s var(--ease-out) 1.6s;
}

.js-ready .is-drawn+.bl-sub {
    transition-delay: 1.8s;
}

/* once drawn, hover changes respond immediately */
.js-ready .brandlink.is-settled .bl-draw,
.js-ready .brandlink.is-settled .bl-word {
    transition: fill-opacity .45s ease;
}

.js-ready a.brandlink.is-settled:hover .bl-word,
.js-ready a.brandlink.is-settled:focus-visible .bl-word {
    fill-opacity: 0;
}

.js-ready a.brandlink.is-settled:hover .bl-draw,
.js-ready a.brandlink.is-settled:focus-visible .bl-draw {
    fill-opacity: .18;
}

/* running light along the contour */
.bl-trace,
.bl-word-trace {
    fill: none;
    stroke: var(--hl);
    opacity: 0;
    filter: drop-shadow(0 0 3px var(--hl));
    transition: opacity .35s ease;
    pointer-events: none;
}

.bl-trace {
    stroke-width: 2.2;
    stroke-dasharray: .14 .86;
    animation: bl-run-ring 2.4s linear infinite paused;
}

.bl-word-trace {
    stroke-width: 2.2;
    stroke-dasharray: 70 280;
    animation: bl-run-text 2.4s linear infinite paused;
}

@keyframes bl-run-ring {
    to {
        stroke-dashoffset: -1;
    }
}

@keyframes bl-run-text {
    to {
        stroke-dashoffset: -350;
    }
}

a.brandlink:hover .bl-trace,
a.brandlink:hover .bl-word-trace,
a.brandlink:focus-visible .bl-trace,
a.brandlink:focus-visible .bl-word-trace {
    opacity: 1;
    animation-play-state: running;
}

a.brandlink:hover .bl-word,
a.brandlink:focus-visible .bl-word {
    fill-opacity: 0;
}

a.brandlink:hover .bl-draw,
a.brandlink:focus-visible .bl-draw {
    fill-opacity: .18;
}

.bl-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    transition: color .3s ease;
}

a.brandlink:hover .bl-meta {
    color: var(--text);
}

.bl-arrow {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .45s var(--ease-out);
}

a.brandlink:hover .bl-arrow {
    transform: translate(3px, -3px);
}

.bl-sub {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 4px;
    transition: color .3s ease, text-decoration-color .3s ease;
}

.bl-sub:hover {
    color: var(--text);
    text-decoration-color: currentColor;
}

.fine {
    margin: 24px 0 0;
    max-width: 760px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

.fine a {
    color: var(--text);
}

/* ---------- Team ---------- */

.team {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px 20px;
}

.team figure {
    margin: 0;
}

.team img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
    filter: grayscale(1);
    transition: filter .6s ease, transform .8s var(--ease-out);
}

.team figure:hover img {
    filter: none;
    transform: scale(1.02);
}

/* photos that open the member's LinkedIn profile */
.team-link {
    position: relative;
    display: block;
    border-radius: 20px;
}

.team-link:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.team-link:focus-visible img {
    filter: none;
}

.team-in {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .4s var(--ease-out);
}

.team-in svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #0a66c2;
}

.team-link:hover .team-in,
.team-link:focus-visible .team-in {
    opacity: 1;
    transform: none;
}

/* no hover on touch screens: show the badge all the time */
@media (hover: none) {
    .team-in {
        opacity: 1;
        transform: none;
    }
}

.team figcaption {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
}

.team b {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.team span {
    font-size: 14px;
    color: var(--muted);
}

/* ---------- Citation / Footer ---------- */

#citation .code-card {
    margin-top: 48px;
}

.footer {
    padding: 48px var(--pad);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
}

.footer p {
    margin: 0;
}

/* ==========================================================================
   Reveal helpers (set by JS)
   ========================================================================== */

.js-ready [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
    .gens {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 72px;
    }

    .results-body {
        grid-template-columns: 1fr;
    }

    .takeaway {
        position: static;
    }
}

@media (max-width: 1023px) {
    :root {
        --pad: 24px;
    }

    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
    }

    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 60;
        height: 60px;
        padding: 0 16px 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: color-mix(in srgb, var(--bg) 82%, transparent);
        -webkit-backdrop-filter: blur(16px) saturate(1.4);
        backdrop-filter: blur(16px) saturate(1.4);
        border-bottom: 1px solid var(--line);
    }

    .brand-slot-mobile {
        font-size: 22px;
    }

    .menu-btn {
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        cursor: pointer;
    }

    .menu-btn span:not(.sr-only) {
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: var(--text);
        transition: transform .35s var(--ease-out);
    }

    .menu-btn[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-btn[aria-expanded="true"] span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .mobile-menu {
        display: block;
        position: fixed;
        inset: 60px 0 0 0;
        z-index: 59;
        padding: 24px 24px 40px;
        background: var(--bg);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mobile-menu[hidden] {
        display: none;
    }

    .mobile-menu nav {
        display: flex;
        flex-direction: column;
    }

    .mobile-menu a {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        font-family: var(--font-display);
        font-size: 24px;
        font-weight: 600;
        letter-spacing: -0.02em;
        text-decoration: none;
    }

    .block {
        padding: 100px 0;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat:nth-child(n) {
        padding-left: 0;
        border-left: 0;
    }

    .stat:nth-child(2n) {
        padding-left: 20px;
        border-left: 1px solid var(--line);
    }

    .protocol-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .protocol-pin {
        padding: 76px 0 24px;
    }

    /* one step at a time: all four share one cell (as tall as the longest, so nothing below moves)
       and cross-fade, the old one quickly out, the new one in just after */
    .p-steps {
        display: grid;
        margin-top: 16px;
    }

    .p-steps li {
        grid-area: 1 / 1;
        border-top: 0;
        padding: 0;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease;
    }

    .p-steps li.is-active {
        opacity: 1;
        transform: none;
        transition: opacity .4s ease .15s, transform .4s var(--ease-out) .15s;
    }

    .realism-nums,
    .ds-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .bl-art {
        height: 58px;
    }

    .hero-cta {
        gap: 10px;
    }

    .hero-cta .btn {
        height: 46px;
        padding: 0 18px;
        font-size: 15px;
    }

    .hero-cta .btn:has(.btn-emoji, .btn-ico) {
        gap: 8px;
        padding-left: 16px;
    }

    .hero-cta .btn-emoji {
        font-size: 18px;
    }

    .hero-cta .btn-ico {
        width: 18px;
        height: 18px;
    }

    .team {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gens {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
        row-gap: 56px;
    }

    .gen-logo {
        height: 52px;
    }

    .hero-venue {
        font-size: 10.5px;
        letter-spacing: .05em;
        padding: 7px 12px;
    }

    .chart-head,
    .row {
        grid-template-columns: 96px minmax(0, 1fr) 58px;
    }

    .gridlines {
        left: 96px;
        right: 58px;
    }

    .chart-axis {
        margin: 6px 58px 0 96px;
    }

    .row-name {
        font-size: 12px;
    }

    .legend {
        flex-direction: column;
        gap: 6px;
    }
}

/* ==========================================================================
   Reduced motion / no-JS fallbacks
   ========================================================================== */

.static-mode .brand {
    display: none;
}

.static-mode .brand-hero-slot,
.static-mode .brand-slot,
.static-mode .brand-slot-mobile {
    visibility: visible;
}

.static-mode .sidebar,
.static-mode .topbar {
    transform: none;
}

.static-mode .cell .cover {
    display: none;
}

.static-mode .abstract-text .word,
.static-mode [data-reveal],
.static-mode .reveal-big span,
.static-mode .reveal-small {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.static-mode .hero-reveal {
    display: none;
}

@media (max-width: 1023px) and (max-height: 560px) and (orientation: landscape) {
    .protocol-grid {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        gap: 24px;
    }

    .protocol-pin {
        padding: 64px 0 16px;
    }

    .p-text .section-title {
        font-size: 28px;
    }
}

/* short landscape screens: tighter step headers so the pipeline diagrams can stay larger */
@media (max-height: 560px) and (orientation: landscape) {
    .z-bit.img {
        display: none;
    }

    .z-head {
        margin-bottom: 14px;
    }

    .z-head h3 {
        font-size: 26px;
    }

    .z-head p {
        margin-top: 6px;
        font-size: 13px;
    }

    .z-v {
        min-height: 0;
    }

    .z-anim .z-progress {
        bottom: 10px;
    }

    .z-anim .z-stage {
        top: 44%;
    }
}

@media (max-width: 420px) {
    .chart-axis span:nth-child(2n) {
        display: none;
    }

    .seg button {
        padding: 0 11px;
        font-size: 13px;
        white-space: nowrap;
    }
}

.static-mode .p-steps li {
    display: flex;
    grid-area: auto;
    opacity: 1;
    transform: none;
}

/* Touch devices: no backdrop blur. Blurring whatever moves underneath again on every frame is heavy
   for older phones; slightly more opaque fills keep the same look. */
@media (hover: none) {
    .topbar,
    .btn-glass,
    .z-anim .z-progress,
    .qc-try,
    .qc-artifact {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .topbar {
        background: color-mix(in srgb, var(--bg) 95%, transparent);
    }

    .btn-glass {
        background: rgba(255, 255, 255, .18);
    }

    .z-anim .z-progress {
        background: color-mix(in srgb, var(--bg) 94%, transparent);
    }

    .qc-try {
        background: rgba(0, 0, 0, .78);
    }

    /* the defect stays readable as a tinted patch inside its dashed outline */
    .qc-artifact {
        background: rgba(255, 107, 111, .18);
    }
}

@media (prefers-reduced-motion: reduce) {

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