/* ============================================================ Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, object { max-width: 100%; display: block; }
a { color: #0d68b1; text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================ Hero */
.hero {
  background:
    radial-gradient(ellipse at top left, rgba(56, 189, 248, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at top right, rgba(129, 140, 248, 0.20) 0%, transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 72px 0 56px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}
.hero__icon {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 18px;
  object-fit: contain;
}
.hero__title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #0f172a 0%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #475569;
  margin: 0 auto 28px;
  max-width: 760px;
  font-weight: 500;
}
.hero__authors {
  font-size: 1.05rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 12px;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.85;
}
.author {
  display: inline;
  white-space: nowrap;
}
.author.eq   { border-bottom: 2px dotted #0d68b1; }
.author.lead { font-weight: 700; color: #0f172a; }
.author.corr::after {
  content: "✉";
  font-size: 0.75em;
  margin-left: 2px;
  color: #b45309;
  vertical-align: super;
}
.author sup { font-weight: 500; color: #64748b; }

.hero__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 8px 0 18px;
  font-size: 0.82rem;
  color: #64748b;
}
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.legend__dot--eq   { background: transparent; border: 2px dotted #0d68b1; }
.legend__dot--lead { background: #0f172a; }
.legend__dot--corr { background: #b45309; }

.hero__affil {
  color: #64748b;
  font-size: 0.92rem;
  margin-bottom: 32px;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.hero__affil sup { color: #0d68b1; font-weight: 600; }
.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============================================================ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #1f2937;
  color: #ffffff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover {
  background: #0d68b1;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn__icon { font-size: 1.1rem; }

/* ============================================================ Strip / stats */
.strip {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 44px 0;
}
.strip__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.stat { text-align: center; }
.stat__num {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fbbf24;
}
.stat__unit {
  font-size: 1.3rem;
  color: #cbd5e1;
  margin-left: 3px;
  font-weight: 600;
}
.stat__label {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-top: 8px;
}

/* ============================================================ Sections */
.section {
  padding: 64px 0;
}
.section--alt {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  color: #0f172a;
  position: relative;
  padding-bottom: 12px;
}
.section__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0d68b1, #38bdf8);
  border-radius: 2px;
  position: absolute;
  bottom: 0;
  left: 0;
}
.subsec {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: #1e293b;
}
.prose {
  font-size: 1.06rem;
  color: #334155;
  max-width: 900px;
}

/* ============================================================ Findings */
.finding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.finding {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.finding__badge {
  display: inline-block;
  padding: 4px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}
.finding__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #0f172a;
}
.finding p { margin: 0; color: #475569; font-size: 0.98rem; }

/* ============================================================ Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0 12px;
}
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0d68b1;
  border-radius: 8px;
  padding: 20px;
}
.card__step {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #0d68b1;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
}
.card p {
  margin: 0;
  color: #475569;
  font-size: 0.97rem;
}

/* ============================================================ Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}
.chip {
  padding: 7px 14px;
  background: #e0f2fe;
  color: #075985;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============================================================ Tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #ffffff;
}
.tbl caption {
  padding: 12px 16px;
  text-align: left;
  color: #475569;
  font-size: 0.9rem;
  caption-side: top;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.tbl th, .tbl td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}
.tbl th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr:hover { background: #f8fafc; }
.tbl .b { font-weight: 700; color: #065f46; }
.tbl .u { font-weight: 600; text-decoration: underline; text-decoration-color: #94a3b8; text-underline-offset: 3px; }
.tbl__group td {
  background: #f1f5f9;
  font-style: italic;
  font-weight: 600;
  color: #475569;
  text-align: left !important;
}
.tbl__ours { background: #ecfdf5 !important; }
.tbl__ours:hover { background: #d1fae5 !important; }
.tbl__best { background: #dbeafe !important; }
.tbl__best:hover { background: #bfdbfe !important; }
.tbl__legend {
  margin: 8px 4px 0;
  font-size: 0.85rem;
  color: #64748b;
}
.tbl--compact th, .tbl--compact td { padding: 8px 10px; }

/* ============================================================ Figures */
.figure {
  margin: 30px 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.figure object, .figure img {
  width: 100%;
  display: block;
}
/* Constrain the vertical footprint of oversized figures so they don't
   dominate the viewport. The image is centred and scaled down to fit. */
.figure--constrained {
  text-align: center;
  padding: 12px;
  background: #fafafa;
}
.figure--constrained img {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 0 auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .figure--constrained img { max-height: 340px; }
}
.figure__caption {
  padding: 12px 18px;
  font-size: 0.9rem;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  font-style: italic;
}
.figure__fallback {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

/* ============================================================ Insights */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0 12px;
}
.insight {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.insight:hover {
  border-color: #0d68b1;
  transform: translateY(-1px);
}
.insight__num {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d68b1, #38bdf8);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}
.insight__body { flex: 1; min-width: 0; }
.insight__body h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.35;
}
.insight__body p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ============================================================ Deltas */
.deltas { margin: 20px 0 8px; max-width: 720px; }
.delta { margin-bottom: 14px; }
.delta__base {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 6px;
}
.delta__bar {
  background: #f1f5f9;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
}
.delta__fill {
  height: 100%;
  background: linear-gradient(90deg, #0d68b1, #38bdf8);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 6px 0 0 6px;
}
.delta__fill--best {
  background: linear-gradient(90deg, #059669, #10b981);
}

/* ============================================================ Resources */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.resource {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #1f2937 !important;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.resource:hover {
  text-decoration: none;
  border-color: #0d68b1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 104, 177, 0.08);
}
.resource__icon { font-size: 1.8rem; }
.resource__title { font-weight: 700; font-size: 1rem; color: #0f172a; }
.resource__meta { font-size: 0.85rem; color: #64748b; }

/* ============================================================ BibTeX */
.bibtex {
  background: #0f172a;
  color: #e2e8f0;
  padding: 22px 24px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 20px 0 0;
}
.bibtex code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ============================================================ Footer */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 30px 0;
  text-align: center;
  font-size: 0.9rem;
}
.footer a { color: #93c5fd; }
.footer__thanks {
  color: #64748b;
  font-size: 0.82rem;
  margin: 8px 0 0;
}

/* ============================================================ Responsive */
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .section__title { font-size: 1.6rem; }
  .stat__num { font-size: 2rem; }
  .tbl th, .tbl td { padding: 6px 8px; font-size: 0.82rem; }
}
