/* Custom styles for REPA-E-T2I project page */
/* Layout provided by ../../../static/css/paper-layout.css */

/* Logo next to the main title */
.central-header .title-section h1 .title-logo {
    height: 1.05em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.32em;
    margin-top: -0.18em;
}

/* Widen the key-point icon box so the landscape illustrations fit without distortion;
   all icons share one box width + left alignment so the bullet text stays aligned. */
.central-header .key-point-icon {
    width: 88px;
    height: 40px;
    object-fit: contain;
    object-position: center;
    margin-top: 0;
}

/* Italic tagline under the main title */
.central-header .title-section .title-subtitle {
    margin: 0.5em 0 0 0;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--text-secondary, #555);
}

/* Override distill grid - use paper-layout content width */
d-article {
    display: block !important;
    max-width: var(--layout-content-width, 1037px);
    margin: 0 auto;
    padding: 0 20px;
}

d-article > * {
    width: 100%;
    max-width: 100%;
}

/* Jump to Sections - Icon Row (Cambrian style) */
.icon-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    padding: 20px;
    line-height: 1rem;
}

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #444;
    padding: 15px;
    margin: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    flex: 1 1 150px;
    min-height: 110px;
    max-width: 180px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.icon-link:hover {
    background-color: #f8f8f8;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.icon-link .icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .icon-link {
        flex: 1 1 45%;
    }
}

/* Click Hint */
.click-hint {
    display: block;
    margin: 20px auto;
    width: 85%;
    font-size: 15px;
    color: #333333;
    border: 2px solid #cccccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.click-hint strong {
    color: #2563eb;
}

.click-hint img {
    vertical-align: middle;
    margin-right: 8px;
}

/* Header Icon Container (like Cambrian) */
.header-content .icon-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.header-content .icon-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.header-content .icon-item img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.header-content .icon-item > div {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.5;
}

.header-content .icon-item strong {
    font-weight: 600;
    color: #2563eb;
}

.header-content p {
    margin: 15px 0;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Responsive design for header icons */
@media (max-width: 768px) {
    .header-content .icon-container {
        gap: 10px;
    }

    .header-content .icon-item img {
        width: 20px;
        height: 20px;
    }
}

/* Teaser Figure - Simple like Cambrian */
#fig-teaser {
    width: 150%;
    margin-left: -20%;
}

#fig-teaser figure {
    width: 100% !important;
    margin: 0 !important;
}

#fig-teaser img {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
}

#fig-teaser figcaption {
    margin-top: 20px;
    font-size: 1em;
    line-height: 1.8;
    color: #444;
}

/* Key Takeaways Section */
.key-takeaways-block {
    padding: 40px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.takeaway-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.takeaway-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.takeaway-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.takeaway-content {
    flex: 1;
}

.takeaway-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #333;
}

.takeaway-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .takeaway-item {
        flex-direction: column;
        text-align: center;
    }

    .takeaway-number {
        margin: 0 auto;
    }
}

