:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f3f6f8;
  --ink: #202c34;
  --muted: #52616b;
  --line: #d8e0e5;
  --accent: #235f87;
  --accent-strong: #174363;
  --max: 1184px;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover { color: var(--accent-strong); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); color: white; }

.shell {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

.narrow-shell { max-width: 960px; }
.section { padding-block: 3rem; }
main > .section + .section { border-top: 1px solid var(--line); }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.25;
  font-weight: 650;
  text-wrap: balance;
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.85rem, 2.7vw, 2.5rem);
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  letter-spacing: -0.015em;
}

h3 { margin-bottom: 0.65rem; font-size: 1.2rem; }
p { margin-bottom: 1rem; }
.section-label { margin-bottom: 0.75rem; color: var(--accent); font-size: 0.9375rem; font-weight: 650; }
.lede { font-size: 1.125rem; }
.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 96px; height: auto; flex: 0 0 auto; border-radius: 3px; }
.brand-name { font-size: 1.875rem; font-weight: 700; line-height: 1.2; }

.brand-description {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; }

.site-nav a {
  padding-block: 0.65rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 2.75rem;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-block: 1.5rem 1rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button:hover { background: var(--accent-strong); color: white; }
.platforms { color: var(--muted); font-size: 0.875rem; }
.intro .platforms { margin-bottom: 0; }
.screenshot { margin: 0; }
.screenshot > a { display: block; border: 1px solid var(--line); background: var(--surface); }
.screenshot a:hover { border-color: var(--accent); }
.screenshot img { width: 100%; height: auto; }

.screenshot figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.section-heading { max-width: 780px; margin-bottom: 2rem; }
.section-heading p { margin-bottom: 0; }

.feature-grid,
.project-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}

.project-overview {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.project-overview p { margin-bottom: 0; }

.feature { display: flex; flex-direction: column; align-items: stretch; }
.feature .screenshot { margin-bottom: 1rem; }
.feature h3 { margin-top: auto; }
.feature p { margin-bottom: 0; }
.feature-search {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}
.feature-search h3 { margin-top: 0; }
.feature-search h3:not(:first-child) { margin-top: 1.5rem; }
.feature-search p + p { margin-top: 1rem; }
.comparison-section { background: var(--surface); }

.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 3rem;
  align-items: start;
}

.workflow-summary { padding-left: 2rem; border-left: 2px solid var(--line); }
.workflow-summary ol { margin: 0; padding-left: 1.4rem; }
.workflow-summary li { padding-left: 0.25rem; margin-bottom: 0.65rem; }
.workflow-summary li:last-child { margin-bottom: 0; }
.workflow-summary li::marker { color: var(--accent); font-weight: 600; }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.75rem;
}

.resource-grid > div + div { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.resource-links { list-style: none; padding: 0; margin: 0; }
.resource-links li + li { margin-top: 0.6rem; }

.acknowledgments-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  align-items: center;
  gap: 2rem;
}

.acknowledgments-grid p { max-width: 640px; margin-bottom: 0; }
.institution-logo { width: 320px; height: auto; }

.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); background: var(--surface); }

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
}

.footer-brand { color: var(--ink); font-size: 1.125rem; font-weight: 700; text-decoration: none; }
.footer-grid p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; font-size: 0.9375rem; }
.footer-meta { text-align: right; }
.page-intro { padding-bottom: 2rem; }
.page-intro p { max-width: 740px; }

.publication-callout {
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  border-left: 3px solid var(--line);
  background: var(--surface);
}

.publication-callout h2 { font-size: 1.2rem; }
.publication-callout p { margin-bottom: 0; }
.reference-list { border-top: 1px solid var(--line); }

.reference {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
  gap: 0.5rem 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.reference-type { grid-column: 1; grid-row: 1 / span 3; color: var(--muted); font-size: 0.875rem; }
.reference h3, .reference > p:not(.reference-type), .reference > a { grid-column: 2; margin: 0; }
.reference > a { justify-self: start; }
.workflow-note { background: var(--surface); }
.workflow-note p { max-width: 780px; }
.workflow-note p:last-child { margin-bottom: 0; }
.not-found { display: grid; min-height: 100svh; place-items: center; padding: 2rem 1.5rem; }
.not-found > div { width: min(100%, 640px); }
.not-found .brand { margin-bottom: 3rem; }

@media (max-width: 960px) {
  .header-inner { align-items: start; }
  .site-nav { column-gap: 1.1rem; }
  .intro-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .intro-grid > div { max-width: 740px; }
  .overview-image { max-width: 780px; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-grid > div:last-child { grid-column: 1 / -1; padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .section { padding-block: 2rem; }
  .header-inner { gap: 0.75rem; }
  .brand { gap: 0.75rem; }
  .brand img { width: 80px; }
  .brand-name { font-size: 1.75rem; }
  .site-nav { width: 100%; column-gap: 1.25rem; }
  .feature-grid, .feature-search, .project-overview, .comparison-grid, .resource-grid, .acknowledgments-grid { grid-template-columns: 1fr; gap: 2rem; }
  .workflow-summary { padding-left: 1.25rem; }
  .resource-grid > div + div { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .reference { grid-template-columns: 1fr; }
  .reference-type { grid-column: 1; grid-row: auto; margin: 0; }
  .reference h3, .reference > p:not(.reference-type), .reference > a { grid-column: 1; }
  .footer-grid { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media print {
  .site-nav, .skip-link, .actions, .footer-links { display: none; }
  .shell { width: 100%; }
  .section { padding-block: 1rem; }
  .intro-grid, .comparison-grid, .resource-grid { display: block; }
  .resource-grid > div + div { padding: 0; border: 0; }
  .feature, .reference { break-inside: avoid; }
}
