@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    --font-main: "Iowan Old Style", "Iowan Old Style BT", Georgia, serif;
    --font-logo: "Iowan Old Style", "Iowan Old Style BT", Georgia, serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;
    --color-text: #1a1a1a;
    --color-link: #1a1a1a;
    --color-bg: #ffffff;
    --color-accent: #e5e5e5;
    --width-content: 720px; /* content width */
    --width-wide: 1200px;   /* leaderboard width */
    
    /* Logo colors */
    --cocoa-dark: #3E2723;
    --cocoa-mid: #5D4037;
    --cocoa-light: #8D6E63;
    --wire-sketch: #795548;
    --bench-text: #64748B;
    --ease-draw: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

li {
    margin-bottom: 12px;
}

header {
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--width-wide);
    margin: 0 auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    position: relative;
    width: 40px;
    height: 40px;
}

.logo-icon svg {
    width: 40px;
    height: 40px;
    overflow: visible;
    position: absolute;
    top: 0;
    left: 0;
}

.logo .text-group {
    font-family: var(--font-logo);
    font-size: 26px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo .cocoa {
    background: linear-gradient(135deg, var(--cocoa-dark), var(--cocoa-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo .bench {
    color: var(--bench-text);
    font-weight: 600;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

/* SVG Solid Layer */
.solid-group {
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .logo:hover .solid-group {
        opacity: 0;
        transition: opacity 0.4s ease-out;
    }
}

/* SVG Wire Layer */
.wire-path {
    fill: none;
    stroke: var(--wire-sketch);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0;
    transition: stroke-dashoffset 0.2s ease-out, opacity 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .logo:hover .wire-path {
        stroke-dashoffset: 0;
        opacity: 1;
        transition: stroke-dashoffset 1.2s var(--ease-draw), opacity 0.2s;
    }

    /* Text animation on hover */
    .logo:hover .bench {
        color: var(--cocoa-mid);
        transform: translateX(4px);
    }
}

/* SVG fill colors */
.pod-body { fill: var(--cocoa-mid); }
.pod-ridge-left { fill: var(--cocoa-light); }
.pod-ridge-right { fill: var(--cocoa-dark); }

header nav a {
    margin-left: 35px;
    text-decoration: none;
    color: #888;
    font-family: var(--font-main);
    font-size: 17px;
    position: relative;
    transition: color 0.2s;
}

header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1.5px;
    background: var(--color-text);
    transition: width 0.25s ease;
}

header nav a.active::after {
    width: 100%;
}

header nav a.active {
    color: var(--color-text);
}

@media (hover: hover) and (pointer: fine) {
    header nav a:hover::after {
        width: 100%;
    }

    header nav a:hover {
        color: var(--color-text);
    }
}

.container {
    max-width: var(--width-content);
    margin: 60px auto 100px;
    padding: 0 20px;
}

.container-wide {
    max-width: var(--width-wide);
    margin: 60px auto 100px;
    padding: 0 20px;
}

h1 {
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 20px;
    margin-bottom: 50px;
}

h2 {
    font-size: 24px;
    font-weight: normal;
    margin-top: 40px;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 10px;
}

p {
    font-size: 18px;
    margin-bottom: 24px;
}

a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
    a:hover {
        color: #555;
    }
}

.resource-links {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 50px 0;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 16px;
    color: var(--color-text);
    background: #f8f8f8;
    border-radius: 8px;
    transition: all 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .resource-link:hover {
        background: var(--color-text);
        color: #fff;
    }
}

/* Touch device: use active state instead */
@media (hover: none) {
    .resource-link:active {
        background: var(--color-text);
        color: #fff;
    }
}

.resource-link svg {
    flex-shrink: 0;
}

/* Table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-main);
    min-width: 900px;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    font-size: 15px;
    vertical-align: middle;
}

thead th {
    font-weight: bold;
    border-top: 2px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    tbody tr:hover {
        background-color: #fafafa;
    }

    tbody tr:hover .rank-cell,
    tbody tr:hover .model-name,
    tbody tr:hover .score-cell {
        background-color: #fafafa;
    }
}

.model-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Model name with subtitle - elegant two-line layout */
.model-name-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.25;
}

.model-main-name {
    font-weight: 600;
    color: var(--color-text);
}

.model-subtitle {
    font-size: 0.78em;
    font-style: italic;
    color: var(--cocoa-light);
    font-weight: 400;
    margin-top: 1px;
    letter-spacing: 0.01em;
}

.model-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.score {
    font-family: var(--font-main);
    font-variant-numeric: lining-nums tabular-nums;
}

/* Leaderboard Legend */
.leaderboard-legend {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-item .result-block {
    width: 16px;
    height: 16px;
    margin: 0;
}

.legend-note {
    margin-left: auto;
    font-style: italic;
}

/* Sticky columns */
.rank-cell,
.model-name,
.score-cell,
.th-rank,
.th-model,
.th-score {
    position: sticky;
    background: #fff;
    z-index: 1;
}

.th-rank,
.th-model,
.th-score {
    z-index: 2;
    background: #fff;
}

.rank-cell,
.th-rank {
    left: 0;
    min-width: 40px;
}

.model-name,
.th-model {
    left: 40px;
    min-width: 180px;
}

.score-cell,
.th-score {
    left: 220px;
    min-width: 70px;
    border-right: 1px solid #eee;
}

/* Table cells */
.rank-cell {
    font-variant-numeric: tabular-nums;
    color: #888;
}

.score-cell {
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

/* Result columns */
.th-result {
    text-align: center;
    min-width: 32px;
    width: 32px;
    padding: 12px 1px;
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.result-cell {
    text-align: center;
    padding: 3px 1px;
    width: 32px;
    min-width: 32px;
}

/* Result blocks */
.result-block {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin: 0 auto;
}

@media (hover: hover) and (pointer: fine) {
    .result-block:hover {
        transform: scale(1.15);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 10;
        position: relative;
    }
}

/* Touch device: use active state */
@media (hover: none) {
    .result-block:active {
        transform: scale(1.1);
        box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    }
}

.result-block.pass {
    background: #66BB6A;
}

.result-block.fail {
    background: #EF5350;
}

/* Column hover effect */
.col-hover {
    background-color: #f5f5f5;
}

thead th.col-hover {
    background-color: #eee;
}

/* Figure block (for images with captions) */
.figure-block {
    margin: 40px 0;
    text-align: center;
}

.figure-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.figure-block figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

/* Content tables (in body text) */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    min-width: auto;
}

.content-table th,
.content-table td {
    padding: 12px 16px;
    text-align: left;
}

.content-table th {
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    border-top: 2px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    font-size: 14px;
}

.content-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .content-table tbody tr:hover {
        background: #fafafa;
    }
}

/* Code blocks (in body text) - with Prism.js */
.code-block-wrapper {
    position: relative;
    margin: 24px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
}

.code-block-lang {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .code-copy-btn:hover {
        background: #f0f0f0;
        border-color: #ccc;
        color: #333;
    }
}

.code-copy-btn.copied {
    color: #22863a;
    border-color: #22863a;
    background: #f0fff4;
}

.code-block {
    background: transparent;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border: none;
}

/* Code block styles - high specificity to override Prism.js */
.code-block-wrapper .code-block {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    overflow: hidden;
}

.code-block-wrapper pre.code-block[class*="language-"] {
    padding: 12px 14px;
    margin: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block-wrapper .code-block code,
.code-block-wrapper .code-block code[class*="language-"] {
    display: block;
    padding: 0;
    margin: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
}

/* Custom syntax colors to match our theme */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6a737d;
}

.token.punctuation {
    color: #24292e;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #005cc5;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #22863a;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #d73a49;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #d73a49;
}

.token.function,
.token.class-name {
    color: #6f42c1;
}

.token.regex,
.token.important,
.token.variable {
    color: #e36209;
}

/* Math blocks */
.math-block {
    text-align: center;
    margin: 24px 0;
    overflow-x: auto;
}

/* h3 styling */
h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
}

/* ============================================
   PERFORMANCE BAR CHART
   ============================================ */

.performance-chart {
    margin: 24px 0;
    padding: 24px 28px;
    background: #f9f9f9;
    border-radius: 12px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.bar-row:last-child {
    border-bottom: none;
}

.bar-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    flex-shrink: 0;
}

.bar-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.bar-model-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

/* Bar chart model name with subtitle */
.bar-label .model-name-group {
    gap: 0;
    white-space: nowrap;
}

.bar-label .model-main-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.bar-label .model-subtitle {
    font-size: 11px;
    margin-top: 0;
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bar-fill {
    height: 24px;
    background: linear-gradient(135deg, #BCAAA4 0%, #A1887F 100%);
    border-radius: 4px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.2s ease,
                box-shadow 0.2s ease;
    transition-delay: var(--delay, 0s);
}

.performance-chart.animate .bar-fill {
    width: var(--target-width);
}

.bar-value {
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    color: #8D6E63;
    min-width: 48px;
    text-align: right;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover effect */
@media (hover: hover) and (pointer: fine) {
    .bar-row {
        transition: transform 0.2s ease, background-color 0.2s ease;
        margin: 0 -12px;
        padding: 12px 12px;
        border-radius: 8px;
    }

    .bar-row:hover {
        background-color: #f5f5f5;
        transform: translateX(4px);
    }

    .bar-row:hover .bar-fill {
        background: linear-gradient(135deg, #795548 0%, var(--cocoa-mid) 100%);
        box-shadow: 0 2px 8px rgba(62, 39, 35, 0.2);
    }

    .bar-row:hover .bar-value {
        color: var(--cocoa-dark);
        font-weight: 600;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .performance-chart {
        padding: 16px 20px;
    }

    .bar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 0;
    }

    .bar-label {
        min-width: auto;
    }

    .bar-container {
        width: 100%;
    }

    .bar-fill {
        height: 20px;
    }
}

@media (max-width: 480px) {
    .performance-chart {
        padding: 14px 16px;
        border-radius: 8px;
    }

    .bar-model-name {
        font-size: 14px;
    }

    .bar-value {
        font-size: 13px;
    }
}

/* Citation block */
.citation-block {
    position: relative;
    background: #f9f9f9;
    border-left: 3px solid #333;
    margin: 20px 0;
}

.citation-block pre {
    margin: 0;
    padding: 20px;
    padding-right: 50px;
    font-size: 12px;
    font-family: var(--font-mono);
    overflow-x: auto;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
    .copy-btn:hover {
        background: #f0f0f0;
        border-color: #ccc;
        color: #333;
    }
}

@media (hover: none) {
    .copy-btn:active {
        background: #f0f0f0;
        border-color: #ccc;
        color: #333;
    }
}

.copy-btn .check-icon {
    color: #66BB6A;
}

/* ============================================
   SITE FOOTER
   ============================================ */

.site-footer {
    margin-top: 80px;
    padding: 40px 20px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.site-footer .footer-credits {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
}

.site-footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ============================================
   EXAMPLE SHOWCASE COMPONENT
   ============================================ */

.example-showcase {
    /* Breakout from container - center on screen */
    width: min(900px, calc(100vw - 40px));
    max-width: min(900px, calc(100vw - 40px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 50px 0;
}

/* Tabs wrapper for horizontal scroll on mobile */
.example-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 24px;
}

.example-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.example-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 0;
    min-width: max-content;
}

.example-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 24px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.example-tab.active {
    color: var(--color-text);
    background: #f0f0f0;
}

@media (hover: hover) and (pointer: fine) {
    .example-tab:hover {
        color: var(--color-text);
        background: #f5f5f5;
    }
}

/* Panels */
.example-panels {
    padding: 32px;
    background: #f9f9f9;
    border-radius: 16px;
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
}

/* Content area */
.example-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.example-question {
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
    color: var(--color-text);
}

/* Image content */
.example-images {
    margin-bottom: 16px;
}

.example-images.multiple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.example-figure {
    margin: 0;
}

.example-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.example-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Embed content */
.example-embed {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    margin: 1rem 0;
}

.example-embed iframe {
    width: 100%;
    border: none;
    display: block;
}


/* Answer section */
.example-answer {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
}

.answer-icon {
    color: #66BB6A;
    font-weight: bold;
}

.answer-label {
    color: #666;
}

.answer-value {
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 14px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    word-break: break-word;
}

/* Reasoning section (collapsible) */
.example-reasoning {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
}

.example-reasoning summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
    list-style: none;
}

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

.reasoning-toggle-icon::before {
    content: '▶';
    display: inline-block;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.example-reasoning[open] .reasoning-toggle-icon::before {
    transform: rotate(90deg);
}

@media (hover: hover) and (pointer: fine) {
    .example-reasoning summary:hover {
        color: var(--color-text);
    }
}

.reasoning-content {
    margin-top: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.75;
}

.reasoning-content p {
    margin: 0 0 16px 0;
    font-size: 15px;
}

.reasoning-content p:last-child {
    margin-bottom: 0;
}

.reasoning-content strong {
    color: var(--color-text);
}

.reasoning-content em {
    font-style: italic;
}

.reasoning-content code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
}

.reasoning-content pre {
    background: #f8f8f8;
    color: #333;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    overflow-x: auto;
    margin: 16px 0;
}

.reasoning-content pre code {
    background: none;
    color: #333;
    padding: 0;
    font-size: 13px;
    color: inherit;
}

/* Markdown tables in reasoning */
.reasoning-content .md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    min-width: auto;
}

.reasoning-content .md-table th,
.reasoning-content .md-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.reasoning-content .md-table th {
    background: #f5f5f5;
    font-weight: 600;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
}

.reasoning-content .md-table tr:nth-child(even) {
    background: #fafafa;
}

/* ============================================
   RESPONSIVE / MOBILE STYLES
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 768px) {
    header {
        padding: 24px 20px;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .logo {
        justify-content: center;
    }

    nav {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    nav a {
        margin-left: 0;
        margin: 0 12px;
        font-size: 15px;
    }

    .container {
        margin: 40px auto 60px;
    }

    .container-wide {
        margin: 40px auto 60px;
        padding: 0 12px;
    }

    h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 17px;
        margin-bottom: 32px;
    }

    .resource-links {
        flex-wrap: wrap;
        gap: 12px;
        margin: 32px 0;
    }

    .resource-link {
        padding: 10px 18px;
        font-size: 14px;
    }

    /* Leaderboard legend */
    .leaderboard-legend {
        flex-wrap: wrap;
        gap: 12px;
    }

    .legend-note {
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }

    /* DISABLE sticky columns on mobile - this fixes the glitch */
    .rank-cell,
    .model-name,
    .score-cell,
    .th-rank,
    .th-model,
    .th-score {
        position: static;
        left: auto;
    }

    /* Remove the border-right on score since it's no longer sticky */
    .score-cell,
    .th-score {
        border-right: none;
    }

    /* Smaller result blocks on mobile */
    .result-block {
        width: 24px;
        height: 24px;
    }

    .th-result {
        min-width: 28px;
        width: 28px;
        font-size: 11px;
    }

    .result-cell {
        width: 28px;
        min-width: 28px;
    }

    table {
        min-width: 750px;
    }

    th, td {
        padding: 10px 6px;
        font-size: 14px;
    }

    /* Example showcase responsive */
    .example-showcase {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        left: 50%;
        transform: translateX(-50%);
        margin: 32px 0;
    }

    .example-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .example-panels {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .example-content {
        padding: 20px;
    }

    .example-question {
        font-size: 16px;
    }

    .example-images.multiple {
        grid-template-columns: 1fr;
    }

    .reasoning-content {
        padding: 16px;
        font-size: 14px;
    }

    .reasoning-content p {
        font-size: 14px;
    }

    .answer-value {
        font-size: 13px;
    }
}

/* Small phone breakpoint */
@media (max-width: 480px) {
    header {
        padding: 20px 16px;
    }

    /* Keep logo readable on mobile - don't shrink too much */
    .logo .text-group {
        font-size: 24px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-icon svg {
        width: 36px;
        height: 36px;
    }

    nav a {
        margin: 0 8px;
        font-size: 14px;
    }

    h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    p {
        font-size: 16px;
    }

    h2 {
        font-size: 20px;
    }

    /* Keep buttons in a row, allow wrapping */
    .resource-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .resource-link {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Even smaller result blocks */
    .result-block {
        width: 22px;
        height: 22px;
        border-radius: 3px;
    }

    .th-result {
        min-width: 26px;
        width: 26px;
        padding: 10px 0;
    }

    .result-cell {
        width: 26px;
        min-width: 26px;
        padding: 2px 0;
    }

    table {
        min-width: 680px;
    }

    .model-name {
        min-width: 140px;
    }

    th, td {
        padding: 8px 4px;
        font-size: 13px;
    }

    .citation-block pre {
        font-size: 11px;
        padding: 16px;
        padding-right: 40px;
    }

    /* Example showcase small screen */
    .example-showcase {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        margin: 24px 0;
    }

    .example-tab {
        padding: 12px 16px;
        font-size: 13px;
    }

    .example-panels {
        padding: 16px 12px;
        border-radius: 8px;
    }

    .example-content {
        padding: 16px;
    }

    .example-question {
        font-size: 15px;
    }

    .example-answer {
        flex-wrap: wrap;
        font-size: 14px;
    }

    .reasoning-content {
        padding: 14px;
    }

    .reasoning-content pre {
        padding: 12px 14px;
        font-size: 12px;
    }

    .reasoning-content pre code {
        font-size: 12px;
    }
}

/* ============================================
   TABLE OF CONTENTS (TOC) - Notion Style
   ============================================ */

/* Desktop Sidebar */
.toc-sidebar {
    position: fixed;
    top: 140px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Progress indicators container */
.toc-indicators {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 0;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.toc-sidebar:hover .toc-indicators {
    opacity: 0;
    pointer-events: none;
}

/* Individual indicator line */
.toc-indicator {
    width: var(--indicator-width, 18px);
    height: 4px;
    background: #D7CCC8;
    border-radius: 2px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.toc-indicator.active {
    background: #5D4037;
    width: calc(var(--indicator-width, 18px) + 6px);
}

/* The expanded card */
.toc-sidebar .toc-card {
    position: absolute;
    right: 0;
    top: 0;
    width: 280px;
    max-height: calc(100vh - 200px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateX(10px);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toc-sidebar:hover .toc-card {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.toc-header {
    display: none; /* Hide the header in this design */
}

.toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.toc-nav {
    font-size: 15px;
    padding: 16px 0;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

/* Custom scrollbar for TOC */
.toc-nav::-webkit-scrollbar {
    width: 6px;
}

.toc-nav::-webkit-scrollbar-track {
    background: transparent;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

.toc-nav:hover::-webkit-scrollbar-thumb {
    background: #ccc;
}

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

.toc-sublist {
    list-style: none;
    margin: 0;
    padding-left: 16px;
}

.toc-item {
    margin: 0;
}

.toc-link {
    display: block;
    padding: 8px 20px;
    color: #777;
    text-decoration: none;
    line-height: 1.45;
    border-radius: 6px;
    margin: 0 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.toc-link:hover {
    background: #F5F5F5;
}

.toc-link.active {
    color: #3E2723;
    font-weight: 600;
}

/* Level-specific styling */
.toc-level-2 > .toc-link {
    color: #555;
}

.toc-level-2 > .toc-link.active {
    color: #3E2723;
}

.toc-level-3 > .toc-link {
    font-size: 14px;
}

.toc-level-4 > .toc-link {
    font-size: 13px;
}

/* Mobile button */
.toc-mobile-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
    justify-content: center;
}

.toc-mobile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.toc-mobile-btn:active {
    transform: scale(0.98);
}

/* Mobile overlay */
.toc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.toc-overlay.active {
    opacity: 1;
}

/* Mobile popup card (bottom-right) */
.toc-drawer {
    display: none;
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 280px;
    max-height: 60vh;
    background: #fff;
    border-radius: 12px;
    z-index: 1002;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
    transform: scale(0.9) translateY(10px);
    transform-origin: bottom right;
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    overflow: hidden;
}

.toc-drawer.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.toc-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.toc-drawer-header .toc-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0;
}

.toc-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    transition: background 0.15s ease;
}

.toc-close-btn:hover {
    background: #eee;
}

.toc-drawer .toc-nav {
    padding: 12px 0 16px;
    max-height: calc(60vh - 60px);
    overflow-y: auto;
}

.toc-drawer .toc-link {
    padding: 12px 16px;
    font-size: 15px;
    margin: 0 8px;
}

.toc-drawer .toc-link.active {
    color: #3E2723;
    font-weight: 600;
}

.toc-drawer .toc-sublist {
    padding-left: 16px;
}

.toc-drawer .toc-level-3 > .toc-link {
    font-size: 14px;
}

.toc-drawer .toc-level-4 > .toc-link {
    font-size: 13px;
}

/* ============================================
   SOLUTION GALLERY COMPONENT
   ============================================ */

.solution-gallery {
    margin: 32px 0;
}

/* Gallery container - unified background for grid and solution */
.gallery-container {
    background: #f9f9f9;
    border-radius: 12px;
}

/* Grid wrapper */
.gallery-grid-wrapper {
    padding: 32px 20px 12px 20px;
    overflow-x: auto;
}

/* Legend under the gallery table */
.gallery-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px 12px 20px;
    font-size: 13px;
    color: #666;
}

.gallery-legend-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.gallery-legend-swatch.pass {
    background: #66BB6A;
}

.gallery-legend-swatch.fail {
    background: #EF5350;
}

.gallery-legend-label {
    font-size: 13px;
    color: #555;
    margin-right: 4px;
}

.gallery-legend-text {
    font-size: 12px;
    color: #777;
    text-align: right;
}

.gallery-grid {
    width: 100%;
    min-width: 0; /* Override global table min-width */
    border-collapse: collapse;
    border-bottom: 1px solid #e0e0e0;
}

.gallery-grid th,
.gallery-grid td {
    text-align: center;
    vertical-align: middle;
    padding: 0; /* Reset, let specific classes control padding */
}

.gallery-grid th {
    padding: 10px clamp(1px, 0.6vw, 6px);
}

.gallery-model-header {
    text-align: left !important;
    width: auto;
    padding-left: 12px !important;
    padding-right: clamp(16px, 5vw, 60px) !important;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text);
    vertical-align: middle;
}

.gallery-example-header {
    font-weight: 600;
    font-size: clamp(11px, 1.3vw, 13px);
    color: var(--color-text);
    white-space: normal;
    line-height: 1.35;
    word-break: break-word;
    width: clamp(48px, 8vw, 60px);
}

.gallery-model-row {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.15s ease;
}

.gallery-model-row:last-child {
    border-bottom: none;
}

.gallery-model-row td {
    vertical-align: middle;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-model-row:hover {
        background-color: rgba(255, 255, 255, 0.5);
    }
}

.gallery-model-cell {
    text-align: left !important;
    width: auto;
    padding-left: clamp(8px, 1.5vw, 12px) !important;
    padding-right: clamp(16px, 5vw, 60px) !important;
}

.gallery-model-cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gallery-model-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.gallery-model-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.3;
}

/* Gallery model name with subtitle */
.gallery-model-cell .model-name-group {
    gap: 0;
}

.gallery-model-cell .model-main-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.gallery-model-cell .model-subtitle {
    font-size: 11px;
    margin-top: 0;
}

.gallery-cell {
    width: clamp(48px, 8vw, 60px);
    padding: clamp(2px, 0.8vw, 8px) clamp(1px, 0.6vw, 6px) !important;
}

.gallery-cell:last-child,
.gallery-example-header:last-child {
    padding-right: 32px !important;
}

/* Result blocks - smooth scaling with clamp() */
.result-block-mini {
    display: inline-block;
    width: clamp(24px, 3.8vw, 36px);
    height: clamp(24px, 3.8vw, 36px);
    border-radius: clamp(4px, 0.6vw, 6px);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease;
    vertical-align: middle;
}

.result-block-mini.pass {
    background: #66BB6A;
}

.result-block-mini.fail {
    background: #EF5350;
}

.result-block-mini.na {
    background: #e0e0e0;
    cursor: default;
}

.result-block-mini.active {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 
        0 0 0 2px #fff,
        0 0 0 4px rgba(0, 0, 0, 0.14),
        0 6px 16px rgba(0, 0, 0, 0.14);
    animation: selected-pulse 2s ease-in-out infinite;
}

@keyframes selected-pulse {
    0%, 100% {
        box-shadow: 
            0 0 0 2px #fff,
            0 0 0 4px rgba(0, 0, 0, 0.14),
            0 6px 16px rgba(0, 0, 0, 0.14);
    }
    50% {
        box-shadow: 
            0 0 0 3px #fff,
            0 0 0 5px rgba(0, 0, 0, 0.12),
            0 8px 20px rgba(0, 0, 0, 0.12);
    }
}

@media (hover: hover) and (pointer: fine) {
    .result-block-mini:not(.na):hover {
        transform: scale(1.06) translateY(-2px);
        box-shadow: 
            0 0 0 2px rgba(255, 255, 255, 0.8),
            0 5px 14px rgba(0, 0, 0, 0.18);
    }
    
    .result-block-mini.active:hover {
        transform: scale(1.08) translateY(-3px);
        animation: none;
        box-shadow: 
            0 0 0 3px #fff,
            0 0 0 6px rgba(0, 0, 0, 0.12),
            0 10px 24px rgba(0, 0, 0, 0.18);
    }
}

/* Solution Panel */
.gallery-solution-panel {
    padding: 0 16px 16px 16px;
}

.solution-status {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
}

.solution-status.pass {
    background: #E8F5E9;
    color: #2E7D32;
}

.solution-status.fail {
    background: #FFEBEE;
    color: #C62828;
}

.status-icon {
    font-size: 14px;
}

/* Collapsible Solution Details */
.solution-details {
    background: #fff;
    border-radius: 10px;
    margin: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .solution-details:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }
}

.solution-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
    user-select: none;
    list-style: none;
    background: transparent;
    transition: background 0.15s ease;
}

.solution-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.solution-toggle-left img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.solution-model-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Solution panel model name with subtitle */
.solution-toggle-left .model-name-group {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.solution-toggle-left .model-main-name {
    font-weight: 600;
    font-size: 14px;
}

.solution-toggle-left .model-subtitle {
    font-size: 12px;
    margin-top: 0;
}

.solution-separator {
    color: #ccc;
}

.solution-example-title {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.solution-toggle::-webkit-details-marker {
    display: none;
}

.toggle-icon {
    color: #999;
    flex-shrink: 0;
}

.toggle-icon::before {
    content: '▼';
    font-size: 10px;
}

.solution-details:not([open]) .toggle-icon::before {
    content: '▶';
}


@media (hover: hover) and (pointer: fine) {
    .solution-toggle:hover {
        background: #f5f5f5;
        color: var(--color-text);
    }
}

.solution-content {
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.solution-content p {
    margin: 0 0 14px 0;
    font-size: 14px;
}

.solution-content p:last-child {
    margin-bottom: 0;
}

.solution-link {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #5D4037;
    background: #EFEBE9;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.solution-link:hover {
    background: #D7CCC8;
    color: #3E2723;
}

.solution-content strong {
    color: var(--color-text);
}

.solution-content code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
}

.solution-content .gallery-code {
    background: #f5f5f5;
    padding: 14px 18px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
}

.solution-content .gallery-code code {
    background: none;
    padding: 0;
}

.solution-content .gallery-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.solution-content .gallery-table th,
.solution-content .gallery-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.solution-content .gallery-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.solution-content .gallery-table tr:nth-child(even) {
    background: #fafafa;
}

/* Solution content scrollbar */
.solution-content::-webkit-scrollbar {
    width: 6px;
}

.solution-content::-webkit-scrollbar-track {
    background: transparent;
}

.solution-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.solution-content:hover::-webkit-scrollbar-thumb {
    background: #ccc;
}

/* Responsive - clamp() handles smooth scaling, only override non-clamp properties */
@media (max-width: 768px) {
    .gallery-container {
        border-radius: 8px;
    }
    
    .gallery-grid-wrapper {
        padding: 16px 14px 12px 14px;
    }

    .gallery-legend {
        padding: 0 14px 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .gallery-legend-text {
        text-align: left;
        font-size: 11.5px;
    }
    
    .gallery-model-name {
        font-size: 13px;
    }
    
    .gallery-solution-panel {
        padding: 0 12px 12px 12px;
    }
    
    .solution-toggle {
        padding: 12px 14px;
    }
    
    .solution-content {
        padding: 14px;
        max-height: 350px;
    }
    
    .gallery-cell:last-child,
    .gallery-example-header:last-child {
        padding-right: 16px !important;
    }
}

@media (max-width: 480px) {
    .gallery-grid-wrapper {
        padding: 12px 10px 10px 10px;
    }
    
    .gallery-model-name {
        font-size: 11px;
    }
    
    .gallery-model-logo {
        width: 16px;
        height: 16px;
    }
    
    .gallery-solution-panel {
        padding: 0 8px 8px 8px;
    }
    
    .gallery-cell:last-child,
    .gallery-example-header:last-child {
    padding-right: clamp(12px, 4vw, 32px) !important;
    }
    
    /* Simplify solution card on narrow screens */
    .solution-toggle {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .solution-toggle-left {
        gap: 6px;
    }
    
    .solution-toggle-left img {
        width: 18px;
        height: 18px;
    }
    
    .solution-model-name {
        font-size: 12px;
    }
    
    .solution-separator,
    .solution-example-title {
        display: none;
    }
    
    .solution-status {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .solution-content {
        padding: 12px;
        font-size: 13px;
    }
    
    .solution-content p {
        font-size: 13px;
    }
}

/* Responsive: Show/hide based on screen width */
@media (min-width: 1024px) {
    .toc-sidebar {
        display: flex;
    }
    
    .toc-mobile-btn,
    .toc-overlay,
    .toc-drawer {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .toc-sidebar {
        display: none !important;
    }
    
    .has-toc .toc-mobile-btn {
        display: flex;
    }
    
    /* Only show overlay when active to avoid stray touch targets */
    .has-toc .toc-overlay {
        display: none;
        pointer-events: none;
    }
    
    .has-toc .toc-overlay.active {
        display: block;
        pointer-events: auto;
    }
    
    .has-toc .toc-drawer {
        display: none;
    }
    
    .has-toc .toc-drawer.active {
        display: block;
    }
}
