/* ChiMERa-Bench project page. Built on the Academic Project Page template (Bulma), in the palette of the paper's figures. */
:root {
  --navy: #1F4A6B;
  --navy-soft: #2C6E9B;
  --teal: #18857A;
  --teal-dark: #136B62;
  --teal-tint: #E7F3F1;
  --amber: #C07820;
  --amber-tint: #FBF1E2;
  --red: #A8443C;
  --red-tint: #F8ECEA;
  --cyan: #2FB3A6;
  --gray: #5F6368;
  --panel: #F5F6F8;
  --rule: #DFE2E6;
  --text: #1B2433;
  --radius: 12px;
  --shadow: 0 4px 14px rgba(29, 53, 87, 0.08);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; background: #fff; }
body { font-family: var(--serif); color: var(--text); font-size: 17px; line-height: 1.6; background: #fff; -webkit-font-smoothing: antialiased; }
.title, .subtitle, .content h2, .content h3, .content h4 { font-family: var(--serif) !important; color: var(--navy) !important; }
.content p { color: var(--text); }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
strong { color: inherit; }

/* scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--teal), var(--navy)); z-index: 50; }

/* hero */
.hero .hero-body { padding-top: 4rem; padding-bottom: 1.5rem; }
.publication-title { font-size: 4rem !important; letter-spacing: 0.01em; margin-bottom: 0.6rem !important; }
.publication-subtitle { font-weight: 400; line-height: 1.35; max-width: 46rem; margin: 0 auto 1.4rem auto !important; }
.publication-authors { font-family: var(--serif); color: var(--navy); }
.publication-authors a { color: var(--teal-dark) !important; border-bottom: 1px dotted var(--teal); }
.author-block { display: inline-block; margin: 0 0.35rem; }
.affiliations { color: var(--gray); margin-top: 0.3rem; font-size: 1.05rem; }
.author-note { color: var(--gray); font-size: 0.92rem; margin-top: 0.4rem; }
.publication-links { margin-top: 1.4rem; }
.link-block { display: inline-block; margin: 0.25rem 0.2rem; }
.button.is-dark { background-color: var(--navy) !important; border: none; font-family: var(--serif); transition: transform 0.15s ease, background-color 0.15s ease; }
.button.is-dark:hover { background-color: var(--teal-dark) !important; transform: translateY(-1px); }
.button.is-placeholder { opacity: 0.55; cursor: default; }
.button.is-placeholder:hover { background-color: var(--navy) !important; transform: none; }

.hero-fade { opacity: 0; transform: translateY(10px); animation: heroIn 0.7s ease forwards; }
.hero-fade-1 { animation-delay: 0.05s; } .hero-fade-2 { animation-delay: 0.18s; } .hero-fade-3 { animation-delay: 0.3s; } .hero-fade-4 { animation-delay: 0.42s; } .hero-fade-5 { animation-delay: 0.55s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-fade { animation: none; opacity: 1; transform: none; } .reveal { opacity: 1 !important; transform: none !important; } }

/* figures and animations */
.teaser .hero-body { padding-top: 0.5rem; padding-bottom: 1rem; }
.figure-video, .paper-figure img { width: 100%; height: auto; display: block; border-radius: 8px; background: #fff; }
.figure-video { cursor: pointer; }
.paper-figure { margin: 1.6rem 0 1.2rem 0; }
.paper-figure figcaption, .teaser-caption { font-style: normal !important; font-size: 0.95rem; color: #3B4556; line-height: 1.55; margin-top: 0.7rem; text-align: left; }
.paper-figure figcaption strong, .teaser-caption strong { color: var(--navy); }
.paper-figure.is-narrow img { max-width: 720px; margin: 0 auto; }
.anim-note { font-size: 0.85rem; color: var(--gray); text-align: right; margin-top: 0.15rem; }

/* section nav */
.section-nav { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.3rem; padding: 0.6rem 1rem; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); font-size: 0.98rem; }
.section-nav a { color: var(--navy); }
.section-nav a:hover { color: var(--teal-dark); }

/* sections */
.section { padding: 3.2rem 1.5rem; }
.section.is-light { background: var(--panel); }
.section .title.is-3 { margin-bottom: 1.4rem; }
.content h3.title.is-4 { margin-top: 2.2rem; margin-bottom: 0.9rem; }
.lead { font-size: 1.08rem; }

/* tl;dr and abstract */
.tldr { background: var(--teal-tint); border-left: 4px solid var(--teal); border-radius: 8px; padding: 1rem 1.25rem; margin: 0.4rem 0 1rem 0; }
.tldr p { margin: 0; }
.tldr-label { font-weight: 700; color: var(--teal-dark); margin-right: 0.4rem; }
details.paper-details { border: 1px solid var(--rule); border-radius: 10px; background: #fff; margin: 1rem 0; }
details.paper-details > summary { cursor: pointer; padding: 0.75rem 1.1rem; font-weight: 600; color: var(--navy); list-style: none; }
details.paper-details > summary::-webkit-details-marker { display: none; }
details.paper-details > summary::before { content: '\25B8'; display: inline-block; margin-right: 0.55rem; transition: transform 0.2s ease; color: var(--teal); }
details.paper-details[open] > summary::before { transform: rotate(90deg); }
.details-body { padding: 0 1.25rem 1rem 1.25rem; }

/* math and takeaways */
.math-box { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 0.6rem 1rem; margin: 1rem 0; overflow-x: auto; }
.section.is-light .math-box { background: #fff; }
.takeaway { border-left: 4px solid var(--navy); background: #fff; padding: 0.8rem 1.1rem; border-radius: 6px; margin-top: 1.3rem; box-shadow: var(--shadow); }

/* property cards */
.props { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.4rem 0 0.4rem 0; }
.prop { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.prop h4 { font-size: 1.02rem !important; margin: 0 0 0.35rem 0 !important; color: var(--navy) !important; }
.prop p { font-size: 0.95rem; margin: 0 !important; }
.prop .icon { color: var(--teal); margin-right: 0.35rem; }

/* algorithms */
.algorithm { border: 1px solid var(--rule); border-radius: 10px; padding: 0.9rem 1.2rem 0.6rem 1.2rem; margin: 0.9rem 0; background: #fff; }
.algo-title { font-size: 1rem !important; margin: 0 0 0.5rem 0 !important; color: var(--navy) !important; }
.algorithm ol { margin-top: 0.3rem !important; }
.algorithm li { margin: 0.2rem 0; }
.algo-highlight { background: var(--teal-tint); border-radius: 4px; padding: 0 0.3rem; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 0.4rem 0; }
table.results-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
table.results-table th, table.results-table td { padding: 0.5rem 0.7rem; text-align: center; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.results-table th { background: var(--navy); color: #fff !important; font-weight: 600; }
table.results-table td:first-child, table.results-table th:first-child { text-align: left; }
table.results-table tr.ours-row td { background: var(--teal-tint); font-weight: 600; color: var(--navy); }
table.results-table tr.group-row td { background: var(--panel); font-style: italic; color: var(--gray); text-align: left; }
.table-note { font-size: 0.88rem; color: var(--gray); margin-top: 0.4rem; }
.pm { font-size: 0.78em; color: var(--gray); }

/* sample cards */
.samples-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 0.8rem 0; }
.tabs-mini { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tab-btn { font-family: var(--serif); border: 1px solid var(--rule); background: #fff; color: var(--navy); border-radius: 999px; padding: 0.3rem 0.9rem; cursor: pointer; font-size: 0.93rem; }
.tab-btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .sample-grid { grid-template-columns: 1fr; } .publication-title { font-size: 3rem !important; } }
.sample-card { border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); background: #fff; box-shadow: var(--shadow); }
.sample-card .card-title { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.8rem; font-size: 0.88rem; color: #fff; font-weight: 600; }
.sample-card .card-title span:last-child { font-weight: 400; opacity: 0.9; }
.sample-card.mdlm .card-title { background: #6b7079; }
.sample-card.domino .card-title { background: var(--teal-dark); }
.sample-card.mdlm { background: #fafafa; }
.sample-card.domino { background: #f6fbfa; }
.sample-text { padding: 0.7rem 0.9rem; font-size: 0.9rem; line-height: 1.65; word-break: break-word; }
.sample-text .bad { color: var(--red); }
.sample-text .msk { display: inline-block; width: 0.75em; height: 0.7em; background: #d5d9df; border-radius: 1px; vertical-align: -0.05em; }
.traj { margin-top: 0.6rem; }
.traj-controls { display: flex; align-items: center; gap: 0.9rem; margin: 0.6rem 0 0.9rem 0; flex-wrap: wrap; }
.traj-controls input[type=range] { flex: 1; min-width: 180px; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--rule); outline: none; cursor: pointer; }
.traj-controls input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--teal-dark); }
.traj-controls input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--teal-dark); }
.traj-controls input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
.traj-controls input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--teal); }
.traj-controls input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.3); }
.traj-ticks { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--gray); padding: 0 2px; margin-top: -0.6rem; margin-bottom: 0.6rem; }
.traj-label { font-size: 0.95rem; color: var(--navy); min-width: 15rem; }
.traj-step { display: none; }
.traj-step.is-active { display: grid; }
.legend-note { font-size: 0.88rem; color: var(--gray); margin-top: 0.6rem; }

/* bibtex */
.bibtex-header { display: flex; align-items: center; justify-content: space-between; }
.copy-bibtex-btn { font-family: var(--serif); background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 0.4rem 0.9rem; cursor: pointer; }
.copy-bibtex-btn:hover { background: var(--teal-dark); }
pre#bibtex-code { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; font-family: var(--mono); font-size: 0.86rem; color: var(--navy); white-space: pre-wrap; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* scroll to top */
.scroll-to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: none; background: var(--navy); color: #fff; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; box-shadow: var(--shadow); z-index: 45; }
.scroll-to-top.visible { opacity: 0.9; pointer-events: auto; }

.footer { background: #fff; border-top: 1px solid var(--rule); padding: 2rem 1.5rem 2.5rem; font-size: 0.92rem; color: var(--gray); }
.footer a { color: var(--teal-dark); }

/* ChiMERa-Bench additions */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.6rem 0 0.6rem 0; }
.stat { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 1rem; box-shadow: var(--shadow); text-align: center; }
.stat .num { font-size: 1.75rem; font-weight: 700; color: var(--navy-soft); line-height: 1.15; }
.stat .cap { font-size: 0.88rem; color: var(--gray); margin-top: 0.15rem; }
.split-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.3rem 0 0.4rem 0; }
.split-card { background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--teal); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.split-card h4 { font-size: 1.02rem !important; margin: 0 0 0.3rem 0 !important; color: var(--navy) !important; }
.split-card p { font-size: 0.94rem; margin: 0 !important; }
.split-card .counts { font-size: 0.86rem; color: var(--gray); margin-top: 0.5rem !important; font-variant-numeric: tabular-nums; }
.metric-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; margin: 1.3rem 0 0.4rem 0; }
@media (min-width: 700px) { .metric-groups { grid-template-columns: repeat(3, 1fr); } }
.metric-group { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.85rem 1rem; box-shadow: var(--shadow); }
.metric-group h4 { font-size: 0.98rem !important; margin: 0 0 0.35rem 0 !important; color: var(--navy) !important; }
.metric-group p { font-size: 0.9rem; margin: 0 !important; color: var(--text); }
.metric-group.is-new { border-left: 4px solid var(--amber); }
.metric-group .tagline { display: inline-block; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber); font-weight: 700; margin-bottom: 0.2rem; }
table.results-table td.best { font-weight: 700; color: var(--navy); }
table.results-table td.second { text-decoration: underline; }
table.results-table tr.sep td { border-top: 2px solid var(--rule); }
.legend-chips { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; justify-content: center; margin: 0.7rem 0 0.2rem 0; font-size: 0.9rem; color: var(--text); }
.legend-chips span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-chips i { width: 1.1rem; height: 0.55rem; border-radius: 2px; display: inline-block; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.pill { font-size: 0.86rem; border: 1px solid var(--rule); border-radius: 999px; padding: 0.18rem 0.7rem; color: var(--navy); background: #fff; }
.data-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.data-link { display: block; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.9rem 1.1rem; box-shadow: var(--shadow); color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; }
.data-link:hover { transform: translateY(-2px); border-color: var(--teal); color: var(--text); }
.data-link strong { display: block; color: var(--navy); margin-bottom: 0.15rem; }
.data-link span { font-size: 0.88rem; color: var(--gray); }
.task-box { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); margin: 1.1rem 0; }
.task-box .task-line { display: flex; gap: 0.7rem; align-items: baseline; font-size: 0.95rem; margin-bottom: 0.3rem; }
.task-box .task-line b { color: var(--navy-soft); min-width: 5.5rem; }
@media (max-width: 480px) { .publication-title { font-size: 2.3rem !important; } .publication-subtitle { font-size: 1.25rem !important; } .section { padding: 2.4rem 1rem; } }

/* the animated figure of how the benchmark works */
.scene-figure { margin: 0; }
.cb-scene { width: 100%; cursor: pointer; }
.cb-scene svg { width: 100%; height: auto; display: block; overflow: visible; }
.cb-scene.is-paused { opacity: 0.97; }
.cb-scene text { font-family: var(--serif); }
.sc-act { font-size: 23px; font-weight: 700; fill: var(--navy); }
.sc-sub { font-size: 14.5px; fill: var(--gray); }
.sc-step { font-size: 14px; font-weight: 700; fill: var(--navy-soft); }
.sc-count { font-size: 38px; font-weight: 700; fill: var(--navy-soft); font-variant-numeric: tabular-nums; }
.sc-count-sm { font-size: 13px; fill: var(--gray); font-variant-numeric: tabular-nums; }
.sc-stagelabel { font-size: 14px; fill: var(--gray); }
.sc-gate { font-size: 14.5px; font-weight: 600; fill: var(--navy); }
.sc-note { font-size: 12.5px; fill: var(--gray); }
.sc-lane { font-size: 15px; font-weight: 600; fill: var(--navy); }
.sc-tag { font-size: 13.5px; font-weight: 600; }
.sc-metric { font-size: 14px; fill: var(--navy); }
.sc-metric.is-new { fill: var(--amber); font-weight: 600; }
.sc-chip { font-size: 14px; fill: var(--navy); }

/* inline icons, in place of the icon font the other pages load */
.ico { width: 1em; height: 1em; vertical-align: -0.125em; fill: currentColor; }
.button .ico { margin-right: 0.45rem; }

/* the guided walkthrough of the architecture figure */
.figwalk { margin: 0; cursor: pointer; }
.fw-frame { position: relative; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; }
.fw-video { display: block; width: 100%; height: auto; background: #fff; }
.fw-rail { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0.1rem 0; }
.fw-step { font-family: var(--serif); font-size: 0.88rem; color: var(--gray); background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 0.22rem 0.8rem 0.22rem 0.45rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; transition: color 0.15s ease, border-color 0.15s ease; }
.fw-step:hover { border-color: var(--teal); color: var(--navy); }
.fw-step .fw-num { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--panel); color: var(--gray); font-size: 0.76rem; }
.fw-step.is-active { color: #fff; background: var(--navy); border-color: var(--navy); }
.fw-step.is-active .fw-num { background: rgba(255,255,255,0.22); color: #fff; }
.fw-caption { font-size: 0.95rem; color: #3B4556; line-height: 1.55; margin-top: 0.6rem; text-align: left; min-height: 3.1em; }
.fw-caption strong { color: var(--navy); }
.figwalk.is-paused .fw-frame::after { content: 'paused'; position: absolute; right: 0.6rem; bottom: 0.5rem; font-size: 0.75rem; color: var(--gray); background: rgba(255,255,255,0.9); border: 1px solid var(--rule); border-radius: 999px; padding: 0.1rem 0.55rem; }

/* the designs panel */
.dz-svg { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--rule); border-radius: 12px; }
.dz-rail { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.7rem 0 0.2rem 0; }
.dz-chip { font-family: var(--serif); font-size: 0.86rem; color: var(--gray); background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.dz-chip i { width: 0.85rem; height: 0.3rem; border-radius: 2px; display: inline-block; }
.dz-chip.is-on { color: var(--navy); border-color: #c8ccd2; }
.dz-chip.is-static { cursor: default; }
.dz-readout { display: grid; gap: 0.1rem; margin-top: 0.5rem; }
.dz-row { display: grid; grid-template-columns: 8rem 11rem 1fr; gap: 0.6rem; font-size: 0.9rem; color: var(--gray); padding: 0.12rem 0; }
.dz-key { font-weight: 600; }
.dz-seqcard { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.7rem; overflow-x: auto; }
.dz-seqhead { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.dz-seqtitle { font-weight: 700; color: var(--navy); }
.dz-seqnote { font-size: 0.86rem; color: var(--gray); }
.dz-grid { display: grid; gap: 2px; min-width: 21rem; align-items: center; }
.dz-label { font-size: 0.82rem; color: var(--gray); padding-right: 0.6rem; white-space: nowrap; text-align: right; }
.dz-label.dz-sub { font-size: 0.74rem; }
.dz-cell { font-family: var(--mono); font-size: 0.8rem; text-align: center; padding: 0.16rem 0; border-radius: 3px; background: #F7F8F9; color: var(--gray); }
.dz-cell.is-native { background: #fff; color: var(--navy); font-weight: 600; }
.dz-cell.is-match { background: rgba(47,179,166,0.18); color: #11695f; font-weight: 600; }
.dz-cell.is-contact { box-shadow: inset 0 -2px 0 var(--amber); }
.dz-mark { text-align: center; font-size: 0.6rem; color: var(--amber); }
.dz-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); gap: 0.7rem; margin-top: 0.9rem; }
.dz-axis { font-family: var(--serif); font-size: 11px; fill: var(--gray); }

/* a long display equation scrolls inside its box rather than widening the page */
.katex-display { overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
/* katex draws a radical with a very wide svg, so clip stray horizontal overflow at the page level;
   clip rather than hidden, so the sticky section nav keeps working */
main { overflow-x: clip; }
