:root {
  --blue: #0067ac; /* poster banner blue */
  --blue-dark: #004f86;
  --blue-soft: #e8f1f8;
  --gold: #ffd100;
  --ink: #172033;
  --muted: #4f5a6e;
  --line: #d9e1ea;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --shadow: 0 16px 40px rgba(23, 32, 51, 0.1);
  --radius: 10px;
  --header-h: 4rem;
  --max: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* clip (not hidden) so the sticky section nav keeps working */
}

body {
  margin: 0;
  padding-top: var(--header-h);
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
li {
  overflow-wrap: break-word;
}

sup,
sub {
  font-size: 0.7em;
  line-height: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--max));
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: auto;
  height: 2.6rem;
  max-width: 100%;
  object-fit: contain;
}

.pdf-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease;
}

.pdf-link:hover {
  background: var(--blue-dark);
}

.pdf-link svg,
.to-top svg {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */
main {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* ---------- Title block ---------- */
.poster-intro {
  padding: 2rem 0 1.25rem;
}

.poster-kicker,
.section-kicker {
  margin: 0 0 0.3rem;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(1.75rem, 7vw, 3.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 6vw, 2.4rem);
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.authors {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.authors sup {
  color: var(--blue);
}

.affiliations {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.affiliations summary {
  width: fit-content;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.affiliations ol {
  display: grid;
  gap: 0.2rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.affiliations sup {
  margin-right: 0.2rem;
  color: var(--blue);
  font-weight: 800;
}

/* ---------- Section nav (sticky chips) ---------- */
.section-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  display: flex;
  gap: 0.5rem;
  margin: 0 -1rem;
  padding: 0.6rem 1rem;
  overflow-x: auto;
  background: rgba(244, 247, 251, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  flex: 0 0 auto;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.section-nav a:hover,
.section-nav a.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* ---------- Sections ---------- */
.detail-section {
  scroll-margin-top: calc(var(--header-h) + 3.5rem);
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 0.75rem;
  padding-left: 0.85rem;
  border-left: 5px solid var(--blue);
}

.section-heading + h3 {
  margin-top: 1rem;
}

.bullets,
.numbered {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.bullets li,
.numbered li {
  margin: 0.3rem 0;
}

.bullets li::marker {
  color: var(--blue);
}

.numbered li::marker {
  color: var(--blue);
  font-weight: 800;
}

.bullets strong,
.numbered strong {
  color: var(--ink);
}

.hl {
  color: var(--blue);
  font-style: italic;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.equation {
  margin: 0.6rem 0 0.4rem;
  padding: 0.75rem 0.5rem;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.15rem;
}

.equation mi[mathvariant="italic"] {
  font-style: italic;
}

/* ---------- Figures ---------- */
.figure-card {
  margin: 1.5rem 0 0;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.figure-card a {
  display: block;
  cursor: zoom-in;
}

.figure-card img {
  width: 100%;
  margin: 0 auto;
  background: #fff;
}

.figure-card.narrow img {
  max-width: 440px;
}

.figure-card figcaption {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.figure-card figcaption > span {
  color: var(--ink);
  font-weight: 800;
}

.callout,
.info-card {
  margin-top: 1.5rem;
  padding: 0.25rem 1.1rem 1rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-card {
  margin-top: 0;
  border-left-color: var(--blue);
}

.callout h3,
.info-card h3 {
  margin-top: 0.9rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.references .section-heading {
  border-left-color: var(--line);
}

.ref-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.ref-list li {
  margin: 0.6rem 0;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 1.25rem 1rem 1.5rem;
}

.footer-logos img {
  width: auto;
  max-width: 13rem;
  height: 3.2rem;
  object-fit: contain;
}

.footer-logos .logo-esg {
  max-width: 16rem;
}

/* ---------- Back-to-top ---------- */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 950;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(0, 103, 172, 0.4);
  outline-offset: 3px;
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 680px) {
  :root {
    --header-h: 4.5rem;
  }

  .header-inner,
  main,
  .footer-logos {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .section-nav {
    margin: 0 -2rem;
    padding: 0.7rem 2rem;
  }

  .brand-logo {
    height: 3rem;
  }

  .poster-intro {
    padding-top: 3.5rem;
  }

  .bullets.cols-2 {
    columns: 2;
    column-gap: 2.5rem;
  }

  .bullets.cols-2 li {
    break-inside: avoid;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .figure-card {
    padding: 1.25rem;
  }

  .footer-logos img {
    height: 4rem;
  }
}

@media (min-width: 860px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .split .figure-card {
    margin-top: 1rem;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 420px) {
  .brand-logo {
    height: 2.2rem;
  }

  .pdf-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .bullets,
  .numbered {
    font-size: 0.96rem;
  }

  .figure-card {
    padding: 0.6rem;
  }

  .equation {
    font-size: 1rem;
  }
}

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

@media print {
  .site-header,
  .section-nav,
  .to-top {
    display: none;
  }

  body {
    padding-top: 0;
    background: #fff;
  }
}
