:root {
    color-scheme: light;
    --accent: #193b63;
    --accent-soft: #edf3f8;
    --border: #d9dee7;
    --ink: #20242b;
    --muted: #626b78;
    --panel: #f6f8fb;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #fff;
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
}

.paper-page {
    margin: 0 auto;
    max-width: 68rem;
    padding: 4rem 2rem 2rem;
}

.paper-title {
    color: var(--accent);
    font-size: clamp(2.25rem, 6vw, 4rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0;
    text-align: center;
}

.paper-subtitle {
    color: #20242b;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.25;
    margin: 0.35rem 0 2.25rem;
    text-align: center;
}

h2 {
    color: #282d35;
    font-size: 1.75rem;
    line-height: 1.3;
    margin: 2.5rem 0 1rem;
}

h3 {
    color: #353b45;
    font-size: 1.25rem;
    line-height: 1.35;
    margin: 2rem 0 0.65rem;
}

h4 {
    color: #353b45;
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 1.5rem 0 0.6rem;
}

p {
    margin: 0 0 1.15rem;
}

a {
    color: var(--accent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: #0f7180;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.75rem 0;
}

figure {
    margin: 1.5rem 0 2rem;
}

.image,
.image img {
    display: block;
    width: 100%;
}

.image img {
    height: auto;
}

.hero-figure {
    text-align: center;
}

.hero-figure .image,
.curriculum-figure,
.task-montage {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

figcaption {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 0.65rem;
    text-align: center;
}

.abstract {
    color: #171a1f;
}

.paper-link {
    margin-bottom: 0;
}

.equation {
    color: #343941;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 1.25rem 0 1.75rem;
    text-align: center;
}

.admittance-equation {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.4rem;
    justify-content: center;
}

.admittance-equation span {
    white-space: nowrap;
}

.evolution-stack {
    display: grid;
    gap: 0.9rem;
    margin: 1.25rem 0 2rem;
}

.evolution-equation {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin: 0;
    overflow-x: auto;
    padding: 1rem 1.1rem;
}

.evolution-equation h4 {
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.evolution-equation img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
    width: auto;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    margin: 1.25rem 0 2rem;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

thead th {
    background: var(--panel);
    color: #303640;
    font-weight: 650;
}

.geometry-table th[scope="row"],
.results-table th[scope="row"] {
    color: #343941;
    font-weight: 650;
}

.geometry-table td:nth-child(2),
.results-table td,
.results-table th:not(:first-child) {
    text-align: center;
}

.results-table .ours {
    background: #eef8f5;
}

.task-grid,
.video-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.25rem 0 2rem;
}

.task-grid article {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.1rem;
}

.task-grid h3 {
    margin-top: 0;
}

.task-grid p {
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.video-grid figure {
    margin: 0;
    min-width: 0;
}

.video-grid video {
    background: #111;
    border-radius: 0.4rem;
    display: block;
    height: auto;
    width: 100%;
}

.geom-rollout-grid video {
    aspect-ratio: 1 / 1;
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .paper-page {
        padding: 2rem 1.1rem 1rem;
    }

    .task-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 0.55rem;
    }
}

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