/* ==========================================================================
   OmniVAE project page
   Single consolidated stylesheet — blue academic theme.
   ========================================================================== */

:root {
  --ink: #1a2233;
  --heading: #141d30;
  --muted: #51607a;
  --faint: #7b8aa3;
  --line: #dbe3f2;
  --line-dark: #bcc9de;
  --paper: #ffffff;
  --page: #f7f9fc;
  --band: #f2f6fc;
  --blue: #2c6ad2;
  --blue-dark: #1f4fa3;
  --blue-soft: #eaf1fd;
  --green: #1f7a52;
  --green-soft: #e9f4ee;
  --code: #f2f5fa;
  --navy: #17376d;
  --navy-dark: #10264b;

  --content: 1200px;
  --reading: 780px;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 80, 0.05);
  --shadow-md: 0 8px 26px -10px rgba(20, 45, 95, 0.22);
  --shadow-lg: 0 24px 60px -22px rgba(15, 35, 80, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(44, 106, 210, 0.35);
  outline-offset: 3px;
  border-radius: 2px;
}

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

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

h1,
h2,
h3,
h4 {
  color: var(--heading);
  letter-spacing: 0;
}

h1 {
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: clamp(2.5rem, 4.8vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
}

h1 span {
  color: var(--blue);
}

h2 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

h4 {
  margin-bottom: 15px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

sup,
sub {
  line-height: 0;
}

.container {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
}

.reading-width {
  width: min(var(--reading), calc(100% - 48px));
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(247, 249, 252, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(247, 249, 252, 0.94);
  box-shadow: 0 6px 20px -16px rgba(15, 35, 80, 0.6);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1220px, calc(100% - 40px));
  min-height: 60px;
  margin: 0 auto;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  color: var(--heading);
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--blue);
}

nav {
  display: flex;
  gap: 26px;
  color: #55617a;
  font-size: 0.85rem;
  font-weight: 600;
}

nav a {
  position: relative;
  color: inherit;
  padding: 4px 0;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}

nav a:hover,
nav a.is-active {
  color: var(--blue);
}

nav a:hover::after,
nav a.is-active::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: 78px 0 62px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--band) 0%, var(--page) 100%);
}

.hero-content {
  text-align: left;
}

.hero-kicker {
  margin-bottom: 20px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: none;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 0 16px;
  gap: 5px 18px;
  color: #24313d;
  font-family: var(--sans);
  font-size: 0.98rem;
}

.authors sup,
.affiliations sup {
  color: var(--blue);
  font-size: 0.69em;
}

.authors a {
  color: inherit;
  border-bottom: 1px solid rgba(44, 106, 210, 0.45);
}

.authors a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 0 8px;
  gap: 3px 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.author-notes {
  margin-bottom: 28px;
  color: var(--faint);
  font-size: 0.79rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  color: #2b3746;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-size: 0.91rem;
  font-weight: 640;
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}

.button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: currentColor;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-md);
}

.button.primary {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.button.primary:hover {
  border-color: var(--blue-dark);
  color: #fff;
  background: var(--blue-dark);
}

.hf-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
}

.stroke-icon {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 86px 0;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--band);
}

#abstract,
.results-section,
.citation-section {
  background: var(--paper);
}

