:root {
  --text: #1f2933;
  --muted: #5c6672;
  --line: #d9dee7;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --accent: #0f66c2;
  --accent-2: #ec6a1f;
  --max: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.66;
  font-size: 17px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}
.hero-container { max-width: 1100px; }
.center { text-align: center; }

.hero {
  padding: 68px 0 42px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}
.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 800;
}
h2 {
  font-size: clamp(27px, 3.2vw, 36px);
  line-height: 1.16;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 23px;
  line-height: 1.25;
  margin: 48px 0 12px;
}
h4 {
  font-size: 19px;
  line-height: 1.25;
  margin: 34px 0 12px;
}
p {
  margin: 0 0 18px;
}
.authors {
  margin: 12px auto 4px;
  font-size: 19px;
}
.affiliations {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}
.lead {
  font-size: 20px;
  line-height: 1.55;
  color: #303a46;
  max-width: 980px;
  margin: 24px auto 30px;
}
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.links a {
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 15px;
  border-radius: 999px;
  background: #fff;
}
.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.section {
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}
.section.alt { background: var(--soft); }
.section-intro {
  width: 100%;
  margin: 0 0 30px;
  color: #374151;
  font-size: 18px;
}

.hero-video,
.video-placeholder {
  width: min(900px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
  margin: 22px auto 24px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.hero-video video {
  display: block;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  margin: -1px;
  object-fit: cover;
  background: #f8fafc;
}
.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.hero-video strong,
.video-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  margin-bottom: 6px;
}
.hero-video span,
.video-placeholder span {
  display: block;
  font-size: 15px;
}

#abstract p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.metric-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 44px;
  border: 1px solid #d4dde7;
  background: #f7fafc;
}
.metric-card {
  min-height: 150px;
  padding: 26px 28px 24px;
  border-right: 1px solid #d4dde7;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.metric-card:last-child { border-right: none; }
.metric-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #164b4f;
  margin-bottom: 12px;
}
.metric-label {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #5a6673;
}

.figure-card {
  width: 100%;
  margin: 24px 0 34px;
}
.figure {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}
.figure.frame {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.figure.rounded {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.caption {
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 9px auto 0;
  text-align: center;
}

.figure-row {
  display: grid;
  width: 100%;
  gap: 26px;
  align-items: start;
  margin: 24px 0 38px;
}
.figure-row.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.figure-row .figure-card {
  margin: 0;
}

.background-summary {
  width: 100%;
  margin-top: 34px;
}
.text-block p:first-of-type { margin-top: 0; }
.clean-list,
.module-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.clean-list li,
.module-list li {
  position: relative;
  margin: 14px 0;
  padding: 15px 18px 15px 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: #fff;
}
.module-list {
  width: 100%;
  margin-top: 24px;
}

#results .section-intro + h3 { margin-top: 28px; }
#results .metric-grid + h3 { margin-top: 0; }
.table-wrap + h3,
.figure-row + h3 {
  margin-top: 58px;
}
#results h3 {
  scroll-margin-top: 30px;
}

.table-wrap {
  width: 100%;
  margin: 18px 0 34px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
  vertical-align: middle;
}
th {
  background: #f0f4f8;
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }
.compact-table th,
.compact-table td {
  font-size: 14px;
}

.callout {
  width: 100%;
  border-left: 5px solid var(--accent);
  background: #eef6ff;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 24px 0 0;
}

pre {
  width: 100%;
  background: #111827;
  color: #f3f4f6;
  padding: 22px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.55;
  margin: 18px 0 0;
}
footer {
  padding: 34px 0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
}
footer p { margin: 0; }

@media (min-width: 900px) {
  .title-line { white-space: nowrap; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .container { width: min(var(--max), calc(100% - 32px)); }
  .hero { padding: 54px 0 34px; }
  .section { padding: 48px 0; }
  .lead { font-size: 18px; }
  .figure-row.two-up { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:nth-child(2) { border-right: none; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid #d4dde7; }
  th, td { font-size: 14px; }
  .compact-table th, .compact-table td { font-size: 13px; }
  table { min-width: 760px; }
  .figure.frame, .figure.rounded { padding: 8px; }
}

@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { border-right: none; border-bottom: 1px solid #d4dde7; }
  .metric-card:last-child { border-bottom: none; }
}


.figure-carousel {
width: 100%;
overflow-x: auto;
overflow-y: hidden;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
border: 1px solid var(--border);
border-radius: 18px;
background: var(--card-bg);
padding: 18px;
margin-top: 18px;
margin-bottom: 34px;
}

.carousel-track {
display: flex;
gap: 18px;
}

.carousel-slide {
flex: 0 0 100%;
scroll-snap-align: center;
margin: 0;
}

.figure-carousel .figure {
width: 100%;
display: block;
}

.figure-carousel .caption {
text-align: center;
margin-top: 12px;
}

.figure-carousel::-webkit-scrollbar {
height: 8px;
}

.figure-carousel::-webkit-scrollbar-thumb {
background: rgba(20, 78, 82, 0.28);
border-radius: 999px;
}

.figure-carousel::-webkit-scrollbar-track {
background: rgba(20, 78, 82, 0.08);
border-radius: 999px;
}


.results-gallery {
width: 100%;
margin: 24px 0 42px;
padding: 18px;
border: 1px solid var(--line);
border-radius: 18px;
background: #fff;
overflow: hidden;
}

.gallery-topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px;
}

.gallery-label {
font-size: 15px;
line-height: 1.4;
font-weight: 700;
color: var(--ink);
}

.gallery-controls {
display: flex;
align-items: center;
gap: 8px;
}

.gallery-nav {
width: 34px;
height: 34px;
border: 1px solid var(--line);
border-radius: 999px;
background: #f7f9fb;
color: var(--ink);
font-size: 24px;
line-height: 1;
cursor: pointer;
}

.gallery-nav:hover {
background: #eef4f5;
}

.gallery-track {
display: flex;
gap: 18px;
width: 100%;
overflow-x: auto;
overflow-y: hidden;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
padding-bottom: 8px;
}

.gallery-slide {
flex: 0 0 100%;
scroll-snap-align: start;
}

.gallery-pair {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 22px;
align-items: start;
}

.results-gallery .figure-card {
margin: 0;
}

.results-gallery .figure {
width: 100%;
display: block;
}

.results-gallery .caption {
text-align: center;
margin-top: 10px;
}

.gallery-dots {
display: flex;
justify-content: center;
gap: 9px;
margin-top: 14px;
}

.gallery-dot {
min-width: 30px;
height: 28px;
padding: 0 10px;
border: 1px solid var(--line);
border-radius: 999px;
background: #f7f9fb;
color: var(--muted);
font-size: 13px;
font-weight: 700;
cursor: pointer;
}

.gallery-dot.is-active {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}

.results-gallery + h3 {
margin-top: 58px;
}

@media (max-width: 820px) {
.results-gallery {
padding: 14px;
}

.gallery-pair {
grid-template-columns: 1fr;
gap: 18px;
}

.gallery-topbar {
align-items: flex-start;
}
}
