:root {
  color-scheme: light;
  --ink: #14283d;
  --muted: #4d5e72;
  --accent: #185589;
  --accent-dark: #11416b;
  --line: #d6e2ee;
  --tint: #f3f7fc;
  --paper: #fff;
  --chart-panel-tint: radial-gradient(ellipse at 65% 35%, #c7dcf47a, transparent 72%);
  --project-side-width: 23rem;
  --teaser-width: 29rem;
  --project-column-gap: clamp(1.25rem, 3vw, 2rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-dark);
}

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

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
}

.shell {
  width: min(70rem, calc(100% - clamp(2rem, 8vw, 7rem)));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-nav,
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.875rem;
}

.brand {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem clamp(0.75rem, 2.75vw, 1.75rem);
}

.nav-links a,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hero {
  padding-block: clamp(1.75rem, 4vw, 3.25rem) clamp(0.65rem, 1.6vw, 1.25rem);
  background: radial-gradient(ellipse at 86% 0%, #e7f1fd, transparent 65%), var(--tint);
  border-bottom: 1px solid var(--line);
}

.hero-resources {
  display: grid;
  gap: var(--hero-detail-gap);
  margin-top: var(--hero-detail-gap);
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1 {
  color: #000;
  font-size: clamp(1.75rem, 3.3vw, 3.05rem);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.05em;
  text-wrap: pretty;
}

.project-name {
  color: var(--accent);
  white-space: nowrap;
  font-size: clamp(2.65rem, 5.6vw, 4.65rem);
  font-weight: 780;
  letter-spacing: -0.07em;
}

.authors {
  margin-top: 0.55rem;
  font-size: clamp(1.0625rem, 1.45vw, 1.125rem);
  font-weight: 650;
}

.author-note {
  margin-top: 0.35rem;
  color: #5f6e7d;
  font-size: 0.875rem;
}

.authors a {
  color: inherit;
  text-decoration: none;
}

.authors a:hover {
  color: var(--accent);
}

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

.affiliations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem clamp(0.75rem, 2vw, 1.5rem);
  color: var(--muted);
  font-size: 0.9rem;
}

.affiliations span {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.affiliations sup {
  margin-top: 0.4rem;
}

.affiliations img {
  display: block;
  width: auto;
  object-fit: contain;
}

.northeastern-logo {
  height: clamp(2.5rem, 4.4vw, 3.25rem);
}

.meta-logo {
  height: clamp(1.55rem, 3vw, 2.15rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.actions .button {
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  line-height: 1.25;
}

.actions .button-secondary {
  border-color: #cad8e6;
  color: var(--ink);
}

.actions img {
  display: block;
  flex: 0 0 auto;
}

.actions .file-type {
  padding: 0.12rem 0.3rem;
  border-radius: 0.2rem;
  background: #ffffff26;
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.035em;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.button-primary {
  background: var(--accent-dark);
  color: var(--paper);
}

.button-primary:hover {
  background: #0b3152;
  color: var(--paper);
}

.button-secondary {
  border-color: #adc5df;
  background: var(--paper);
}

.button-secondary:hover {
  background: #eaf2fc;
}

.figure {
  min-width: 0;
  padding: clamp(0.65rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}

.figure a,
.figure img {
  display: block;
  width: 100%;
}

.figure img {
  height: auto;
}

figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.section {
  padding-block: clamp(2.75rem, 6vw, 5rem);
}

.hero-layout,
.abstract {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--project-side-width);
  gap: var(--project-column-gap);
}

.hero-layout {
  grid-template-columns: minmax(0, 1fr) var(--teaser-width);
}

.abstract {
  padding-block: clamp(1.25rem, 2.75vw, 2rem);
}

.abstract h2 {
  margin-bottom: 0.5rem;
  color: var(--accent-dark);
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.abstract-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.abstract-copy p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.65;
}

.section-tinted {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.reading {
  max-width: 72ch;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.section p {
  color: var(--muted);
}

.section strong {
  color: var(--ink);
}

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

.method-grid section {
  padding-top: 1.05rem;
  border-top: 2px solid #a9c6e6;
}

.variant {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--paper);
}

.architecture-figure {
  margin-top: 1.75rem;
}

.variant .figure {
  padding: 0.5rem;
  border: 0;
}

.benchmark-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.benchmark-nav a {
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--tint);
  font-size: 0.875rem;
}

.table-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.benchmark {
  margin-top: 1.7rem;
}

.benchmark h3 {
  font-size: 1.35rem;
  scroll-margin-top: 1rem;
}

.benchmark > p {
  margin-bottom: 0.6rem;
}

.benchmark > .table-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.results-table {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

th,
td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

thead th[scope="colgroup"] {
  text-align: center;
}

thead tr:first-child th:first-child,
tbody th[scope="row"] {
  position: sticky;
  left: 0;
  padding-inline: 0.85rem;
  border-right: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  white-space: nowrap;
}

thead,
thead tr:first-child th:first-child,
.table-group th {
  background: var(--tint);
}

.table-group th {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

td {
  white-space: nowrap;
}

tbody:last-child tr:last-child > * {
  border-bottom: 0;
}

.highlight,
.highlight th[scope="row"] {
  background: #e6f0fc;
  color: var(--accent-dark);
  font-weight: 700;
}

.memory-figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
  border: 0;
  background: var(--chart-panel-tint);
}

#memory-explorer:not([hidden]) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

#memory-chart {
  position: relative;
  margin-top: 0.35rem;
  flex: 1 0 176px;
}

#memory-chart svg {
  position: absolute;
  inset: 0;
  height: 100%;
}

.memory-figure .scrubber {
  margin: 0.4rem 0;
}

.memory-figure img {
  max-width: 20rem;
  margin-inline: auto;
}

.citation-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.citation-header h2 {
  margin: 0 auto 0 0;
}

.citation-status {
  color: var(--muted);
  font-size: 0.875rem;
}

.citation-block {
  position: relative;
}

.citation-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.citation-copy:hover {
  color: var(--accent-dark);
  border-color: currentColor;
}

.citation-copy::before,
.citation-copy::after {
  position: absolute;
  width: 0.56rem;
  height: 0.65rem;
  border: 1px solid currentColor;
  border-radius: 0.13rem;
  background: var(--paper);
  content: "";
}

.citation-copy::before {
  top: 0.52rem;
  left: 0.53rem;
}

.citation-copy::after {
  top: 0.72rem;
  left: 0.73rem;
}

.citation-copy:not([hidden]) + pre {
  padding-inline-end: 3rem;
}

.citation pre {
  margin: 0;
  padding: 1.15rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper);
  color: var(--accent-dark);
  font-size: 0.875rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--tint);
}

@media (max-width: 54rem) {
  .hero-layout,
  .abstract {
    grid-template-columns: minmax(0, 1fr);
  }

  .teaser-figure {
    width: min(100%, var(--teaser-width));
  }

  .memory-figure {
    width: min(100%, var(--project-side-width));
  }
}

@media (max-width: 42rem) {
  .method-grid,
  .variant {
    grid-template-columns: 1fr;
  }

  .actions .button {
    gap: 0.45rem;
    padding-inline: 0.65rem;
    font-size: 0.875rem;
  }

  tbody th[scope="row"] {
    min-width: 7.5rem;
    max-width: 9rem;
    white-space: normal;
  }
}

@media (max-width: 22.5rem) {
  .actions .file-type {
    display: none;
  }
}

/* Interactive paper figures */
.chart svg {
  display: block;
  width: 100%;
  height: 208px;
  overflow: visible;
  cursor: crosshair;
}
.chart text {
  fill: var(--muted);
  font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.chart .plot-unit { font-weight: 650; }
.plot-grid { stroke: var(--line); }
.plot-guide { stroke: #61748a; stroke-dasharray: 3 4; }
.scrubber {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 1rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.scrubber output, .chart-key dd { font-variant-numeric: tabular-nums; }
.scrubber input {
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
  height: 1.75rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.chart-key {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.chart-key dt {
  font-size: 0.85rem;
  color: var(--muted);
}
.chart-key dd { margin: 0; font-weight: 650; }
.series-label::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.22em;
  margin-right: 0.42em;
  vertical-align: middle;
  border-radius: 1em;
  background: var(--series-color);
}
@media (max-width: 42rem) {
  .chart-key dd { font-size: 0.875rem; overflow-wrap: anywhere; }
}

.benchmark-chart {
  margin-bottom: 0.65rem;
}

.benchmark-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.benchmark-controls label {
  max-width: 100%;
}

.benchmark-controls select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.benchmark-controls select {
  max-width: 100%;
  margin-inline-start: 0.4rem;
}

.benchmark-chart-label {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.benchmark-plot {
  --benchmark-plot-height: clamp(8rem, 20vw, 12rem);
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-items: start;
  gap: 0.4rem;
  padding-block: 0.35rem;
}

.benchmark-axis {
  position: relative;
  height: var(--benchmark-plot-height);
  margin-top: calc(1.3em + 0.35rem);
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.benchmark-axis span {
  position: absolute;
  right: 0;
  transform: translateY(50%);
}

.benchmark-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(6.5rem, 1fr);
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  list-style: none;
}

.benchmark-bars li {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.35rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.3;
}

.benchmark-bars li > :first-child {
  grid-row: 3;
  overflow-wrap: anywhere;
}

.benchmark-bars li > :last-child {
  grid-row: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.benchmark-track {
  grid-row: 2;
  display: flex;
  align-items: end;
  justify-content: center;
  height: var(--benchmark-plot-height);
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 calc(var(--benchmark-tick-spacing) - 1px), var(--line) calc(var(--benchmark-tick-spacing) - 1px) var(--benchmark-tick-spacing));
}

.benchmark-track span {
  width: 52%;
  border-radius: 0.25rem 0.25rem 0 0;
  background: #748ba1;
}

.benchmark-snaprecall {
  color: var(--accent-dark);
  font-weight: 700;
}

.benchmark-snaprecall .benchmark-track span {
  background: var(--accent);
}

.benchmark-table summary {
  width: fit-content;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
}

.benchmark-input {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.benchmark-snaprecall .benchmark-input {
  color: inherit;
}

.hero-content {
  --hero-detail-gap: clamp(0.9rem, 1.5vw, 1.25rem);
  display: flex;
  flex-direction: column;
}

.teaser-figure {
  --teaser-plot-left: 45px;
  --teaser-plot-right: 14px;
  display: flex;
  flex-direction: column;
  align-self: center;
  aspect-ratio: 1;
  padding: 0.85rem;
  border: 0;
  background: var(--chart-panel-tint);
}

@media (min-width: 54.01rem) {
  .hero-content {
    padding-bottom: 0.85rem;
  }

  .hero-title {
    margin-block: auto;
  }

  .teaser-figure {
    align-self: end;
  }
}

#teaser-chart .plot-grid,
#memory-chart .plot-grid {
  stroke: #7697b9;
  opacity: 0.23;
}

#teaser-explorer:not([hidden]) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

#teaser-chart {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
}

#teaser-chart text { font-family: inherit; }
#teaser-chart .tick, #teaser-chart .axis-title { font-size: 11px; fill: var(--muted); }
#teaser-chart .axis-title { font-weight: 650; }
.teaser-point { color: #426a94; cursor: pointer; }
.teaser-point.ttt { color: #73539f; }
.teaser-point.ours { color: #b7385b; }
.teaser-point .symbol { fill: currentColor; stroke: white; stroke-width: 1; }
.teaser-point .halo { fill: none; stroke: currentColor; opacity: 0; }
.teaser-point.selected .halo { opacity: 0.6; }
.teaser-point .point-label {
  fill: currentColor;
  stroke: #e2edf9;
  stroke-width: 3px;
  paint-order: stroke;
  font-size: 11px;
  font-weight: 600;
}
#teaser-scores {
  display: grid;
  margin-inline: var(--teaser-plot-left) var(--teaser-plot-right);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

#teaser-scores span {
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  background: #c8def450;
}

#teaser-scores strong {
  display: block;
  color: var(--accent-dark);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}