.case-studies {
  border-top: 1px solid var(--line);
  background: var(--band);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-label,
.result-index {
  margin-bottom: 13px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading > p:not(.section-label) {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Abstract
   -------------------------------------------------------------------------- */

.abstract-text {
  color: #373c47;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.85;
}

.abstract-text p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

.paper-figure {
  margin: 0;
}

.paper-figure a {
  display: block;
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
}

.paper-figure img {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

.paper-figure a:hover img {
  transform: scale(1.006);
  box-shadow: var(--shadow-md);
}

.paper-figure a::after {
  content: "⤢";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: #fff;
  background: rgba(20, 40, 80, 0.55);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  backdrop-filter: blur(2px);
}

.paper-figure a:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.paper-figure figcaption {
  max-width: 940px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
}

.paper-figure figcaption code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: #40506a;
}

.architecture {
  margin-bottom: 8px;
}

.curve-figure {
  margin-bottom: 26px;
}

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */

.results-section {
  padding-bottom: 92px;
}

.result-block {
  padding-top: 72px;
  margin-top: 72px;
  border-top: 1px solid var(--line-dark);
}

.result-block.featured-result {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.result-heading {
  display: grid;
  grid-template-columns: 220px minmax(0, 580px);
  max-width: 900px;
  margin-bottom: 32px;
}

.result-heading .result-index {
  grid-row: 1 / span 2;
  margin-bottom: 0;
  padding-top: 6px;
}

.result-heading h3,
.result-heading p:last-child {
  grid-column: 2;
}

.result-heading h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  font-weight: 500;
}

.result-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 36px;
}

.table-panel {
  margin: 0;
  min-width: 0;
}

.table-panel.full-width,
.probe-table {
  width: 100%;
}

.table-panel h4 {
  padding-bottom: 9px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--blue-dark);
  color: var(--blue-dark);
  font-family: var(--sans);
  font-size: 0.92rem;
}

.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  width: 28%;
  text-align: left;
}

th {
  color: #394760;
  background: #edf2f9;
  font-weight: 670;
}

tbody tr {
  transition: background 0.12s var(--ease);
}

tbody tr:hover td {
  background: #f4f8ff;
}

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

.best td,
.ours td {
  background: var(--green-soft);
}

tbody tr.best:hover td,
tbody tr.ours:hover td {
  background: #e0f0e7;
}

.best td:first-child,
.ours td:first-child {
  position: relative;
  font-weight: 700;
}

.best td:not(:first-child),
.metric-best {
  color: var(--green);
  font-weight: 720;
}

.group-row td {
  padding-top: 11px;
  padding-bottom: 7px;
  color: var(--blue-dark);
  background: #e4ecf8;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.group-row:hover td {
  background: #e4ecf8;
}

.table-note {
  margin: 14px 3px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Sync-probing side-by-side layout */
.probe-result {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.35fr);
  column-gap: 64px;
  align-items: start;
}

.probe-result .result-heading {
  display: block;
  margin-bottom: 0;
}

.probe-result .result-heading .result-index,
.probe-result .result-heading h3,
.probe-result .result-heading p:last-child {
  grid-column: auto;
}

.probe-table {
  max-width: none;
  margin: 0;
}

.probe-table table {
  font-size: 0.86rem;
}

.probe-table td[rowspan] {
  color: var(--blue-dark);
  font-weight: 700;
  vertical-align: middle;
  background: #eef3fb;
}

.probe-result .table-note {
  grid-column: 2;
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Qualitative cases
   -------------------------------------------------------------------------- */

.case-studies .section-heading {
  max-width: 820px;
}

.case-list {
  display: grid;
  gap: 0;
}

.case-group {
  display: grid;
  grid-template-columns: 200px minmax(0, 650px);
  align-items: baseline;
  gap: 8px 24px;
  padding: 40px 0 14px;
  margin-top: 34px;
  border-bottom: 2px solid var(--blue-dark);
}

.case-group:first-child {
  margin-top: 0;
}

.case-group h3 {
  margin-bottom: 0;
  color: var(--blue-dark);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.case-group p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.case-card {
  display: grid;
  gap: 20px;
  padding: 34px 0 40px;
  border-bottom: 1px solid var(--line-dark);
}

.case-header {
  display: grid;
  grid-template-columns: 200px minmax(0, 820px);
  align-items: baseline;
  gap: 4px 24px;
}

.case-header span {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-header h3 {
  max-width: 1030px;
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.55;
}

.case-body {
  display: grid;
  gap: 14px;
}

/* Video comparison grid */
.case-videos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.case-tile {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: #10161f;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.case-tile.case-best {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.tile-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #10161f;
}

.tile-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #10161f;
}

.tile-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0) 26%,
    rgba(0, 0, 0, 0) 68%,
    rgba(0, 0, 0, 0.38) 100%
  );
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}

.tile-media:hover::after {
  opacity: 1;
}

.tile-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  color: #fff;
  background: var(--blue);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
}

.tile-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: rgba(16, 22, 31, 0.6);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease),
    background 0.15s var(--ease);
  z-index: 3;
  backdrop-filter: blur(2px);
}

