:root {
    color-scheme: light;
    --accent: #598BE7;
    --accent-dark: #3a6abf;
    --text-color: #2b2b2b;
    --text-muted: #666;
    --light-bg: #f5f5f5;
    --border-color: #e5e5e5;
}

/* Widen page beyond Bulma's is-max-desktop (960px) */
.container.is-max-desktop {
    max-width: 1200px !important;
}

/* ===== BASE ===== */
html, body {
    background: #fff;
}

body {
    font-family: 'Noto Sans', 'Inter', sans-serif;
    font-size: 1.05rem;
    color: var(--text-color);
    line-height: 1.75;
}

/* ===== HERO ===== */
.hero {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.hero-body {
    padding: 3.5rem 1.5rem 2.5rem;
}

.publication-title {
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-size: 2.7rem !important;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color) !important;
    margin-bottom: 1.25rem;
}

.publication-authors {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem !important;
    color: #444;
    margin-bottom: 0.25rem;
}

.publication-authors a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.publication-authors a:hover {
    border-bottom-color: var(--accent);
}

.publication-affiliation {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    color: #666;
}

.corresponding-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #aaa;
}

.corresponding-note a {
    color: #999;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.corresponding-note a:hover { color: var(--accent); }

.publication-venue {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.publication-venue a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.publication-venue a:hover { opacity: 0.75; }

.publication-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-block { margin: 0.2rem; }

.external-link {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    background: #fff;
    color: var(--text-color) !important;
    border: 1.5px solid #ccc !important;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.external-link:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(89,139,231,0.15);
}

/* ===== TEASER ===== */
.hero.teaser {
    background-color: #fafafa;
    border-bottom: 1px solid var(--border-color);
    border-top: none;
}

.hero.teaser .hero-body {
    padding: 2.5rem 1.5rem;
}

.teaser-placeholder { min-height: 260px; }

/* Teaser banner pinned to the bottom of the hero header */
.hero-teaser-video {
    display: block;
    width: 100%;
    max-width: 85%;
    height: auto;
    margin: 2.25rem auto 0;
}

.teaser-caption {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.05rem;
    color: #555;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ===== OVERVIEW ===== */
.overview-title {
    margin-bottom: 1.25rem !important;
}

.overview-body { width: 100%; }

.insights {
    margin: 0 0 1rem;
}

.insights-title {
    font-family: 'Google Sans', 'Inter', sans-serif;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(89,139,231,0.3);
}

.insight {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    align-items: start;
}

.insight:last-child { border-bottom: none; }

.insight-num {
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.35;
    line-height: 1;
    padding-top: 2px;
}

.insight-body {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.98rem;
    color: #444;
    line-height: 1.75;
}

.insight-body strong { color: #222; }


/* ===== SECTION DIVIDER ===== */
.section-divider { margin: 0; padding: 0; }
.section-divider hr { margin: 0; background-color: var(--border-color); height: 1px; border: none; }

/* 2D-experiment result panel — frames the testbeds + comparison cards as one unit */
.expt-panel {
    background: #f7f9ff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem 1.5rem;
}
.expt-panel-head {
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.expt-panel-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Keep the 2D-experiments layout fixed and scroll horizontally
   on narrow viewports instead of letting the cards reflow/stack. */
.expt-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.expt-scroll-inner {
    min-width: 1040px;
}
/* Three comparison cards stay side-by-side at every width. */
.expt-scroll-inner .columns {
    display: flex;
    flex-wrap: nowrap;
}
.expt-scroll-inner .columns > .column.is-one-third {
    width: 33.3333%;
    flex: 0 0 33.3333%;
}

/* ===== SECTIONS ===== */
.section { padding: 3.5rem 1.5rem; }

.title {
    font-family: 'Google Sans', 'Inter', sans-serif !important;
    color: var(--text-color) !important;
}

/* ===== ABSTRACT ===== */
.abstract-text p {
    font-size: 1.02rem;
    color: #444;
    max-width: 720px;
}

/* ===== CHALLENGE ===== */
.dilemma-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    background: #ffffff;
    height: 100%;
}

.dataset-thumb {
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
    border-radius: 6px;
}

.dataset-thumb:hover {
    box-shadow: 0 0 0 2px var(--accent);
}


.dilemma-label {
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #111;
    margin: 0;
    text-align: center;
}

.dilemma-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    text-align: center;
}

.dilemma-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.dilemma-tags .tag {
    font-size: 0.9rem;
    height: auto;
    padding: 0.4em 0.75em;
    font-weight: 600;
    /* Match the reference's exact font fallback so the ✓/✗ glyphs
       render identically (no 'Inter' in the chain). */
    font-family: 'Noto Sans', sans-serif;
}

/* Strong BC / Weak BC regime breakdown under each method */
.bc-regime {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.bc-regime-head {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.bc-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.bc-label {
    flex: 0 0 5.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
}
.bc-outcome { color: var(--text-color); }

.dilemma-summary {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.text-pos    { color: #257942; font-weight: 600; }
.text-neg    { color: #cc0f35; font-weight: 600; }
.text-warn   { color: #946c00; font-weight: 600; }
.text-accent { color: var(--accent); font-weight: 600; }

/* Inline prose highlights — "highlighter underline" so the key phrases
   read clearly without the heaviness of a full background fill. */
.hl-key {
    color: #a85d12;
    font-weight: 600;
    background-image: linear-gradient(transparent 76%, rgba(224, 158, 56, 0.34) 76%);
    background-repeat: no-repeat;
}
/* Q-Flow and its contribution — the brand blue, a touch stronger so it
   reads as the resolution rather than another challenge. */
.hl-flow {
    color: var(--accent-dark);
    font-weight: 700;
    background-image: linear-gradient(transparent 72%, rgba(89, 139, 231, 0.26) 72%);
    background-repeat: no-repeat;
}

.dilemma-summary {
    list-style: disc;
    padding-left: 1.1rem;
    margin: 0;
}

.dilemma-summary li {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

.algo-toggle {
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.algo-toggle summary {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.algo-toggle summary::before {
    content: '▶';
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.algo-toggle[open] summary::before {
    transform: rotate(90deg);
}

.dilemma-desc {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.dilemma-figures {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.dilemma-fig-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 340px;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, opacity 0.15s;
}

.fig-dataset-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #999;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: 14px;
}

.dilemma-fig-row img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    flex: 1;
    min-width: 0;
}

.dilemma-fig-row.row-highlight {
    background: #eef3ff;
}

.dilemma-fig-row.row-dim {
    opacity: 0.25;
}

/* ===== METHOD ===== */
.method-intro { font-size: 1.02rem; color: #444; }

.method-block { padding-top: 0.5rem; }

.method-heading {
    font-family: 'Google Sans', 'Inter', sans-serif !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem !important;
}

.method-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.equation-display {
    background: #f4f7ff;
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
    padding: 0.75rem 1.25rem;
    margin: 0.75rem 0 1rem;
    overflow-x: auto;
}

/* ===== FIGURES ===== */
.paper-figure {
    margin: 0;
    width: 100%;
}

.paper-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.paper-figure figcaption {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.82rem;
    color: #777;
    text-align: center;
    margin-top: 0.4rem;
    line-height: 1.5;
    width: 100%;
}

.figure-caption-main {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    line-height: 1.5;
}

.figure-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: center;
}

/* dataset thumbnails at top of challenge section */
.figure-half {
    flex: 1;
    min-width: 0;
    max-width: 200px;
}

/* figure-row without max-width cap — for wide paired figures */
.figure-row .paper-figure:not(.figure-half) {
    flex: 1;
    min-width: 0;
}

/* centered single figure at moderate width */
.figure-centered {
    display: block;
    max-width: 55%;
    margin-left: auto;
    margin-right: auto;
}

/* ===== VIDEO ===== */
.video-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card-title {
    font-family: 'Google Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111;
    text-align: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
    margin: 0;
}

.flow-video {
    width: 100%;
    height: auto;
    display: block;
    flex: 1;
}

/* ===== PLACEHOLDER MEDIA ===== */
.placeholder-media {
    background-color: var(--light-bg);
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #aaa;
    margin: 1.25rem 0;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.placeholder-media small { font-size: 0.8rem; color: #bbb; }

/* ===== RESULTS TABLES ===== */
.rt-wrap {
    overflow-x: auto;
    margin: 1rem 0 0.25rem;
}

.rt {
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    width: 100%;
    min-width: max-content;
}

.rt th, .rt td {
    padding: 5px 8px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

/* Default cell text color (zero-specificity so the colored-cell rules below still win). */
.rt :where(th, td) {
    color: var(--text-color);
}

/* Bold values inherit their cell's color instead of Bulma's <strong> color. */
.rt th strong, .rt td strong, .rt th b, .rt td b {
    color: inherit;
}

.rt thead th {
    background: #f3f4f6;
    font-weight: 600;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
    font-size: 0.85rem;
    vertical-align: middle;
}

.rt thead th.rt-ours-col {
    background: #eef3ff;
}

.rt thead tr.rt-subhead th,
.rt thead tr.rt-subhead td {
    background: #f9fafb;
    font-weight: 400;
    color: #6b7280;
    font-size: 0.78rem;
    border-bottom: 1px solid #e5e7eb;
}

.rt-group {
    text-align: left !important;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #e5e7eb;
    background: #fafafa;
    vertical-align: middle;
}

.rt-type-header {
    font-size: 0.78rem;
    color: #374151;
    font-weight: 700;
    text-align: center !important;
}

.rt-task-type {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.01em;
    text-align: center !important;
    vertical-align: middle !important;
}

.rt-env {
    text-align: left !important;
    white-space: nowrap;
    padding-right: 14px !important;
    color: #374151;
}

.rt thead th sup a,
.rt thead tr:not(.rt-subhead) th sup a {
    color: #9ca3af;
    font-size: 0.62rem;
    text-decoration: none;
    margin-left: 1px;
    font-weight: 400;
}

.rt thead th sup a:hover { color: var(--accent); }

.rt-best {
    background: #f3f3f3;
    color: #1a1a1a;
}

col.rt-col-sep {
    border-left: 1px solid #d1d5db;
}

.rt sub {
    color: #9ca3af;
    font-size: 0.68em;
    font-weight: 400;
}

.rt-ours-col {
    background: #eef3ff;
    color: #1e3a6e;
    font-weight: 600;
    border-left: 1px solid #c5d4f5;
}

.rt-ours-col.rt-best {
    background: #d6e4ff;
    color: #1a3a6b;
}

.rt-avg-row td {
    background: #f9fafb;
    font-weight: 400;
    border-top: 2px solid #d1d5db;
}

.rt-avg-row td:first-child {
    font-weight: 700;
}

.rt-avg-row .rt-ours-col {
    background: #d6e4ff;
    color: #1a3a6b;
}

/* env-name: equivalent of LaTeX \texttt{} */
code.env-name {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.84rem;
    color: #2563a8;
    background: #eef3ff;
    border-radius: 3px;
    padding: 1px 4px;
    white-space: nowrap;
}

.rt-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    color: #9ca3af;
    margin-top: 0.4rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ===== REFERENCES ===== */
.reference-list {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.92rem;
    color: #444;
    line-height: 1.7;
    padding-left: 1.5rem;
}

.reference-list li {
    margin-bottom: 0.85rem;
    padding-left: 0.25rem;
}

.reference-list a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.reference-list a:hover {
    border-bottom-color: var(--accent);
}

.reference-list em {
    color: #555;
}

.ref-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: #eef3ff;
    border-radius: 3px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ===== CITATION ===== */
.bibtex-block {
    font-family: 'Courier New', Consolas, monospace;
    background: #f8f8f8;
    border-left: 4px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 1.5rem;
    font-size: 0.84rem;
    overflow-x: auto;
    line-height: 1.65;
    color: #333;
    white-space: pre;
}

/* ===== FOOTER ===== */
.footer {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--light-bg);
    padding: 1.5rem;
    font-size: 0.85rem;
    color: #aaa;
    border-top: 1px solid var(--border-color);
}

.footer a { color: #888; text-decoration: underline; }

/* ===== CONTENT ===== */
.content {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1rem;
}

.content p { margin-bottom: 0.85rem; }
.content ul { margin-left: 1.5rem; }
.content li { margin-bottom: 0.4rem; }
.content a { color: var(--accent); }
.content strong { color: var(--text-color); }

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .publication-title { font-size: 1.6rem !important; }
    .publication-authors { font-size: 0.9rem !important; }
    .publication-links { flex-direction: column; align-items: center; }
    .section { padding: 2.5rem 1rem; }
    .results-table { font-size: 0.7rem; }
    .teaser-placeholder { min-height: 160px; }
    .dilemma-cards.columns { display: block; }
    .dilemma-cards .column { padding: 0.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