/* Section styling */
.motivation-block,
.spatial-structure-block,
.method-block,
.results-block {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Figure captions */
d-figure figcaption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Ordered and unordered lists in content */
.text ol,
.text ul {
    margin-left: 20px;
    line-height: 1.8;
}

.text li {
    margin-bottom: 10px;
}

/* Abstract styling */
.abstract {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
}

/* BibTeX styling */
.bibtex {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    overflow-x: auto;
}

/* Finding box styling - minimalistic gray block for key findings */
.finding-box {
    background-color: rgba(240, 240, 240, 0.9);
    border: 1.2pt solid rgba(25, 25, 25, 0.6);
    border-radius: 10pt;
    padding: 2pt 10pt;
    margin: 0.5em 0;
    box-shadow: 2px 2px 4px rgba(128, 128, 128, 0.3);
    box-sizing: border-box;
}

.finding-box ul {
    margin: 0.5em 0;
    padding-left: 1.2em;
    list-style-type: disc;
}

.finding-box li {
    margin-bottom: 0.5em;
    line-height: 1.5;
}

.finding-box li:last-child {
    margin-bottom: 0;
}

/* Configuration box styling - sidebar style with left accent */
.config-box {
    background-color: #fafbfc;
    border-left: 4px solid #508af6;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.config-box-label {
    font-family: var(--font-sans, -apple-system, sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #508af6;
    margin-bottom: 10px;
}

.config-box p {
    margin: 0 0 12px 0;
    color: #333;
    font-weight: 600;
}

.config-box p strong {
    color: #508af6;
}

.config-box ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.config-box li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #555;
    position: relative;
    padding-left: 0;
}

.config-box li:last-child {
    margin-bottom: 0;
}

.config-box li strong {
    color: #333;
    font-weight: 600;
}

/* Quickstart Section Styles */
.quickstart-section {
    margin: 40px 0;
    padding: 30px 0;
}

.quickstart-section h1 {
    text-align: left;
    margin-bottom: 30px;
    color: #333;
}

/* Tab Container */
.tab-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Tab Buttons */
.tab-button {
    padding: 12px 24px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: none;
    margin-bottom: -2px;
}

.tab-button:hover {
    background-color: #e8e8e8;
    color: #333;
}

.tab-button.active {
    background-color: #508af6;
    color: white;
    border-color: #508af6;
}

/* Tab Content Panels */
.tab-content {
    display: none;
    padding: 30px;
    background-color: #fafbfc;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 10px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code Examples in Quickstart */
.quickstart-example {
    margin-bottom: 25px;
}

.quickstart-example h3 {
    color: #508af6;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.quickstart-example p {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Code block container with copy button */
.code-block-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.quickstart-example pre {
    background-color: #f6f8fa;
    color: #24292f;
    padding: 16px;
    padding-right: 45px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px !important;
    line-height: 1.45;
    position: relative;
}

.quickstart-example code {
    background-color: transparent;
    color: #24292f;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Copy icon button - minimal style like markdown */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    background-color: transparent;
    border: none;
    color: #57606a;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.copy-button:hover {
    background-color: rgba(175, 184, 193, 0.2);
    color: #24292f;
}

.copy-button:active {
    background-color: rgba(175, 184, 193, 0.3);
}

.copy-button.copied {
    color: #1a7f37;
}

/* Icon using Unicode characters */
.copy-button::before {
    content: '📋';
    font-size: 16px;
}

.copy-button.copied::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
}

/* Prism.js syntax highlighting customization - GitHub light theme */
code[class*="language-"],
pre[class*="language-"] {
    color: #24292f;
    background: #f6f8fa !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px !important;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.45;
    tab-size: 4;
    hyphens: none;
}

code[class*="language-"] {
    background: transparent !important;
}

/* Keywords (def, import, from, class, return, etc.) */
.token.keyword {
    color: #cf222e;
}

/* Strings */
.token.string {
    color: #0a3069;
}

/* Comments */
.token.comment {
    color: #6e7781;
    font-style: italic;
}

/* Functions and method names */
.token.function {
    color: #8250df;
}

/* Class names */
.token.class-name {
    color: #953800;
}

/* Numbers */
.token.number {
    color: #0550ae;
}

/* Operators (=, +, -, etc.) */
.token.operator {
    color: #24292f;
}

/* Punctuation */
.token.punctuation {
    color: #24292f;
}

/* Built-in names */
.token.builtin {
    color: #0550ae;
}

/* Decorators */
.token.decorator {
    color: #8250df;
}

/* Installation Note */
.install-note {
    background-color: #fffbf0;
    border-left: 4px solid #ffd966;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.install-note strong {
    color: #856404;
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .tab-button {
        padding: 10px 16px;
        font-size: 0.85em;
    }

    .tab-content {
        padding: 20px;
    }

    .quickstart-example pre {
        font-size: 0.8em;
    }
}

/* ============================================
   SIDENOTES - Academic paper style margin notes
   ============================================ */

/* Sidenote counter */
body {
    counter-reset: sidenote-counter;
}

/* Sidenote reference in text */
.sidenote-ref {
    counter-increment: sidenote-counter;
    cursor: pointer;
}

.sidenote-ref::after {
    content: counter(sidenote-counter);
    font-size: 0.65em;
    vertical-align: super;
    color: #508af6;
    font-weight: 600;
    margin-left: 2px;
}

/* Sidenote content */
.sidenote {
    font-size: 0.85em;
    line-height: 1.5;
    color: #666;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #508af6;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
}

.sidenote::before {
    content: counter(sidenote-counter) ". ";
    font-weight: 600;
    color: #508af6;
}

/* Desktop: sidenotes in margin */
@media (min-width: 1200px) {
    .sidenote {
        position: absolute;
        right: -280px;
        width: 250px;
        margin: 0;
        background: transparent;
        border-left: 2px solid #ddd;
        padding: 0 0 0 12px;
        border-radius: 0;
    }

    .sidenote::before {
        content: counter(sidenote-counter) ". ";
        font-weight: 600;
        color: #888;
    }
}

/* Author comment style sidenote (different from numbered) */
.author-note {
    font-size: 0.85em;
    line-height: 1.5;
    color: #666;
    font-style: italic;
    padding: 8px 12px;
    background: #fff8e6;
    border-left: 3px solid #f0ad4e;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
}

@media (min-width: 1200px) {
    .author-note {
        position: absolute;
        right: -280px;
        width: 250px;
        margin: 0;
        background: transparent;
        border-left: 2px solid #f0ad4e;
        padding: 0 0 0 12px;
        border-radius: 0;
    }
}

/* ============================================
   ENHANCED FINDING BOX - Paper style callout
   ============================================ */

/* Key finding highlight - with bookmark icon */
.key-finding {
    position: relative;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-left: 4px solid #2c5282;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px 20px 20px;
    margin: 24px 0;
}

.key-finding::before {
    content: '🔖';
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 20px;
}

.key-finding-label {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2c5282;
    margin-bottom: 8px;
}

.key-finding-content {
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
}

/* Quote-style highlight for important statements */
.paper-quote {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px 28px;
    margin: 24px 0;
    font-style: italic;
}

.paper-quote::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 48px;
    color: #ddd;
    font-family: Georgia, serif;
    line-height: 1;
}

.paper-quote p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.7;
    color: #444;
}