.tile-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tile-btn:hover {
  background: var(--blue);
}

.tile-expand {
  top: 8px;
  right: 8px;
}

.case-tile:hover .tile-btn,
.tile-media:focus-within .tile-btn {
  opacity: 1;
  transform: translateY(0);
}

.case-tile figcaption {
  display: grid;
  gap: 1px;
  min-height: 52px;
  padding: 8px 10px 9px;
  border-top: 1px solid #263140;
  color: #e4e9ed;
  font-size: 0.78rem;
  font-weight: 620;
}

.case-tile figcaption strong {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
}

.case-tile figcaption span {
  color: #9fb0c4;
  font-size: 0.68rem;
  font-weight: 450;
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(10, 18, 32, 0.82);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--ease), visibility 0.24s var(--ease);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-stage {
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  transform: scale(0.97);
  transition: transform 0.24s var(--ease);
}

.lightbox.open .lightbox-stage {
  transform: scale(1);
}

.lightbox-stage img,
.lightbox-stage video {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #10161f;
}

.lightbox-caption {
  max-width: 900px;
  margin: 14px auto 0;
  color: #d5deec;
  font-size: 0.86rem;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Resources (compact dark bar)
   -------------------------------------------------------------------------- */

main {
  display: flex;
  flex-direction: column;
}

#resources {
  order: 10;
  padding: 26px 0;
  color: #dce6f7;
  background: var(--navy);
}

#resources .resource-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

#resources .resource-intro {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

#resources .resource-intro .section-label {
  margin: 0;
  color: #9ec0fa;
}

#resources .resource-intro p:last-child {
  margin: 0;
  color: #c7d5eb;
  font-size: 0.85rem;
}

#resources .resource-list {
  display: flex;
  gap: 8px;
}

#resources .resource-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 104px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
    transform 0.16s var(--ease);
}

#resources .resource-list a:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#resources .resource-list strong {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 640;
}

#resources .resource-list svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: currentColor;
}

#resources .resource-list .hf-icon {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Citation
   -------------------------------------------------------------------------- */

.citation-section {
  border-top: 1px solid var(--line);
}

.citation-section .section-heading {
  margin-bottom: 24px;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  color: #27333e;
  background: var(--code);
  line-height: 1.55;
}

code {
  font-family: var(--mono);
  font-size: 0.84rem;
}

.copy-cite {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  color: var(--blue-dark);
  background: #fff;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 640;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease),
    background 0.15s var(--ease);
}

.copy-cite:hover {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.copy-cite.copied {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

/* --------------------------------------------------------------------------
   Scroll-reveal + back-to-top
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s var(--ease), color 0.15s var(--ease);
  backdrop-filter: blur(6px);
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.to-top:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .result-heading {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .probe-result {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .probe-result .table-note {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  .table-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .case-videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 112px;
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    width: min(100% - 32px, 1220px);
    padding: 10px 0 8px;
    gap: 7px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .container,
  .reading-width {
    width: min(100% - 30px, var(--content));
  }

  .hero {
    padding: 54px 0 46px;
  }

  h1 {
    font-size: 2.42rem;
  }

  .hero h1 {
    max-width: none;
  }

  .title-break {
    display: none;
  }

  .authors {
    gap: 4px 14px;
    font-size: 0.9rem;
  }

  .affiliations {
    flex-direction: column;
    gap: 1px;
  }

  .section {
    padding: 62px 0;
  }

  .result-heading,
  .case-group,
  .case-header {
    display: block;
  }

  .result-heading .result-index,
  .result-heading h3,
  .result-heading p:last-child {
    grid-column: auto;
  }

  .case-group {
    padding-top: 34px;
  }

  .case-group h3,
  .case-header span {
    display: block;
    margin-bottom: 6px;
  }

  .case-card {
    padding: 28px 0 34px;
  }

  #resources .resource-layout,
  #resources .resource-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  #resources .resource-layout {
    gap: 16px;
  }

  #resources .resource-list {
    width: 100%;
  }

  #resources .resource-list a {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 2.08rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .case-videos {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
