:root {
  --text: #222;
  --muted: #666;
  --line: #ddd;
  --link: #285f8f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.page {
  width: min(calc(100% - 36px), 900px);
  margin: 0 auto;
  padding: 42px 0 32px;
}

header {
  margin-bottom: 34px;
  text-align: center;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.7rem;
  line-height: 1.2;
}

.subtitle {
  margin: 0 auto 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.authors {
  margin: 17px auto 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1.65;
}

.authors span {
  white-space: nowrap;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.5;
}

.author-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

sup {
  font-size: 0.72em;
  line-height: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: 0.9rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: #fff;
  line-height: 1.2;
  text-decoration: none;
}

.project-link:hover {
  border-color: #bbb;
  background: #f6f7f8;
}

.project-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.project-link i {
  font-size: 0.95rem;
}

.tldr {
  max-width: 820px;
  margin: 0 auto 42px;
  font-size: 1.02rem;
}

section {
  margin: 38px 0;
}

h2 {
  margin: 0 0 14px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  font-size: 1.45rem;
  line-height: 1.3;
}

p {
  margin: 0 0 14px;
}

.abstract-section h2 {
  text-align: center;
}

.abstract-section p {
  font-size: 1.08rem;
  line-height: 1.72;
}

ul {
  margin: 10px 0 18px;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 7px;
}

.result-previews {
  position: relative;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  width: min(75vw, 100%);
  margin: 22px 0 28px;
  transform: translateX(-50%);
}

.result-previews figure {
  margin: 0;
}

figure {
  margin: 28px 0;
}

.method-hero {
  margin: 22px 0 24px;
}

.diagram-viewport {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.method-hero img {
  min-width: 700px;
  border: 0;
}

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

figure img {
  width: 100%;
  border: 1px solid var(--line);
}

figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.figure-explanation {
  margin-bottom: 18px;
  color: #3f3f3f;
}

.figure-explanation + figure {
  margin-top: 0;
}

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

.citation-block {
  margin: 18px 0 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: #f7f7f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 600px) {
  .page {
    width: min(calc(100% - 28px), 900px);
    padding-top: 30px;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 1.05rem;
  }

  .authors {
    font-size: 1.1rem;
  }

  .affiliations {
    font-size: 0.98rem;
  }

  .author-note {
    font-size: 0.82rem;
  }

  .tldr {
    margin-bottom: 34px;
  }

  .abstract-section p {
    font-size: 1.03rem;
  }

  header,
  section {
    margin-bottom: 32px;
  }

  .method-hero img {
    min-width: 660px;
  }
}
