:root {
  --violet: #4b2a82;
  --violet-ink: #3a2168;
  --ink: #28282d;
  --muted: #5c5670;
  --paper: #f4f1f8;
  --line: #e3dced;
  --mint: #e7f6ee;
  --mint-line: #8dccaa;
  --mint-ink: #1b6b44;
  --gold: #e0b03a;
  --card: #ffffff;
  --shadow: 0 12px 32px rgba(75, 42, 130, 0.07);
  --max: 1120px;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --display: "Outfit", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.question, section[id] { scroll-margin-top: 4.25rem; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

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

a { color: var(--violet); }

a:hover { color: var(--violet-ink); }

h1, h2, h3, .stat b, .fact b, .nav-links, .brand, .btn, caption {
  font-family: var(--display);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  color: var(--violet);
  padding: 0.45rem 0.7rem;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.hero {
  background: var(--violet);
  color: white;
  box-shadow: inset 0 -5px 0 var(--gold);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 2.1rem;
}

.hero-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.hero-logos img { height: 64px; width: auto; max-width: 42%; }

.kicker {
  margin: 0 0 0.45rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 auto 0.45rem;
  max-width: min(18em, 100%);
  text-align: center;
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.deck {
  margin: 0 auto 1.15rem;
  max-width: 36rem;
  text-align: center;
  text-wrap: balance;
  font-size: 1.22rem;
  font-weight: 600;
}

.authors, .affil, .event {
  margin: 0;
  text-align: center;
}

.authors { font-weight: 700; font-size: 1.08rem; }

.affil, .event { color: rgba(255, 255, 255, 0.88); }

.affil { margin-top: 0.15rem; font-size: 0.98rem; }

.event { margin-top: 0.85rem; font-size: 0.95rem; }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid white;
  color: white;
  text-decoration: none;
  font-weight: 650;
  background: transparent;
}

.btn:hover { background: white; color: var(--violet); }

.btn-solid { background: white; color: var(--violet); }

.btn-solid:hover { background: var(--gold); color: var(--violet-ink); border-color: var(--gold); }

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  color: var(--violet);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-weight: 700;
  color: var(--violet);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.95rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--violet-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 0.2em; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 3rem;
}

.question, .panel, .stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.question {
  margin: 0 0 1.25rem;
  padding: 1.05rem 1.25rem 1.1rem;
  border-left: 6px solid var(--violet);
}

.question p { margin: 0.35rem 0 0; }

.eyebrow {
  margin: 0;
  color: var(--violet);
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.stack {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: minmax(0, 1fr);
}

.stack > *,
.grid-2 > *,
.panel,
.table-wrap,
.figure,
.zoom {
  min-width: 0;
}

.stack,
.grid-2,
.panel,
.figure,
.table-wrap,
.zoom,
.stats,
.steps,
.hero-inner,
.nav-inner {
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.panel {
  overflow: hidden;
  max-width: 100%;
}

.panel h2 {
  margin: 0;
  padding: 0.78rem 1.15rem;
  background: var(--violet);
  color: white;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.panel .body { padding: 1.05rem 1.2rem 1.25rem; }

.panel h3 {
  margin: 1.15rem 0 0.45rem;
  color: var(--violet);
  font-size: 1.18rem;
  line-height: 1.3;
}

.panel h3:first-child { margin-top: 0; }

.panel ul, .panel ol { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.panel li + li { margin-top: 0.45rem; }

.lead { margin-top: 0; font-weight: 650; }

.steps, .facts, .stats, .map-labels {
  display: grid;
  gap: 0.75rem;
}

.steps, .facts, .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step {
  background: var(--mint);
  border: 1.5px solid var(--mint-line);
  color: var(--mint-ink);
  border-radius: 14px;
  padding: 0.85rem 0.8rem 0.95rem;
  text-align: center;
}

.step strong {
  display: block;
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
  font-size: 0.92rem;
}

.step span { display: block; }

.figure { margin: 0.8rem 0 0; }

.zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
}

.zoom img { display: block; width: 100%; height: auto; }

.figure figcaption, .note {
  color: var(--ink);
}

.figure figcaption {
  margin-top: 0.55rem;
  text-align: center;
  font-weight: 650;
  color: var(--violet);
}

.facts { margin-top: 0.85rem; }

.fact {
  text-align: center;
  padding: 0.35rem 0.4rem 0;
}

.fact b {
  display: block;
  color: var(--violet);
  font-size: 1.02rem;
}

.fact span { color: var(--muted); font-size: 0.96rem; }

.stats { margin: 0 0 1.15rem; }

.stat { padding: 0.9rem 1rem 1rem; box-shadow: none; }

.stat b {
  display: block;
  color: var(--violet);
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat em { font-style: normal; font-weight: 700; }

.stat.gain {
  background: var(--mint);
  border-color: var(--mint-line);
}

.stat.gain b, .stat.gain em { color: var(--mint-ink); }

.map-labels {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0.9rem 0 0.35rem;
  color: var(--violet);
  font-family: var(--display);
  font-weight: 650;
  text-align: center;
  font-size: 0.98rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.3rem;
  border-radius: 2px;
  vertical-align: -1px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.note { margin: 0.8rem 0 0; }

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 0.35rem;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: top;
  margin: 0 0 0.55rem;
  color: var(--violet);
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}

th, td { padding: 0.48rem 0.7rem; text-align: center; }

thead th {
  background: var(--violet);
  color: white;
  font-weight: 650;
}

tbody th {
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}

td { border-bottom: 1px solid #efeaf6; }

.name, th:first-child { text-align: left; }

tr.best th,
tr.best td { background: var(--mint); font-weight: 700; }

tr.summary td { font-weight: 700; background: #f7f4fb; }

.group {
  font-weight: 700;
  background: #f7f4fb;
  text-align: left;
}

.refs { margin: 0; padding-left: 1.4rem; }

.refs li { padding-left: 0.2rem; }

.refs li + li { margin-top: 0.55rem; }

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.contact p { margin: 0.2rem 0; }

.qr-link { display: block; line-height: 0; }

.qr-link img {
  width: 148px;
  height: 148px;
  background: white;
}

.scan { margin-top: 0.8rem !important; color: var(--violet); font-weight: 700; }

.footer {
  background: var(--violet);
  color: white;
  text-align: center;
  padding: 1.15rem 1.25rem 1.3rem;
  box-shadow: inset 0 5px 0 var(--gold);
}

.footer p { margin: 0.2rem 0; }

.footer a { color: white; }

.slogan {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.03em;
}

#lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}

#lightbox::backdrop { background: rgba(18, 10, 28, 0.86); }

#lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 88vh;
  margin: 0 auto;
  background: white;
}

#lightbox form { text-align: right; margin-bottom: 0.4rem; }

#lightbox button {
  background: white;
  color: var(--violet);
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .grid-2, .steps, .facts, .stats { grid-template-columns: minmax(0, 1fr); }
  .map-labels { font-size: 0.78rem; }
  .hero-logos img { height: 48px; max-width: 42vw; }
  .contact { grid-template-columns: 1fr; }
  h1 { font-size: 1.55rem; }
  .deck { font-size: 1.05rem; }
}

@media (max-width: 760px) {
  .panel h2 { font-size: 0.95rem; letter-spacing: 0.02em; }
  .nav-burger { display: inline-block; }
  .nav-links {
    display: none;
    width: 100%;
    margin-left: 0;
    padding-bottom: 0.4rem;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-inner { flex-wrap: wrap; }
}

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

@media print {
  .nav, .hero-actions, .skip, #lightbox { display: none !important; }
  body { background: white; }
  .panel, .question, .stat { box-shadow: none; break-inside: avoid; }
  .hero, .panel h2, th, .footer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
