:root {
  --text:     #333333;
  --heading:  #1d3359;
  --title:    #121212;
  --muted:    #6b6b6b;
  --rule:     #e3e3e3;
  --bg:       #ffffff;
  --accent:   #1d3359;
  --pill-bg:  #1a1a1a;
  --pill-fg:  #ffffff;
  --code-bg:  #fbfcfd;

  --pad:  1.5rem;
  --w-page: min(1170px, 94vw);

  --fig-inset:    880px;
  --fig-inset-sm: 720px;
  --fig-max-h:    max(48vh, 660px);
  --split-gap:    2.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

img, video { max-width: 100%; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--pill-bg); color: var(--pill-fg); padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { padding: 3rem 0 0; }
section > .container > *:last-child { margin-bottom: 0; }
.refs > p:last-child { margin-bottom: 0; }

h2 {
  font-size: 1.529rem;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: normal;
  color: var(--heading);
  text-align: center;
  margin: 0 0 1.15rem;
}
section > .container > h2 {
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}

h3 {
  font-size: 1.03rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: normal;
  color: var(--heading);
  margin: 2.25rem 0 .75rem;
}
h2 + h3 { margin-top: 0; }

p { margin: 0 0 1.5rem; text-wrap: pretty; }

em { font-style: italic; }
strong { font-weight: 500; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 3px;
}
.var { font-style: italic; }

.hero {
  padding: 4.5rem 0 2.75rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.hero .container > * { margin-inline: auto; }
.hero h1 {
  font-size: 2.588rem;
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--title);
  margin: 0 0 1.75rem;
  text-wrap: balance;
}
.authors {
  font-size: 1rem;
  margin: 0 0 .55rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.venue {
  margin: 1.75rem 0 0;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--title);
}

.pills {
  margin: 2rem 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
}
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.15rem;
  background: var(--pill-bg);
  color: var(--pill-fg);
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 500;
  line-height: 1.2;
}
.pill:hover { background: #333; color: var(--pill-fg); text-decoration: none; }
.pill svg {
  width: .83rem; height: .83rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

figure { margin: 2rem 0; }

figure img,
figure video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--fig-max-h);
  margin: 0 auto 0 0;
  border-radius: 3px;
}

figcaption {
  margin: .75rem 0 0;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
figcaption strong { color: var(--text); font-weight: 600; }

.fig-teaser { margin: 2.4rem 0 0; }

.fig-wide     { max-width: 100%; }
.fig-inset    { max-width: min(var(--fig-inset),    100%); }
.fig-inset-sm { max-width: min(var(--fig-inset-sm), 100%); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--split-gap);
  align-items: start;
  margin: 2rem 0;
}
h2 + .split, h3 + .split { margin-top: 0; }

.split--55 { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.split--45 { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); }

.split > figure { margin: .6rem 0 0; }
.split > figure > img,
.split > figure > video { max-width: 100%; max-height: none; }
.split > .split-text > *:last-child { margin-bottom: 0; }
.split > .split-text > p:first-child { margin-top: 0; }

.split table { margin: 0; }

@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; gap: 1.4rem; }
  .split--45, .split--55 { grid-template-columns: 1fr; }
  .split > figure { margin-top: 0; }
}

.fig-row { display: flex; gap: 1.1rem; align-items: flex-end; }
.fig-row > img,
.fig-row > svg,
.fig-row > figure { flex: 1 1 0; min-width: 0; margin: 0; }
.fig-row > img,
.fig-row > svg { width: 100%; max-height: none; }
.fig-row > figure > figcaption { text-align: left; font-size: .82rem; margin-top: .4rem; }
.fig-row--narrow { max-width: min(880px, 100%); }
@media (max-width: 700px) { .fig-row { flex-direction: column; align-items: stretch; } }

table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  table-layout: auto;
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
table caption {
  caption-side: top;
  text-align: left;
  font-size: .86rem;
  color: var(--muted);
  padding-bottom: .7rem;
  line-height: 1.55;
}
th, td { padding: .6rem .7rem; text-align: right; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th {
  border-bottom: 1px solid var(--text);
  font-weight: 600;
}
tbody tr { border-bottom: 1px solid var(--rule); }
tbody tr.ours { font-weight: 600; }

#bibtex pre {
  background: var(--code-bg);
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: max-content;
  max-width: min(100%, var(--fig-inset));
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem;
  line-height: 1.7;
  margin: 0;
}

.refs p {
  font-size: .92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-left: 1.9rem;
  text-indent: -1.9rem;
}

footer {
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule);
}
footer p { margin: 0; font-size: .88rem; color: var(--muted); }

@media (max-width: 700px) {
  html { font-size: 17px; }
  :root { --pad: 1.05rem; --w-page: 100vw; }
  .hero { padding: 2.75rem 0 2rem; }
  .hero h1 { font-size: 1.95rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.03rem; margin-top: 1.9rem; }
  section { padding: 2rem 0 0; }
  section > .container > h2 { padding-top: 1rem; }
  figure { margin: 1.5rem 0; }
}

@media print {
  .pills, .skip-link { display: none !important; }
  body { font-size: 11pt; }
  section { padding: .75rem 0; break-inside: avoid; }
  figure, table { break-inside: avoid; }
}
