/* Code2RSI adaptation of the PINE project page. */
:root {
  --red: #8c0000;
  --red-dark: #641010;
  --red-soft: #faf3f3;
  --text: #28262a;
  --mute: #68636a;
  --line: #e9dfe0;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; background: #fff; }
body { margin: 0; font-family: var(--font); color: var(--text); line-height: 1.7; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
strong { color: inherit; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 30; padding: 10px 18px; background: #fff; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.97); border-top: 4px solid var(--red); border-bottom: 1px solid var(--line); }
.site-nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; }
.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.7px; color: var(--red-dark); white-space: nowrap; }
.wordmark span { color: var(--red); }
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--mute); }
.nav-links a:hover { color: var(--red); }
.hero { background: linear-gradient(180deg, #fcf6f6, #fff 85%); }
.hero-body { padding: 58px 24px 35px; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .16em; margin-bottom: 20px; }
.publication-title { color: var(--text); letter-spacing: -.035em; line-height: 1.2; font-weight: 750; }
.project-name { display: block; font-size: clamp(45px, 6vw, 66px); color: var(--red); letter-spacing: -.05em; margin-bottom: 14px; }
.title-rest { display: block; font-size: clamp(27px, 3.3vw, 39px); }
.publication-authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 23px; font-size: 18px; font-weight: 500; margin-top: 28px; }
.author-block { display: inline-block; white-space: nowrap; }
sup { color: var(--red); font-size: .65em; margin-left: 2px; }
.publication-affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; margin-top: 8px; font-size: 15px; }
.publication-affiliations span { white-space: nowrap; }
.publication-affiliations sup { margin-right: 4px; }
.publication-notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; margin-top: 6px; font-size: 13px; }
.publication-notes span { white-space: nowrap; }
.publication-notes sup { margin-right: 3px; }
.publication-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.publication-links .button { height: auto; padding: 9px 20px; border: 1px solid #d9b9bc; border-radius: 7px; background: #fff; color: var(--red); font-size: 15px; font-weight: 600; transition: background .15s; }
.publication-links .button[disabled] { opacity: 1; cursor: default; }
.publication-links a.button:hover { background: var(--red-soft); color: var(--red); }
.teaser { padding: 4px 24px 44px; }
figure { margin: 0; }
.paper-figure { width: 100%; height: auto; display: block; margin: 0 auto; }
.teaser-image { border-radius: 10px; }
.figure-link { display: block; }
.teaser-caption { max-width: 850px; margin: 18px auto 0; text-align: center; font-size: 17px; color: var(--mute); }
.teaser-caption strong { color: var(--red-dark); }
.section { padding: 52px 24px; border-top: 1px solid var(--line); }
.title { font-family: var(--font); }
.section h2.title { color: var(--red-dark); text-align: center; font-size: 29px; font-weight: 700; letter-spacing: -.025em; margin-bottom: 28px; }
.section h2.title::after { content: ''; display: block; width: 44px; height: 3px; background: var(--red); margin: 14px auto 0; border-radius: 2px; }
.abstract-card { max-width: 850px; margin: auto; padding: 26px 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--red-soft); text-align: justify; }
.abstract-card p + p { margin-top: 15px; }
.abstract-card strong { color: var(--red); }
figcaption:not(.method-caption), .figure-caption { font-size: 14px; color: var(--mute); line-height: 1.65; margin-top: 17px; }
figcaption:not(.method-caption) strong, .figure-caption strong { color: var(--text); }
.section-intro { text-align: center; color: var(--mute); margin: -9px auto 32px; max-width: 720px; }
.method-document { max-width: 920px; margin: 0 auto; }
.diagram-scroll { overflow-x: auto; }
.diagram { display: block; width: 100%; min-width: 820px; height: auto; color: var(--text); }
.diagram text { font-family: var(--font); fill: currentColor; }
.diagram .node { fill: #fff; stroke: currentColor; stroke-width: 1.2; }
.diagram .flow { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; marker-end: url(#arrow); }
.diagram .node-title { font-size: 17px; font-weight: 600; text-anchor: middle; }
.diagram .detail { font-size: 16px; text-anchor: middle; fill: var(--mute); }
.diagram .loop { font-size: 15px; font-weight: 700; letter-spacing: .06em; fill: var(--red-dark); }
.diagram .annotation { font-size: 16px; fill: var(--mute); }
.method-caption { margin: 16px 0 0; font-size: 16px; line-height: 1.7; text-align: left; }
.scroll-hint { display: none; margin: 0 0 8px; color: var(--mute); font-size: 14px; }
.coverage { margin-top: 24px; border: 1px solid var(--text); border-radius: 5px; overflow: hidden; }
.coverage h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--red-dark); }
.coverage-domains { display: grid; grid-template-columns: 1fr 1fr; }
.coverage-domains > section { padding: 10px 22px; }
.coverage-domains > section + section { border-left: 1px solid var(--text); }
.coverage ul { list-style: none; margin: 0; padding: 0; color: var(--mute); }
.coverage-platforms { padding: 10px 22px; border-top: 1px solid var(--text); }
.coverage-platforms > p { margin: 10px 0 0; color: var(--mute); }
.coverage dl { display: grid; grid-template-columns: 100px 1fr; gap: 6px 14px; margin: 0; }
.coverage dt { font-weight: 600; }
.coverage dd { margin: 0; color: var(--mute); }
.coverage .name { display: inline-block; }
.simulator-frame, .model-frame { display: block; width: 100%; border: 0; }
.simulator-frame { margin-top: 28px; }
.results-section > .container > .eyebrow { margin-bottom: 10px; }
.task { padding: 38px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.task:last-child { padding-bottom: 0; }
.task-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.task h3, #model-heading, .comparison-section-heading h2 { font-family: var(--font); color: var(--red-dark); font-size: 24px; font-weight: 650; line-height: 1.7; letter-spacing: -.025em; }
.results-section:nth-child(2 of .results-section) { background: #fdfafa; }
.beyond-section .figure-link { background: #fff; }
.footer { background: #fff; border-top: 1px solid var(--line); text-align: center; padding: 38px 24px; }
.footer p { font-size: 14px; margin-top: 7px; color: var(--mute); }
.footer .template-credit { margin-top: 17px; font-size: 12px; }
@media (max-width: 768px) {
  .site-nav { min-height: 61px; padding: 8px 18px; gap: 12px; }
  .wordmark { font-size: 19px; }
  .nav-links { gap: 13px; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-links a:first-child { display: none; }
  .hero-body { padding: 38px 20px 28px; }
  .eyebrow { font-size: 10px; letter-spacing: .11em; }
  .desktop-break { display: none; }
  .publication-authors { font-size: 16px; gap: 6px 15px; }
  .publication-affiliations { font-size: 14px; }
  .publication-affiliations span { white-space: normal; }
  .publication-notes { font-size: 12px; }
  .publication-links .button { font-size: 14px; padding: 8px 13px; }
  .teaser { padding: 0 18px 32px; }
  .teaser-caption { font-size: 15px; }
  .section { padding: 36px 18px; }
  .section h2.title { font-size: 26px; }
  .abstract-card { padding: 20px; }
  .task-heading { display: block; }
  .task { padding-top: 28px; padding-bottom: 28px; }
}
@media (max-width: 600px) {
  .coverage-domains { grid-template-columns: 1fr; }
  .coverage-domains > section + section { border-left: 0; border-top: 1px solid var(--text); }
  .coverage dl { grid-template-columns: 1fr; gap: 2px; }
  .coverage dd + dt { margin-top: 8px; }
}
@media (max-width: 819px) { .scroll-hint { display: block; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.publication-links { margin-top: 26px; }
.video-browser { margin-top: 24px; }
.video-selector { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.selector-label { flex: 0 0 46px; color: var(--mute); font-size: 14px; font-weight: 600; padding-top: 8px; }
.selector-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.selector-buttons button { font: inherit; font-size: 14px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--mute); cursor: pointer; transition: background .15s; }
.selector-buttons button:hover { background: var(--red-soft); color: var(--red); }
.selector-buttons button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.selector-buttons button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.video-grid.two-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; position: relative; }
.case-comparison::after { content: ''; position: absolute; left: calc(50% - 1px); top: 0; bottom: 0; width: 2px; background: var(--red-dark); }
.case-group { min-width: 0; }
.case-group h4, .nitrogen-case > figcaption { font-size: 16px; font-weight: 600; }
.case-group .video-grid { gap: 10px; margin-top: 14px; }
.video-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.video-card figcaption { padding: 12px 14px; margin: 0; font-size: 14px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
.video-card.generated { border-color: #d5aaaa; }
.video-card.generated figcaption { background: var(--red-soft); color: var(--red); }
.video-frame { aspect-ratio: 16 / 10; background: #f5f5f6; display: grid; place-items: center; }
.video-frame video { display: block; width: 100%; height: 100%; min-height: 0; aspect-ratio: 16 / 10; object-fit: contain; background: #161416; }
.video-frame video[hidden] { display: none; }
.nitrogen-intro { margin-top: 30px; }
.nitrogen-intro h4 { font-size: 20px; font-weight: 650; }
.nitrogen-intro p { color: var(--mute); font-size: 16px; }
.nitrogen-case { margin-top: 20px; }
.nitrogen-case figcaption { margin: 0 0 12px; line-height: 1.7; color: var(--text); }
.nitrogen-case-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: calc(100% * 8 / 1456); text-align: center; font-size: clamp(11px, 2vw, 14px); font-weight: 600; padding: 10px 0; background: #fff; border: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.nitrogen-case-labels span:nth-child(n+2) { color: var(--red); }
.nitrogen-case video { display: block; width: 100%; height: auto; background: #161416; border-radius: 0 0 8px 8px; }
.nitrogen-more { margin-top: 24px; font-size: 14px; font-weight: 600; color: var(--mute); }
.game-strip { padding: 4% 0; overflow: hidden; }
.game-strip:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.game-strip-track { position: relative; display: flex; gap: 0; will-change: transform; }
.game-pair { position: relative; display: flex; flex: 0 0 50%; min-width: 0; margin: 0; aspect-ratio: 32 / 10; transform-origin: center; transition: transform .18s ease, box-shadow .18s ease; }
.game-pair img { display: block; width: 50%; height: auto; aspect-ratio: 16 / 10; }
.game-pair.is-loading::after { content: 'Loading…'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 3px 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; pointer-events: none; }
.game-pair.is-highlighted { z-index: 2; transform: translateX(var(--highlight-shift, 0px)) scale(1.5); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.game-label { position: absolute; bottom: 10px; transform: translateX(-50%); padding: 3px 14px; border-radius: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; pointer-events: none; }
.game-label-real { left: 25%; }
.game-label-sim { left: 75%; }
@media (prefers-reduced-motion: reduce) { .game-strip { overflow-x: auto; } }
.video-empty { font-size: 14px; color: var(--mute); text-align: center; padding: 16px; }
@media (max-width: 768px) {
  .video-grid, .video-grid.two-videos { grid-template-columns: 1fr; gap: 14px; }
  #real2sim .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-comparison { grid-template-columns: 1fr; gap: 24px; }
  .case-comparison::after { display: none; }
  .case-group .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-selector { gap: 10px; }
  .selector-buttons { gap: 6px; }
  .selector-buttons button { font-size: 14px; padding: 7px 10px; }
}
