:root {
  --bg: #ffffff;
  --surface: #f7f7f9;
  --text: #1a1a1e;
  --muted: #5c5c66;
  --line: #e3e3e8;
  --accent: #d9663a;      /* the orange from the BCS renders */
  --accent-2: #3a7bd9;    /* the blue from the unblended patches */
  --code-bg: #1c1f26;
  --code-text: #e6e9ef;
  --maxw: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317;
    --surface: #1a1c22;
    --text: #ececf1;
    --muted: #a2a2ad;
    --line: #2a2c34;
    --accent: #e8794f;
    --accent-2: #6fa2f0;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 24px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.venue {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 14px;
}
.title {
  font-size: clamp(30px, 6vw, 50px);
  line-height: 1.08;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.subtitle {
  font-size: clamp(17px, 3vw, 22px);
  color: var(--muted);
  font-weight: 500;
  margin: 12px 0 28px;
}
.authors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  padding: 0;
  margin: 0 0 4px;
}
.authors .author { font-size: 19px; font-weight: 600; }
.affil { color: var(--muted); margin: 4px 0 26px; font-size: 15px; }

.hero-top {
  display: flex;
  align-items: center;
  gap: 40px;
  text-align: left;
}
.hero-text { flex: 1 1 420px; min-width: 0; }
.hero-top .authors,
.hero-top .links { justify-content: flex-start; }

.hero-figure {
  flex: 0 0 300px;
  max-width: 300px;
  margin: 0;
}
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.hero-caption {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  text-align: left;
}
.hero-caption b { color: var(--text); }

@media (max-width: 780px) {
  .hero-top { flex-direction: column; text-align: center; }
  .hero-top .authors,
  .hero-top .links { justify-content: center; }
  .hero-figure { flex: 0 0 auto; max-width: 100%; width: 100%; }
  .hero-caption { text-align: center; }
}

.links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-disabled {
  background: var(--surface); color: var(--muted);
  border: 1px dashed var(--line); cursor: not-allowed;
}

/* ---------- Sections ---------- */
section { padding: 44px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
h2 {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
h3 { font-size: 20px; margin: 40px 0 14px; }
p { margin: 0 0 16px; }
.lead { color: var(--muted); font-size: 16px; }

/* ---------- Figures ---------- */
figure { margin: 0 0 12px; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
figcaption {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 12px;
  padding: 0 4px;
}
figcaption b { color: var(--text); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 8px;
}
.two-col + figure { margin-top: 28px; }
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Contributions ---------- */
.contrib { counter-reset: c; list-style: none; padding: 0; margin: 0; }
.contrib li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px 16px 56px;
  margin-bottom: 14px;
  font-size: 16px;
}
.contrib li::before {
  counter-increment: c;
  content: counter(c);
  position: absolute;
  left: 16px; top: 16px;
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { caption-side: top; text-align: left; color: var(--muted); font-size: 14px; margin-bottom: 12px; line-height: 1.5; }
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface); font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.group th {
  background: transparent;
  color: var(--accent);
  font-style: italic;
  font-weight: 700;
  padding-top: 18px;
  border-bottom: 2px solid var(--accent);
}
tbody tr:not(.group):hover { background: var(--surface); }

/* ---------- BibTeX ---------- */
.bib-box { position: relative; }
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 22px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}
.copy-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease;
}
.copy-btn:hover { background: rgba(255,255,255,.24); }
.copy-btn.copied { background: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 60px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
