* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --ink: #17202a;
    --muted: #5c6875;
    --line: #e1e6ec;
    --accent: #2f6f73;
    --accent-strong: #214f52;
    --accent-soft: #e8f2f2;
    --code: #101820;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.container {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    text-align: center;
    padding: 82px 0 48px;
}

.hero-inner {
    max-width: 1040px;
}

.venue {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

h1,
h2,
h3 {
    line-height: 1.18;
    color: #0e151b;
}

h1 {
    font-size: clamp(2rem, 4.4vw, 3.7rem);
    font-weight: 800;
    letter-spacing: 0;
    max-width: 1040px;
    margin: 0 auto 24px;
}

h2 {
    font-size: clamp(1.75rem, 2.8vw, 2.45rem);
    font-weight: 760;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 720;
    margin: 30px 0 14px;
}

p {
    margin-bottom: 16px;
}

.authors {
    color: var(--muted);
    margin-bottom: 26px;
    font-size: 1.18rem;
}

.authors p {
    margin-bottom: 4px;
}

.affiliation {
    font-style: italic;
    font-size: 1.04rem;
}

.links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #1f2933;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    color: #fff;
    background: #2d3946;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

section {
    padding: 66px 0;
    border-bottom: 1px solid var(--line);
}

section:nth-child(even) {
    background: var(--surface);
}

.lead,
.section-intro {
    font-size: 1.12rem;
    color: #27323c;
}

.wide-figure {
    margin: 34px 0 10px;
}

.wide-figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

figcaption {
    color: var(--muted);
    font-size: 0.94rem;
    text-align: center;
    margin-top: 12px;
}

.stage-card {
    margin: 30px 0 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.stage-card--anneal {
    border-color: #ecdac6;
    border-left-color: #e08c3b;
}

.stage-card--travel {
    border-color: #ccdfd3;
    border-left-color: #3f8a5f;
}

.stage-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.stage-badge {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
}

.stage-card--anneal .stage-badge {
    background: #e08c3b;
}

.stage-card--travel .stage-badge {
    background: #3f8a5f;
}

.stage-head h3 {
    margin: 0;
    font-size: 1.45rem;
}

.stage-card--anneal .stage-head h3 {
    color: #a9601f;
}

.stage-card--travel .stage-head h3 {
    color: #2f7150;
}

.stage-head > p {
    flex: 1 1 340px;
    margin: 0;
    color: #384653;
    font-size: 1.02rem;
}

.stage-banner {
    margin: 18px 0 0;
    padding: 13px 18px;
    border: 1px solid #ccdfd3;
    border-radius: 8px;
    background: #f4faf6;
    color: #27323c;
    font-size: 1rem;
}

.plus-mark {
    color: #2f7150;
    font-weight: 800;
}

.minus-mark {
    color: #b4472c;
    font-weight: 800;
}

.stage-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 24px;
    margin-top: 20px;
}

.stage-body--travel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.stage-figure {
    min-width: 0;
    margin: 0;
}

.stage-figure img {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.stage-figure--wide {
    margin-top: 26px;
}

.tradeoff {
    padding: 18px;
    border: 1px solid #ecdac6;
    border-radius: 8px;
    background: #fdf8f2;
}

.tradeoff h4,
.cost-box h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
}

.box-label {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.89rem;
    line-height: 1.5;
    text-align: left;
}

.stage-label {
    margin: 18px 0 0;
}

.stage-label + .stage-body {
    margin-top: 14px;
}

.tradeoff ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tradeoff li {
    padding-left: 34px;
    color: #27323c;
    font-size: 0.97rem;
}

.tradeoff li + li {
    margin-top: 10px;
}

.tradeoff li::before {
    display: inline-block;
    width: 34px;
    margin-left: -34px;
    font-weight: 800;
}

.tradeoff li.plus::before {
    content: "(+)";
    color: #2f7150;
}

.tradeoff li.minus::before {
    content: "(\2212)";
    color: #b4472c;
}

.algo-figure {
    display: grid;
    min-width: 0;
    margin: 0;
    padding: 18px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.algo-figure img {
    width: 100%;
    max-width: 420px;
}

.cost-box {
    min-width: 0;
    padding: 18px;
    border: 1px solid #ccdfd3;
    border-radius: 8px;
    background: #f7fbf8;
}

.cost-table {
    min-width: 0;
    font-size: 0.92rem;
}

.cost-table th,
.cost-table td {
    padding: 9px 10px;
}

.cost-table thead {
    background: transparent;
}

.cost-table thead th {
    border-bottom: 1px solid #ccdfd3;
    color: #2f7150;
}

.cost-table th:not(:first-child),
.cost-table td:not(:first-child) {
    text-align: right;
}

.cost-table td {
    border-bottom: 1px solid rgba(204, 223, 211, 0.7);
}

.cost-table tbody tr.ours {
    background: rgba(63, 138, 95, 0.09);
}

.table-label {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.table-wrap + .table-label {
    margin-top: 26px;
}

.table-wrap--narrow table {
    min-width: 420px;
}

table {
    width: 100%;
    min-width: 840px;
    border-collapse: collapse;
    font-size: 0.94rem;
}

th,
td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
    text-align: left;
    font-weight: 700;
}

thead {
    background: var(--accent-soft);
}

thead th {
    color: #15383a;
    font-weight: 800;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr.ours {
    background: #f2f8f8;
}

pre {
    overflow-x: auto;
    background: var(--code);
    color: #edf2f7;
    padding: 22px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.55;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.figure-plain img {
    border-color: transparent;
    box-shadow: none;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 1100px);
    }

    .hero {
        padding: 58px 0 36px;
    }

    section {
        padding: 48px 0;
    }

    .stage-card {
        padding: 16px;
    }

    .stage-body,
    .stage-body--travel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .algo-figure,
    .cost-box {
        padding: 14px;
    }

    .links {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    figcaption {
        text-align: left;
    }
}

/* Qualitatives page */

.qualitative-hero {
    padding: 46px 0 54px;
    text-align: left;
}

.qualitative-hero .hero-inner {
    max-width: 1100px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.back-link:hover {
    color: var(--accent-strong);
}

.qualitative-hero h1 {
    margin: 0 0 26px;
    font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.qualitative-hero .links {
    justify-content: flex-start;
}

.btn.muted-link {
    background: #52606d;
}

.group-heading {
    margin-bottom: 26px;
}

.group-heading h2 {
    margin: 6px 0 0;
}

.group-kicker,
.dataset-eyebrow {
    display: block;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.model-switcher > input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.switcher-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.model-switcher-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.model-switcher-tabs label,
.model-tab-static {
    min-width: 104px;
    padding: 9px 18px;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    transition: color 0.18s ease, background 0.18s ease;
}

.model-switcher-tabs label:hover {
    color: var(--accent-strong);
}

#image-model-infinity:checked ~ .model-switcher-tabs label[for="image-model-infinity"],
#image-model-switti:checked ~ .model-switcher-tabs label[for="image-model-switti"] {
    color: #fff;
    background: var(--accent-strong);
}

.model-tab-static {
    color: #fff;
    background: var(--accent-strong);
    cursor: default;
}

.model-panel {
    display: none;
}

#image-model-infinity:checked ~ .model-panels .model-panel--infinity,
#image-model-switti:checked ~ .model-panels .model-panel--switti {
    display: grid;
    gap: 24px;
}

.dataset-card,
.video-case {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dataset-card-header {
    margin-bottom: 6px;
}

.dataset-card-header h3 {
    margin: 6px 0 0;
    font-size: 1.3rem;
}

.sample-case {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.sample-prompt {
    margin-bottom: 16px;
    color: #1b242d;
    font-family: Georgia, "Times New Roman", "Noto Serif", serif;
    font-size: 1.22rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

.sample-prompt::before {
    content: "\201C";
}

.sample-prompt::after {
    content: "\201D";
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.result-panel {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.result-panel figcaption {
    margin: 0 0 9px;
    color: var(--accent-strong);
    font-size: 0.98rem;
    font-weight: 800;
    text-align: left;
}

.stage-plus {
    display: inline-block;
    margin-right: 5px;
    font-size: 1.45em;
    font-weight: 800;
    line-height: 0;
    vertical-align: -0.06em;
}

.result-panel--condition {
    border-color: #e6d3c0;
}

.result-panel--condition figcaption {
    color: #995d2c;
}

.result-panel--scale {
    border-color: #c5ddd0;
}

.result-panel--scale figcaption {
    color: #34714f;
}

.result-crop {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 5px;
    background: #e9eef0;
}

.result-crop img {
    width: 300%;
    max-width: none;
    height: 100%;
    object-fit: fill;
}

.result-crop--condition img {
    transform: translateX(-33.333333%);
}

.result-crop--scale img {
    transform: translateX(-66.666667%);
}

.video-grid {
    display: grid;
    gap: 24px;
}

.video-case .sample-prompt {
    margin-bottom: 18px;
}

.video-matrix {
    display: grid;
    gap: 16px;
}

.video-method-row {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.video-method-label {
    padding-top: 6px;
    color: var(--accent-strong);
    font-size: 1rem;
    font-weight: 800;
}

.video-method-row--cads .video-method-label {
    color: #995d2c;
}

.video-method-row--ours .video-method-label {
    color: #34714f;
}

.video-thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.video-thumb-grid video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #101820;
    object-fit: cover;
}

.video-method-row--cads video {
    border-color: #e6d3c0;
}

.video-method-row--ours video {
    border-color: #c5ddd0;
}

@media (max-width: 760px) {
    .qualitative-hero {
        padding: 34px 0 40px;
    }

    .back-link {
        margin-bottom: 24px;
    }

    .model-switcher-tabs {
        display: flex;
        width: 100%;
        border-radius: 12px;
    }

    .model-switcher-tabs label,
    .model-tab-static {
        flex: 1;
        min-width: 0;
    }

    .dataset-card,
    .video-case {
        padding: 16px;
    }

    .result-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .result-panel {
        padding: 10px;
    }

    .video-method-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .video-method-label {
        padding-top: 0;
    }

    .video-thumb-grid {
        gap: 7px;
    }
}
