:root {
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-tertiary: #707087;
    --accent: #2563eb;
    --accent-light: #eff4ff;
    --accent-hover: #1d4ed8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(37, 99, 235, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 4px 16px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(0, 0, 0, 0.04);
    --radius: 10px;
    --max-width: 740px;
    --code-bg: #f8fafc;
}

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

html {
    color-scheme: light dark;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

nav.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.site-nav .nav-name {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav .nav-links a:hover {
    color: var(--accent);
}

footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
}

/* Homepage */

.home-main > section,
.home-main > .hero {
    opacity: 0;
    transform: translateY(12px);
    animation: fade-up 0.5s ease forwards;
}

.home-main > :nth-child(2) {
    animation-delay: 0.1s;
}

.home-main > :nth-child(3) {
    animation-delay: 0.15s;
}

.home-main > :nth-child(4) {
    animation-delay: 0.2s;
}

.home-main > :nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-main > section {
    padding: 48px 0;
}

.hero {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 72px 0 24px;
}

.hero-photo {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--accent-light);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-info h1 {
    margin-bottom: 6px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
}

.hero-info .subtitle {
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 16px;
}

.hero-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.hero-logos img {
    width: auto;
    height: 24px;
}

.hero-logos img[alt="Inria"] {
    height: 28px;
}

.hero-info .tagline {
    margin-bottom: 18px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-style: italic;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-links a,
.pub-links a,
.links-grid a {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.social-links a {
    gap: 6px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
}

.social-links a:hover,
.pub-links a:hover,
.links-grid a:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.social-links a svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.social-links a svg.icon-outline {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.contact-links {
    margin-top: 16px;
}

.section-title {
    margin-bottom: 24px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 22px;
    font-weight: 600;
}

.section-title::after,
.article-content h2::after {
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
}

.featured-post {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.15s;
}

.featured-post:hover,
.pub-card:hover,
.blog-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.featured-post-bg {
    position: absolute;
    inset: 0;
    background: url("blog/gaia2-cli/announcement-banner.webp") center / cover no-repeat;
    filter: blur(3px) brightness(0.35);
    transform: scale(1.1);
}

.featured-post.omni-featured .featured-post-bg {
    background-image: url("blog/omnilingual-gaia2/announcement-banner.svg");
    background-position: center 43%;
}

.featured-post-content {
    position: relative;
    z-index: 1;
    padding: 28px;
}

.featured-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 10px;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.featured-post h2 {
    margin-bottom: 4px;
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.4;
}

.featured-post p {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.featured-link {
    color: #a9c1ff;
    font-size: 14px;
    font-weight: 600;
}

.about-text {
    max-width: 660px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 15.5px;
}

.about-text a,
.article-content a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-text a:hover,
.article-content a:hover {
    opacity: 0.8;
}

.pub-card,
.blog-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.15s;
}

.pub-card {
    margin-bottom: 16px;
    padding: 24px;
}

.pub-card .pub-venue,
.blog-card .blog-meta .tag,
.article-meta .tag {
    display: inline-block;
    border-radius: 5px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.pub-card .pub-venue {
    margin-bottom: 10px;
    padding: 3px 10px;
    font-size: 11.5px;
}

.pub-card h3 {
    margin-bottom: 8px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.pub-card .pub-authors {
    margin-bottom: 10px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
}

.pub-card .pub-authors strong {
    color: var(--text);
    font-weight: 600;
}

.pub-card .pub-desc {
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pub-links a {
    gap: 4px;
    min-height: 40px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
}

.blog-card {
    display: block;
    margin-bottom: 12px;
    padding: 20px 24px;
    color: inherit;
    text-decoration: none;
}

.blog-card .blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.blog-card .blog-meta .tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.blog-card h3 {
    margin-bottom: 4px;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-card .blog-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Article */

.article-header {
    padding-block: 64px 32px;
}

.article-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.article-header .back-link:hover {
    opacity: 0.7;
}

.article-header h1 {
    margin-bottom: 16px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.article-meta .tag {
    padding: 3px 10px;
    font-size: 11px;
}

.article-banner {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.article-layout {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.article-main {
    width: 100%;
    max-width: var(--max-width);
}

.toc {
    position: fixed;
    top: 50%;
    left: 24px;
    width: 160px;
    transform: translateY(-50%);
}

.toc-title {
    display: block;
    margin-bottom: 12px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.toc li {
    margin-bottom: 2px;
    counter-increment: toc;
}

.toc a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    color: var(--text-tertiary);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s;
}

.toc a::before {
    min-width: 14px;
    color: var(--border);
    content: counter(toc);
    font-size: 10px;
    font-weight: 700;
}

.toc a:hover,
.toc a.active,
.toc a:hover::before,
.toc a.active::before {
    color: var(--accent);
}

.toc a.active {
    font-weight: 600;
}

.mobile-toc-wrap {
    display: none;
}

.mobile-toc {
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.mobile-toc summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
}

.mobile-toc summary::-webkit-details-marker {
    display: none;
}

.mobile-toc summary::after {
    color: var(--accent);
    content: "+";
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.mobile-toc details[open] summary::after {
    content: "−";
}

.mobile-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 28px;
    margin: 0;
    padding: 0 18px 16px 42px;
}

.mobile-toc li {
    color: var(--text-tertiary);
    font-size: 13px;
}

.mobile-toc a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
}

.mobile-toc a:hover {
    color: var(--accent);
}

.article-content {
    padding-bottom: 64px;
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 15.5px;
}

.article-content h2[id] {
    scroll-margin-top: 70px;
}

.article-content h2 {
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 22px;
    font-weight: 600;
}

.article-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 15.5px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.article-content .img-caption {
    margin-top: -16px;
    margin-bottom: 24px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
    text-align: center;
}

.article-content pre {
    overflow-x: auto;
    margin-bottom: 24px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--code-bg);
}

.article-content code {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--code-bg);
    font-family: "Fira Code", monospace;
    font-size: 13.5px;
}

.article-content pre code {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.6;
}

.callout {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--accent-light);
}

.callout p {
    margin-bottom: 0;
    color: var(--text);
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.links-grid a {
    gap: 6px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
}

.pub-links a::after,
.links-grid a::after {
    content: "↗";
    font-size: 12px;
    transition: transform 0.2s;
}

.pub-links a:hover::after,
.links-grid a:hover::after {
    transform: translate(1px, -1px);
}

.leaderboard {
    width: calc(100vw - 48px);
    max-width: 1100px;
    overflow-x: auto;
    margin: 24px 0 24px 50%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transform: translateX(-50%);
}

.leaderboard table,
.bypass-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard table {
    font-size: 13.5px;
}

.leaderboard thead th,
.bypass-table thead th {
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: left;
    text-transform: uppercase;
}

.leaderboard thead th {
    padding: 10px 8px;
    white-space: nowrap;
}

.leaderboard tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.leaderboard tbody tr:last-child {
    border-bottom: 0;
}

.leaderboard tbody tr:hover {
    background: var(--bg-alt);
}

.leaderboard td {
    padding: 10px 8px;
    color: var(--text-secondary);
    font-size: 12.5px;
    white-space: nowrap;
}

.leaderboard .rank {
    width: 32px;
    color: var(--text-tertiary);
    font-weight: 600;
    text-align: center;
}

.leaderboard .medal {
    font-size: 18px;
}

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

.leaderboard .pass-cell {
    width: 120px;
}

.leaderboard .pass-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 28px;
    border-radius: 6px;
    background: #f0edf8;
}

.leaderboard .pass-bar::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--pct);
    border-radius: 6px;
    background: linear-gradient(90deg, #c4b5fd, #8b5cf6);
    content: "";
    opacity: 0.7;
}

.leaderboard .pass-bar span {
    position: relative;
    z-index: 1;
    padding-left: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.leaderboard .date {
    color: var(--text-tertiary);
}

.table-scroll-hint {
    display: none;
}

.agent-quote {
    margin: 20px 0;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--code-bg);
    color: var(--text);
    font-size: 14.5px;
    font-style: italic;
    line-height: 1.6;
}

.agent-quote-label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.failure-case {
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.failure-expected,
.failure-actual {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.failure-expected {
    border-bottom: 1px solid var(--border);
    background: rgba(34, 197, 94, 0.06);
}

.failure-actual {
    background: rgba(239, 68, 68, 0.06);
}

.failure-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.failure-expected .failure-label {
    color: #16803d;
}

.failure-actual .failure-label {
    color: #c52a2a;
}

.failure-actual ol {
    margin-bottom: 0;
    padding-left: 20px;
}

.failure-actual li {
    margin-bottom: 4px;
    font-size: 14px;
}

.bypass-table {
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.bypass-table table {
    font-size: 13px;
}

.bypass-table thead th {
    padding: 10px 14px;
}

.bypass-table thead th:first-child,
.bypass-table td:first-child {
    width: 32px;
    text-align: center;
}

.bypass-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.bypass-table tr:last-child td {
    border-bottom: 0;
}

.bypass-table td:first-child {
    color: var(--text-tertiary);
    font-weight: 600;
}

.bypass-table .result-fail {
    color: #c52a2a;
    font-size: 12px;
    font-weight: 500;
}

.tweet-embed {
    max-width: 550px;
    margin: 24px auto;
}

.leaderboard-footnote {
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: italic;
}

.citation-block {
    position: relative;
    margin: 20px 0;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--code-bg);
}

.citation-block pre {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

/* OmnilingualGAIA2 article */

.article-header .article-deck {
    max-width: 680px;
    margin: -4px 0 20px;
    color: var(--text-secondary);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 18px;
    line-height: 1.55;
}

.omni-banner-wrap {
    max-width: var(--max-width);
}

.omni-banner-wrap .article-banner {
    height: clamp(190px, 32vw, 300px);
    border: 0;
    border-radius: 4px;
    background: #07132f;
    box-shadow: 0 18px 50px rgba(26, 44, 94, 0.16);
    object-fit: cover;
    object-position: center;
}

.article-content .section-lead {
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 19px;
    line-height: 1.65;
}

.callout-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.omni-callout {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, var(--accent-light), rgba(168, 85, 247, 0.08));
}

.omni-callout::after {
    position: absolute;
    top: -42px;
    right: -32px;
    width: 116px;
    height: 116px;
    border: 18px solid rgba(99, 102, 241, 0.08);
    border-radius: 50%;
    content: "";
}

.capability-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 24px 0 32px;
}

.capability-card {
    position: relative;
    overflow: hidden;
    padding: 18px 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.capability-card > span {
    position: absolute;
    top: 11px;
    right: 0;
    color: var(--text-tertiary);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.capability-card > strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 15px;
}

.article-content .capability-card p {
    margin: 0;
    padding-right: 18px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
}

.article-content figure.figure-wide {
    width: 100%;
    max-width: 100%;
    margin: 30px 0 34px;
}

.article-content .figure-wide img {
    display: block;
    width: 100%;
    margin: 0;
    box-shadow: 0 12px 35px rgba(37, 66, 135, 0.08);
}

.article-content .figure-wide figcaption {
    max-width: 820px;
    margin: 12px auto 0;
    color: var(--text-tertiary);
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.55;
    text-align: center;
}

.adaptive-figure {
    --viz-blue: #356da8;
    --viz-blue-soft: #eef4fa;
    --viz-violet: #7564a8;
    --viz-violet-soft: #f3f0f8;
    --viz-coral: #c65f46;
    --viz-coral-soft: #f8efec;
    --viz-cyan: #39798a;
    --viz-cyan-soft: #eef5f6;
    --viz-grid: #d5dae3;
    --viz-muted: #667085;
    --viz-surface: var(--bg-card);
    color: var(--text);
}

.pipeline-visual,
.gap-visual,
.attribution-visual {
    overflow: hidden;
    padding: 26px 28px 22px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--viz-surface);
    box-shadow: none;
}

.viz-heading {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--viz-grid);
}

.viz-heading strong,
.viz-heading span {
    display: block;
}

.viz-heading strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.3;
}

.viz-heading span {
    margin-top: 3px;
    color: var(--viz-muted);
    font-size: 11px;
}

.pipeline-steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 14px;
}

.pipeline-step {
    position: relative;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: transparent;
}

.pipeline-step > strong,
.pipeline-step > small {
    display: block;
}

.pipeline-step > strong {
    margin: 8px 0 6px;
    color: var(--text);
    font-size: 14px;
}

.pipeline-step > small {
    min-height: 42px;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.step-number {
    display: block;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--text-tertiary);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 12px;
    font-weight: 700;
}

.step-number.violet,
.step-number.cyan { background: none; color: var(--text-tertiary); }

.pipeline-arrow {
    align-self: center;
    color: var(--text-tertiary);
    font-size: 21px;
}

.app-fields,
.translated-fields {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.app-fields span,
.translated-fields span {
    padding: 6px 0;
    border-bottom: 1px solid var(--viz-grid);
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 600;
}

.translated-fields span {
    background: transparent;
    color: var(--text-secondary);
}

.term-pair {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
    margin-top: 14px;
    padding: 9px 0;
    border: 0;
    border-top: 1px solid var(--viz-grid);
    border-bottom: 1px solid var(--viz-grid);
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 10.5px;
}

.term-pair b {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
    color: var(--viz-violet);
}

.term-pair span:last-child {
    color: var(--text);
    font-weight: 600;
}

.frozen-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 28px auto 0;
    padding: 11px 0;
    border-top: 1px solid var(--viz-grid);
    border-bottom: 1px solid var(--viz-grid);
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11.5px;
}

.frozen-strip strong {
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--text);
    font-size: 10px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.frozen-strip span::before {
    margin-right: 8px;
    color: var(--text-tertiary);
    content: "·";
}

.split-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.viz-legend {
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

.viz-heading .viz-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.legend-dot.english { background: var(--viz-blue); }
.legend-dot.target { background: var(--viz-coral); }

.gap-axis,
.gap-row {
    display: grid;
    grid-template-columns: 175px minmax(340px, 1fr) 82px;
    gap: 22px;
}

.gap-axis {
    margin: 0 0 20px;
    color: var(--text-tertiary);
    font-size: 10px;
}

.gap-axis > div {
    display: flex;
    justify-content: space-between;
}

.gap-row {
    align-items: center;
    min-height: 61px;
}

.gap-row > strong {
    color: var(--text);
    font-size: 13px;
}

.gap-row > b {
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--viz-coral);
    font-size: 11px;
    text-align: center;
}

.gap-track {
    position: relative;
    height: 38px;
    border-right: 1px solid var(--viz-grid);
    border-left: 1px solid var(--viz-grid);
    background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), var(--viz-grid) calc(20% - 1px), var(--viz-grid) 20%);
}

.gap-line {
    position: absolute;
    top: 18px;
    left: var(--target);
    width: calc(var(--english) - var(--target));
    height: 2px;
    border-radius: 0;
    background: var(--text-tertiary);
}

.gap-point {
    position: absolute;
    top: 13px;
    left: var(--target);
    width: 12px;
    height: 12px;
    border: 1px solid var(--viz-surface);
    border-radius: 50%;
    background: var(--viz-coral);
    transform: translateX(-50%);
}

.gap-point.english {
    left: var(--english);
    background: var(--viz-blue);
}

.gap-point::after {
    position: absolute;
    bottom: 17px;
    left: 50%;
    color: var(--viz-coral);
    content: attr(data-value);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    transform: translateX(-50%);
}

.gap-point.english::after {
    color: var(--viz-blue);
}

.article-content .viz-note {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--viz-grid);
    color: var(--text-tertiary);
    font-size: 11px;
}

.attribution-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr);
    gap: 34px;
    align-items: center;
}

