:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --fg: #1c2433;
  --muted: #5b6678;
  --accent: #2c5fb8;
  --accent-dark: #1d427e;
  --border: #e2e8f0;
  --best: #eaf3ff;
  --maxw: 1080px;
  --maxw-narrow: 800px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--maxw-narrow); }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(160deg, #1d427e 0%, #2c5fb8 55%, #3d7fd6 100%);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}
.hero .title {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  font-weight: 400;
  margin: 0 auto 28px;
  max-width: 760px;
  opacity: 0.95;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}
.authors a { color: #fff; font-weight: 500; }
.authors sup { opacity: 0.85; font-size: 0.7em; }

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  font-size: 0.98rem;
  opacity: 0.92;
  margin-bottom: 32px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.28);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  border: 1px solid rgba(255,255,255,0.25);
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn:hover {
  background: rgba(0,0,0,0.45);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn .icon { font-size: 1.05em; line-height: 1; }

/* ---------- SECTIONS ---------- */
.section { padding: 52px 0; }
.section.alt { background: var(--bg-alt); }
.teaser-section { padding: 40px 0; }

h2 {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 28px;
  color: var(--fg);
}
h3 {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 10px;
  color: var(--accent);
}

p { margin: 0 0 16px; }

/* ---------- FIGURES ---------- */
figure { margin: 0; text-align: center; }
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(20, 40, 80, 0.12);
}
figcaption {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 14px;
  text-align: left;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- TLDR ---------- */
.tldr {
  font-size: 1.12rem;
  text-align: center;
  color: var(--fg);
}

/* ---------- CARDS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(20, 40, 80, 0.04);
}
.section.alt .card { background: #fff; }
.card h3 { margin-top: 0; font-size: 1.08rem; }
.card p { margin-bottom: 0; font-size: 0.98rem; color: #2c3647; }

/* ---------- TABLES ---------- */
.table-wrap { overflow-x: auto; margin: 14px 0 8px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
th {
  background: #1d427e;
  color: #fff;
  font-weight: 600;
}
td:first-child, th:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: none; }
tr.best { background: var(--best); font-weight: 700; }
tr.best td { color: var(--accent-dark); }
.caption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------- CODE ---------- */
pre {
  background: #11203b;
  color: #e8eefb;
  padding: 20px 22px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}
code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }

/* ---------- FOOTER ---------- */
.footer {
  padding: 32px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .authors { font-size: 0.95rem; }
}