.paper-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.9em;
    font-style: normal;
    color: #666;
    text-align: right;
}

/* ============================================
   SIDENOTES - Uses paper-layout.css variables
   ============================================ */

html {
    overflow-x: hidden;
}

/* Mobile/tablet: sidenotes inline with subtle styling */
.sidenote {
    display: block;
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--text-muted, #666);
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 3px solid #94a3b8;
    font-style: italic;
    border-radius: 0 4px 4px 0;
    font-family: inherit;
}

/* Desktop: sidenotes in right margin, pushed far right */
@media (min-width: 1200px) {
    d-article {
        overflow: visible !important;
    }

    .sidenote-container {
        position: relative;
    }

    .sidenote {
        position: absolute;
        right: calc(-1 * (var(--layout-sidenote-width, 220px) + var(--layout-side-gap, 256px)));
        top: 0;
        width: var(--layout-sidenote-width, 220px);
        margin: 0;
        padding: 0 0 0 16px;
        background: none;
        border-left: 1px solid var(--border-light, #e5e5e5);
        border-radius: 0;
        color: var(--text-muted, #666);
        font-size: 0.82em;
        line-height: 1.5;
        font-family: inherit;
    }
}

/* ============================================
   STICKY TABLE OF CONTENTS
   ============================================ */

.toc-container {
    display: none;
}

@media (min-width: 1200px) {
    .toc-container {
        display: block;
        position: fixed;
        left: calc(50% - var(--layout-content-width, 720px)/2 - var(--layout-toc-width, 180px) - var(--layout-side-gap, 256px));
        top: 120px;
        width: var(--layout-toc-width, 180px);
        font-size: 0.85em;
        line-height: 1.5;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 100;
    }

    .toc-container.visible {
        opacity: 1;
    }

    .toc-container h4 {
        font-size: 0.75em;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted, #666);
        margin: 0 0 12px 0;
    }

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

    .toc-container li {
        margin-bottom: 8px;
    }

    .toc-container a {
        color: var(--text-muted, #666);
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .toc-container a:hover {
        color: var(--accent, #2563eb);
    }

    .toc-container a.active {
        color: var(--accent, #2563eb);
        font-weight: 500;
    }
}

/* ============================================================
   ImageNet -> T2I config teaser (side-by-side)
   ============================================================ */
.config-teaser {
    margin: 1.6em 0 2.2em;
}

.config-teaser__lead {
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0 0 1em;
    color: var(--text-primary, #1a1a1a);
}

.config-teaser__lead .chg {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #fff6d6;
    border-bottom: 2px solid #f0b400;
    padding: 0.05em 0.35em;
    border-radius: 3px;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: start;
}

.config-arrow {
    align-self: center;
    flex-shrink: 0;
    color: #9aa3af;
    font-size: 1.35rem;
    padding: 0;
}

@media (max-width: 760px) {
    .config-grid { grid-template-columns: 1fr; }
    .config-arrow { justify-self: center; transform: rotate(90deg); margin: 2px 0; }
}

.config-col {
    border: 1px solid #e4e4ec;
    border-radius: 10px;
    overflow: hidden;
    background: #fbfbfd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.config-col__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-family: var(--font-sans, -apple-system, sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid #ececf1;
}

.config-col__head .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.config-col--imagenet .config-col__head { background: #eef2fb; color: #2952b3; }
.config-col--imagenet .dot { background: #3b6fd6; }
.config-col--t2i .config-col__head { background: #eafaf1; color: #1f8a4d; }
.config-col--t2i .dot { background: #25a35a; }

.config-col__file {
    margin-left: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.75;
}

.config-code {
    margin: 0;
    padding: 12px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre;
    overflow-x: auto;
    color: #2b2b33;
    background: transparent;
    -webkit-text-size-adjust: 100%;
}

/* every line is its own block (avoids stray blank lines in <pre>) */
.config-code .ln,
.config-code .d {
    display: block;
}

/* token coloring */
.config-code .s { color: #0a7d4d; }            /* strings */
.config-code .c { color: #9aa0aa; font-style: italic; }  /* comments */

/* changed line: amber highlight bar */
.config-code .d {
    background: #fff6d6;
    box-shadow: inset 3px 0 0 #f0b400;
    margin: 0 -10px;
    padding: 0 10px;
}

/* left (ImageNet) column uses a red highlight instead of amber */
.config-col--imagenet .config-code .d {
    background: #fdeaea;
    box-shadow: inset 3px 0 0 #de4d4d;
}

@media (max-width: 480px) {
    .config-code { font-size: 0.7rem; }
}

/* Project names in small caps, matching \textsc{} in the paper
   (NanoGen, SimpleEval, DiffBench). */
.sc {
    font-variant-caps: small-caps;
    font-synthesis: small-caps;   /* allow synthesized small caps for fonts lacking real ones */
    font-style: normal;           /* upright, matching \textsc even inside <em> */
    letter-spacing: 0.02em;
}

/* ============================================================
   Diffusion Bench ASCII banner — styled terminal teaser
   ============================================================ */
.bench-teaser {
    margin: 0.25em 0 2.2em;
}

.bench-term {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.10);
}

.bench-term__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    background: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
}

.bench-term__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.bench-term__dot--r { background: #ff5f56; }
.bench-term__dot--y { background: #ffbd2e; }
.bench-term__dot--g { background: #27c93f; }

.bench-term__title {
    margin-left: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: #57606a;
}

.bench-term__art {
    margin: 0;
    padding: 14px 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.58rem;                              /* sized to fit the hero column */
    line-height: 1.3;
    white-space: pre;
    overflow-x: auto;
    color: #1a7f37;                                  /* terminal green (light mode) */
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

/* Dark mode: black background + phosphor-green glow */
@media (prefers-color-scheme: dark) {
    .bench-term { background: #0d1117; border-color: #21262d; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28); }
    .bench-term__bar { background: #161b22; border-bottom-color: #21262d; }
    .bench-term__title { color: #8b949e; }
    .bench-term__art { color: #56d364; text-shadow: 0 0 7px rgba(86, 211, 100, 0.35); }
}

/* Hero column is ~480px; on narrower screens the hero stacks and the
   card gets the full width, so we can grow the art a touch. */
@media (max-width: 900px) {
    .bench-term__art { font-size: 0.74rem; }
}
@media (max-width: 520px) {
    .bench-term__art { font-size: 0.5rem; }
}

/* ============================================================
   Design-principles "shared vs. changes" chip card
   ============================================================ */
.dp-card {
    margin: 0.4em 0 1.5em;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    background: #fbfcfe;
    padding: 16px 18px;
}

.dp-group + .dp-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e3e7ef;
}

.dp-group__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans, -apple-system, sans-serif);
    font-size: 0.98rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.dp-group__title--change { color: #b45309; }

.dp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dp-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-sans, -apple-system, sans-serif);
    font-size: 0.92rem;
    font-weight: 500;
    background: #e9f7ef;
    border: 1px solid #b7e0c5;
    color: #1f7a43;
}

.dp-chip--change {
    background: #fff4d6;
    border-color: #f0c34c;
    color: #92600a;
    font-weight: 600;
}

/* ============================================================
   Data table (reproducibility / benchmark tables)
   group-row banners + highlighted "Ours" rows
   ============================================================ */
figure.data-table {
    margin: 22px 0;
}
figure.data-table .table-scroll {
    overflow-x: auto;
    margin: 0;
}
figure.data-table table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans, -apple-system, sans-serif);
    font-size: 0.72rem;
    white-space: normal;
    table-layout: auto;
}
figure.data-table th,
figure.data-table td {
    padding: 0.3rem 0.32rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #ececf1;
}
figure.data-table thead th {
    border-bottom: 2px solid #d0d7de;
    font-weight: 600;
    color: #1a1a1a;
}
figure.data-table th:first-child,
figure.data-table td:first-child {
    text-align: left;
}
/* method names are normal weight (override the template's .data-table bold) */
figure.data-table tbody td:first-child {
    font-weight: 400;
}
figure.data-table tbody tr.group-row td {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.74rem;
    font-weight: 700;
    color: #6b7280;
    background: #f6f8fa;
}
figure.data-table tr.row-ours td {
    background: #eaf1ff;
}
figure.data-table tr.row-ours td:first-child {
    font-weight: 700;
}
figure.data-table var {
    font-family: 'Latin Modern Math', 'Cambria Math', Georgia, serif;
    font-style: italic;
    font-weight: 500;
}
figure.data-table figcaption {
    padding: 10px 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    text-align: center;
}
/* FDr / MIND metric toggle for the systematic ImageNet table */
figure.data-table .metric-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 0.82rem;
}
figure.data-table .metric-toggle-label {
    color: #555;
}
figure.data-table .metric-toggle button {
    border: 1px solid #d0d3dc;
    background: #fff;
    color: #444;
    padding: 3px 13px;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
figure.data-table .metric-toggle button[aria-pressed="true"] {
    background: #2952b3;
    border-color: #2952b3;
    color: #fff;
}
/* show only the active metric's value spans (FDr / MIND) */
figure.data-table table[data-metric="fdr"] .m-mind,
figure.data-table table[data-metric="mind"] .m-fdr {
    display: none;
}
/* show only the active guidance setting (with / without CFG) */
figure.data-table table[data-cfg="cfg"] .m-nocfg,
figure.data-table table[data-cfg="nocfg"] .m-cfg,
figure.data-table table[data-cfg="cfg"] .v-nocfg,
figure.data-table table[data-cfg="nocfg"] .v-cfg {
    display: none;
}

/* ============================================================
   Interactive plot figure (iframed Plotly widgets)
   ============================================================ */
/* break out wider than the text column so the 3-panel plot has room */
figure.plot-figure {
    margin: 22px 0;
    width: 100%;
}
figure.plot-figure figcaption {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    text-align: center;
    margin: 12px auto 0;
}

/* ============================================================
   Static image figures (rasterized paper figures)
   ============================================================ */
figure.fig-img {
    margin: 22px 0;
    width: 100%;
}
figure.fig-img img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ececf1;
    border-radius: 8px;
    cursor: zoom-in;
}
figure.fig-img figcaption {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    text-align: center;
    margin: 12px auto 0;
}