.attribution-breakdown {
    padding-right: 34px;
    border-right: 1px solid var(--viz-grid);
}

.attribution-bar {
    display: flex;
    height: 38px;
    overflow: hidden;
    border: 1px solid var(--viz-grid);
    border-radius: 2px;
    background: var(--bg-card);
}

.attribution-bar span {
    display: grid;
    width: var(--share);
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.attribution-bar .agent { background: var(--viz-blue); }
.attribution-bar .translation { background: var(--viz-violet); }
.attribution-bar .verifier { background: var(--viz-coral); font-size: 10px; }

.attribution-key {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.attribution-key > div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.attribution-key i {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    margin-top: 5px;
    border-radius: 50%;
}

.attribution-key i.agent { background: var(--viz-blue); }
.attribution-key i.translation { background: var(--viz-violet); }
.attribution-key i.verifier { background: var(--viz-coral); }

.article-content .attribution-key p {
    margin: 0;
}

.attribution-key strong,
.attribution-key span {
    display: block;
}

.attribution-key strong {
    color: var(--text);
    font-size: 12px;
}

.attribution-key span {
    color: var(--text-tertiary);
    font-size: 10.5px;
}

.contamination-stat {
    align-self: stretch;
    padding-left: 2px;
}

.panel-title {
    display: block;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.contamination-value {
    margin: 11px 0 7px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.contamination-track {
    width: 100%;
    height: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--viz-grid);
    background: rgba(112, 112, 135, 0.08);
}

.contamination-track i {
    display: block;
    width: 6.4%;
    height: 100%;
    background: var(--viz-violet);
}

.contamination-stat > small {
    display: block;
    color: var(--text-tertiary);
    font-size: 10.5px;
    line-height: 1.4;
}

.findings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 24px 0 30px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.finding-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 20px;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.finding-card:last-child { border-right: 0; }

.finding-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-tertiary);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.finding-card > strong {
    display: block;
    margin-bottom: 9px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 29px;
    line-height: 1.15;
}

.finding-card.blue > strong { color: #3e68f4; }
.finding-card.violet > strong { color: #8a5ad9; }
.finding-card.coral > strong { color: #d84861; }

.article-content .finding-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
}

.language-explorer {
    margin: 34px 0 38px;
    padding: 20px 0 14px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.explorer-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.explorer-heading strong,
.explorer-heading span {
    display: block;
}

.explorer-heading strong {
    color: var(--text);
    font-size: 16px;
}

.explorer-heading span {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 11px;
}

.explorer-heading label {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.explorer-heading select {
    display: block;
    min-width: 190px;
    margin-top: 5px;
    padding: 7px 28px 7px 9px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    text-transform: none;
}

.capability-tabs {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.capability-tabs button {
    margin-bottom: -1px;
    padding: 7px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}

.capability-tabs button:hover,
.capability-tabs button[aria-pressed="true"] {
    border-bottom-color: var(--accent);
    color: var(--text);
}

.language-axis {
    display: flex;
    justify-content: space-between;
    margin: 0 42px 7px 102px;
    color: var(--text-tertiary);
    font-size: 9px;
}

.language-bars {
    display: grid;
    gap: 8px;
}

.language-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    min-height: 20px;
}

.language-row > span:first-child {
    color: var(--text-secondary);
    font-size: 10.5px;
}

.language-row > b {
    color: var(--text-secondary);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.language-track {
    height: 8px;
    border-left: 1px solid var(--border);
    background:
        repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), var(--border) calc(25% - 1px), var(--border) 25%),
        rgba(100, 116, 139, 0.07);
}

.language-track i {
    display: block;
    height: 100%;
    background: #c65f46;
    transition: width 180ms ease;
}

.language-row.reference > span:first-child,
.language-row.reference > b {
    color: var(--text);
    font-weight: 700;
}

.language-row.reference .language-track i {
    background: #356da8;
}

.article-content .language-explorer figcaption {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: italic;
}

.behaviour-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 18px;
    margin: 26px 0 34px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.behaviour-side {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.behaviour-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
}

.explore .behaviour-icon { background: #eaf0ff; color: #3e68f4; }
.commit .behaviour-icon { background: #fff0f2; color: #d84861; }

.behaviour-side strong,
.behaviour-side small {
    display: block;
}

.behaviour-side strong {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 14px;
}

.behaviour-side small {
    color: var(--text-tertiary);
    font-size: 11.5px;
    line-height: 1.45;
}

.behaviour-arrow {
    align-self: center;
    color: var(--text-tertiary);
    font-size: 22px;
}

.caution-callout {
    border-left-color: #9a65e8;
    background: rgba(154, 101, 232, 0.08);
}

.caution-callout .callout-eyebrow {
    color: #8752cf;
}

.linguistic-case {
    overflow: hidden;
    margin: 26px 0 32px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-card);
    box-shadow: none;
}

.case-prompt {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--accent-light), rgba(168, 85, 247, 0.07));
}

.case-prompt > span {
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.case-prompt blockquote {
    margin: 8px 0 5px;
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 22px;
    line-height: 1.4;
}

.case-prompt small {
    color: var(--text-tertiary);
    font-size: 12px;
}

.case-paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.case-path {
    padding: 22px 24px;
}

.case-path + .case-path {
    border-left: 1px solid var(--border);
}

.language-chip,
.case-outcome {
    display: inline-block;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.language-chip {
    margin-bottom: 12px;
    padding: 4px 9px;
    background: var(--bg-alt);
    color: var(--text-tertiary);
}

.case-path > strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 14px;
}

.article-content .case-path p {
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
}

.case-outcome {
    padding: 4px 9px;
}

.case-path.safe .case-outcome { background: rgba(34, 197, 94, 0.1); color: #16803d; }
.case-path.risky .case-outcome { background: rgba(239, 68, 68, 0.1); color: #c52a2a; }

.final-callout {
    margin-top: 34px;
    text-align: center;
}

@media (max-width: 1100px) {
    .toc {
        display: none;
    }

    .mobile-toc-wrap {
        display: block;
    }
}

@media (max-width: 600px) {
    .site-nav .nav-links {
        gap: 18px;
    }

    .site-nav .nav-links a {
        font-size: 13px;
    }

    .hero {
        flex-direction: column;
        gap: 20px;
        padding-top: 48px;
        text-align: center;
    }

    .hero-photo {
        width: 110px;
        height: 110px;
    }

    .hero-info h1 {
        font-size: 28px;
    }

    .social-links {
        justify-content: center;
    }

    .section-title,
    .article-content h2 {
        font-size: 20px;
    }

    .pub-card {
        padding: 18px;
    }

    .article-header h1 {
        font-size: 26px;
    }

    .mobile-toc ol {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-content pre {
        padding: 16px;
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .table-scroll-hint {
        display: block;
        margin-bottom: -12px;
        color: var(--text-tertiary);
        font-size: 12px;
    }

    .article-header .article-deck {
        font-size: 16.5px;
    }

    .capability-cards,
    .findings-grid,
    .case-paths {
        grid-template-columns: 1fr;
    }

    .pipeline-visual,
    .gap-visual,
    .attribution-visual {
        padding: 24px 20px;
    }

    .pipeline-steps {
        grid-template-columns: 1fr;
    }

    .pipeline-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .pipeline-step > small {
        min-height: 0;
    }

    .frozen-strip {
        flex-wrap: wrap;
        gap: 7px 14px;
        border-radius: 14px;
    }

    .split-heading {
        display: block;
    }

    .viz-legend {
        margin-top: 12px;
    }

    .gap-axis {
        display: none;
    }

    .gap-row {
        grid-template-columns: 94px minmax(0, 1fr) 58px;
        gap: 8px;
        min-height: 54px;
    }

    .gap-row > strong {
        font-size: 10px;
        line-height: 1.25;
    }

    .gap-row > b {
        padding: 5px 3px;
        font-size: 9px;
    }

    .gap-point::after {
        display: none;
    }

    .attribution-layout {
        grid-template-columns: 1fr;
    }

    .attribution-breakdown {
        padding-right: 0;
        padding-bottom: 28px;
        border-right: 0;
        border-bottom: 1px solid var(--viz-grid);
    }

    .article-content .figure-wide figcaption {
        position: sticky;
        left: 0;
        width: calc(100vw - 48px);
        margin-inline: 0;
        padding-inline: 8px;
    }

    .finding-card {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .finding-card:last-child {
        border-bottom: 0;
    }

    .explorer-heading {
        display: block;
    }

    .explorer-heading label {
        display: block;
        margin-top: 14px;
    }

    .explorer-heading select {
        width: 100%;
    }

    .capability-tabs {
        gap: 14px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .capability-tabs button {
        flex: 0 0 auto;
    }

    .language-axis {
        margin-right: 38px;
        margin-left: 80px;
    }

    .language-row {
        grid-template-columns: 68px minmax(0, 1fr) 27px;
        gap: 8px;
    }

    .language-row > span:first-child {
        font-size: 9.5px;
    }

    .behaviour-strip {
        grid-template-columns: 1fr;
    }

    .behaviour-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .case-path + .case-path {
        border-top: 1px solid var(--border);
        border-left: 0;
    }
}

@media (max-width: 360px) {
    .site-nav .container {
        justify-content: center;
    }

    .site-nav .nav-name {
        display: none;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .home-main > section,
    .home-main > .hero {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1117;
        --bg-alt: #161822;
        --bg-card: #1a1c28;
        --text: #e4e4ed;
        --text-secondary: #a0a0b8;
        --text-tertiary: #8888a0;
        --accent: #6b8afd;
        --accent-light: rgba(107, 138, 253, 0.12);
        --accent-hover: #8ba4fd;
        --border: #2a2c3a;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
        --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
        --code-bg: #161822;
    }

    nav.site-nav {
        background: rgba(15, 17, 23, 0.92);
    }

    .hero-logos img {
        filter: brightness(0) invert(1);
    }

    .leaderboard .pass-bar {
        background: rgba(139, 92, 246, 0.15);
    }

    .leaderboard .pass-bar::before {
        opacity: 0.5;
    }

    .failure-expected .failure-label {
        color: #62d48a;
    }

    .failure-actual .failure-label,
    .bypass-table .result-fail {
        color: #ff8585;
    }

    .finding-card.blue > strong { color: #7f9bff; }
    .finding-card.violet > strong { color: #c28cff; }
    .finding-card.coral > strong { color: #ff8295; }

    .explore .behaviour-icon { background: rgba(87, 122, 255, 0.16); color: #8ba4fd; }
    .commit .behaviour-icon { background: rgba(239, 96, 118, 0.14); color: #ff8a9b; }

    .case-path.safe .case-outcome { color: #62d48a; }
    .case-path.risky .case-outcome { color: #ff8585; }

    .adaptive-figure {
        --viz-blue: #78a6d2;
        --viz-blue-soft: rgba(82, 129, 173, 0.14);
        --viz-violet: #a99bd2;
        --viz-violet-soft: rgba(139, 122, 180, 0.14);
        --viz-coral: #e28a72;
        --viz-coral-soft: rgba(198, 95, 70, 0.14);
        --viz-cyan: #78afbc;
        --viz-cyan-soft: rgba(57, 121, 138, 0.14);
        --viz-grid: #30354a;
        --viz-muted: #929db8;
        --viz-surface: var(--bg-card);
    }

    .language-row .language-track i {
        background: #e28a72;
    }

    .language-row.reference .language-track i {
        background: #78a6d2;
    }
}
