html {
  scroll-behavior: smooth;
}

:root {
  --section-nav-reserve: 10.5rem;
  --section-nav-accent: #555;
  --section-nav-accent-hover: #444;
}

body {
  font-family: 'Noto Sans', sans-serif;
  padding-left: var(--section-nav-reserve);
}

/* Fixed top-left section nav */
.section-nav {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  width: calc(var(--section-nav-reserve) - 1rem);
}

.section-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-nav__sublist {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0 0 0 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.section-nav__link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  color: var(--section-nav-accent);
  background-color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.section-nav__link--sub {
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-left: 2px solid #d8d8d8;
  border-radius: 0 4px 4px 0;
}

.section-nav__link:hover,
.section-nav__link:focus {
  background-color: var(--section-nav-accent-hover);
  color: #fff;
  text-decoration: none;
}

.section-nav__link--active,
.section-nav__link--active:hover,
.section-nav__link--active:focus {
  background-color: var(--section-nav-accent);
  color: #fff;
}

@media (max-width: 768px) {
  :root {
    --section-nav-reserve: 0rem;
  }

  .section-nav {
    display: none;
  }
}

.footer {
  background-color: transparent;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.dnerf {
  font-variant: small-caps;
}

.hero-body {
  padding-bottom: 24px;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}


.publication-title {
  font-family: Lato;
  margin-top: -20px;
}

.publication-banner {
  max-height: parent;

}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: fit;
}

.publication-header .hero-body {}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-venue {
  color: #555;
  font-weight: bold;
}

.publication-awards {
  color: #ff3860;
  width: fit-content;
  font-weight: bolder;
}

.publication-authors {}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-banner img {}

.publication-authors {
  /*color: #4286f4;*/
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;

  overflow: hidden;
  border-radius: 10px !important;
}

.publication-image-half {
  width: 50;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.publication-body img {}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}


.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}

.interpolation-video-column {}

.interpolation-panel .slider {
  margin: 0 !important;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

#interpolation-image-wrapper {
  width: 100%;
}

#interpolation-image-wrapper img {
  border-radius: 5px;
}

* {
  box-sizing: border-box;
}

.img-magnifier-container {
  position: relative;
}

.img-magnifier-glass {
  position: absolute;
  border: 3px solid #000;
  border-radius: 0%;
  cursor: none;
  /*Set the size of the magnifier glass:*/
  width: 200px;
  height: 200px;
}

.img-magnifier-glass_init {
  position: absolute;
  border: 0px solid #000;
  border-radius: 50%;
  cursor: none;
  /*Set the size of the magnifier glass:*/
  width: 0px;
  height: 0px;
}

hr {
  margin: 0 auto;
  margin-bottom: 20px;
  width: 100%;
  border: 0;
  height: 2px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.9));
}

/* Scientific forecasting results table */
.results-table-figure {
  margin: 1.25rem auto 1.5rem;
}

.results-table-figure--compact {
  max-width: 40rem;
}

.results-table-caption {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  color: #363636;
}

.results-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
}

.results-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.35;
  background-color: #fff;
}

.results-table th,
.results-table td {
  padding: 0.35rem 0.45rem;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #dbdbdb;
}

.results-table thead th {
  font-weight: 600;
  background-color: #f5f5f5;
}

/* Gutter between SST | Navier-Stokes | Helmholtz column groups */
.results-table thead tr:first-child th:nth-child(3),
.results-table thead tr:first-child th:nth-child(4),
.results-table thead tr:nth-child(2) th:nth-child(5),
.results-table thead tr:nth-child(2) th:nth-child(8),
.results-table tbody tr > :nth-child(6),
.results-table tbody tr > :nth-child(9) {
  padding-left: 0.7rem;
  border-left-color: transparent;
}

.results-table thead tr:first-child th:nth-child(3),
.results-table thead tr:first-child th:nth-child(4),
.results-table thead tr:nth-child(2) th:nth-child(5),
.results-table thead tr:nth-child(2) th:nth-child(8) {
  box-shadow: inset 0.7rem 0 0 0 #f5f5f5;
}

.results-table tbody tr > :nth-child(6),
.results-table tbody tr > :nth-child(9) {
  box-shadow: inset 0.7rem 0 0 0 #fff;
}

/* Partial rules under SST / NS / Helmholtz (booktabs-style cmidrule) */
.results-table thead tr:first-child th[colspan] {
  border-bottom: none;
  vertical-align: bottom;
}

.results-table thead tr:first-child th[colspan]::after {
  content: "";
  display: block;
  margin: 0.25rem 0.2rem 0;
  border-bottom: 1px solid #7a7a7a;
}

.results-table thead tr:first-child th:nth-child(3)::after,
.results-table thead tr:first-child th:nth-child(4)::after {
  margin-left: 0.7rem;
}

.results-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  background-color: #fafafa;
}

.results-table tbody tr.results-table-divider th,
.results-table tbody tr.results-table-divider td {
  border-top-width: 2px;
  border-top-color: #b5b5b5;
}

.results-table .rank-2 {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.results-table .rank-3 {
  color: #888;
}

.results-table-footnote {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: left;
}

.forecast-radar-figure {
  width: 100%;
  margin: -0.35rem auto 0.35rem;
}

.forecast-radar-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.forecast-radar-caption {
  margin: 0 auto 1.25rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #363636;
}

.references-list {
  font-size: 0.9rem;
  line-height: 1.45;
}

.references-list li {
  margin-bottom: 0.65rem;
}

@media (max-width: 768px) {
  .results-table {
    font-size: 0.7rem;
  }

  .results-table th,
  .results-table td {
    padding: 0.28rem 0.35rem;
  }
}

/* Forecasting roll-out GIF row: three tiles at 30% width each */
.forecast-gif-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.forecast-gif-cell {
  flex: 0 0 30%;
  max-width: 30%;
  width: 30%;
  box-sizing: border-box;
  text-align: center;
  /* So 100cqi on the GIF = cell width (the 30% column), i.e. post-rotate horizontal span */
  container-type: inline-size;
  container-name: forecast-gif;
}

/*
 * Roll-out GIFs are 256×1024. We rotate 270° so the long axis reads horizontally; the
 * painted strip is ~100cqi wide × ~(256/1024)×100cqi tall, but the img’s layout box stays
 * tall unless we clip. This wrapper’s height is only the rotated AABB (aspect H/W).
 */
.gif-rot90-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: visible;
  box-sizing: border-box;
  gap: 0.35rem;
}

.gif-rot90-clip {
  width: 100%;
  max-width: 100cqi;
  margin: 0 auto;
  aspect-ratio: 1024 / 256;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gif-rot90-clip--ns {
  aspect-ratio: 220 / 40;
}

.gif-rot90-clip img {
  display: block;
  flex-shrink: 0;
  transform: rotate(270deg);
  transform-origin: center center;
  height: 100cqi;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
}

.forecast-ns-expand,
.img-gen-more-expand,
.method-details-expand {
  margin-top: 0.75rem;
  text-align: center;
}

.img-gen-more-expand {
  margin-top: 1.25rem;
}

.method-details-expand {
  margin-top: 1.25rem;
}

/* Physics intuition: full-width stacked layout on phones */
.physics-intuition-columns .column {
  min-width: 0;
}

@media screen and (max-width: 768px) {
  .physics-intuition-columns .column {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .physics-intuition-columns .box {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
}

.forecast-ns-expand > summary,
.img-gen-more-expand > summary,
.method-details-expand > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}

.forecast-ns-expand > summary::-webkit-details-marker,
.img-gen-more-expand > summary::-webkit-details-marker,
.method-details-expand > summary::-webkit-details-marker {
  display: none;
}

.forecast-ns-expand > summary::marker,
.img-gen-more-expand > summary::marker,
.method-details-expand > summary::marker {
  content: none;
}

.forecast-ns-expand[open] > summary,
.img-gen-more-expand[open] > summary,
.method-details-expand[open] > summary {
  margin-bottom: 1rem;
}

.forecast-ns-panel {
  margin-top: 0.5rem;
  text-align: left;
}

.img-gen-more-panel {
  margin-top: 0.75rem;
  text-align: center;
}

.method-details-panel {
  margin-top: 0.75rem;
  text-align: center;
}

.method-details-panel .recfm-algorithm {
  margin: 1.5rem 0 0;
  max-width: 100%;
  width: 100%;
  text-align: left;
}

.method-details-panel .method-math {
  margin: 0.75rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.method-details-panel .method-math mjx-container {
  margin: 0 !important;
}

.method-details-panel mjx-container {
  max-width: 100%;
}

/* RecFM training algorithm (method details) */
.recfm-algorithm {
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Override Bulma `.content figure figcaption { font-style: italic }` */
.content figure.recfm-algorithm figcaption.recfm-algorithm__caption {
  text-align: center;
  font-size: 0.92rem;
  font-style: normal;
  margin-bottom: 0.75rem;
  color: #363636;
}

.content figure.recfm-algorithm .recfm-algorithm__label {
  font-weight: 700;
  font-style: normal;
  margin-right: 0.35rem;
}

.recfm-algorithm__body {
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  background-color: #fafafa;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  text-align: left;
}

.recfm-algorithm__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  text-align: left;
}

.recfm-algorithm__col-num {
  width: 2.75rem;
}

.recfm-algorithm__table td {
  padding: 0.2rem 0;
  vertical-align: top;
  border: none;
  line-height: 1.5;
  text-align: left;
}

.recfm-algorithm__num {
  color: #888;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.82rem;
  user-select: none;
  white-space: nowrap;
  padding-right: 0.75rem;
  vertical-align: top;
}

.recfm-algorithm__stmt {
  text-align: left;
  padding-left: 0;
}

.recfm-algorithm__stmt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
  width: 100%;
}

.recfm-algorithm__stmt-main {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

/* One tab = 2em per nesting level inside for-loops */
.recfm-algorithm__stmt-row--indent-1 {
  padding-left: 2em;
}

.recfm-algorithm__stmt-row--indent-2 {
  padding-left: 4em;
}

.recfm-algorithm__comment-inline {
  flex: 0 0 auto;
  margin-left: auto;
  color: #777;
  font-size: 0.78rem;
  font-style: italic;
  text-align: right;
  max-width: 44%;
  line-height: 1.35;
}

.recfm-algorithm__table mjx-container {
  display: inline !important;
  margin: 0 !important;
  vertical-align: baseline;
}

.recfm-algorithm__table mjx-container[display="true"] {
  display: inline !important;
}

@media (max-width: 768px) {
  .recfm-algorithm__stmt-row .recfm-algorithm__comment-inline {
    flex-basis: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-left: 1.5em;
    text-align: right;
  }
}

.img-gen-more-panel figure {
  margin: 0 auto 1rem;
  max-width: 100%;
}

.img-gen-more-panel figure img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.img-gen-more-panel figcaption {
  margin-top: 0.5rem;
  line-height: 1.35;
}

.noisy-comparison {
  max-width: 58rem;
  margin: 0.75rem auto 1.5rem;
}

.noisy-comparison__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.noisy-comparison__panel {
  min-width: 0;
}

.noisy-comparison__label {
  margin-bottom: 0.55rem !important;
}

.noisy-comparison__panel img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid #e0e0e0;
}

.noisy-comparison__panel--recfm img {
  border-color: #d6d6d6;
}

.noisy-comparison__controls {
  max-width: 34rem;
  margin: 1rem auto 0;
}

.noisy-comparison__readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #555;
}

.noisy-comparison__readout strong {
  color: #333;
}

.noisy-comparison__controls input[type="range"] {
  width: 100%;
}

.noisy-comparison__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #777;
}

@media screen and (max-width: 768px) {
  .noisy-comparison__grid {
    grid-template-columns: 1fr;
  }
}

.forecast-gif-row--pair {
  justify-content: space-between;
}

.forecast-gif-row--pair .forecast-gif-cell {
  flex: 0 0 47%;
  max-width: 47%;
  width: 47%;
}

.forecast-gif-row--trio {
  justify-content: space-between;
}

.forecast-gif-row--trio .forecast-gif-cell {
  flex: 0 0 31%;
  max-width: 31%;
  width: 31%;
}

@media screen and (max-width: 768px) {
  .forecast-gif-row--pair .forecast-gif-cell {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .forecast-gif-row--trio .forecast-gif-cell {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .forecast-gif-cell {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }
}

.gif-rot90-wrap .gif-rot90-caption,
.content .gif-rot90-caption {
  margin: 0 !important;
  padding: 0;
  line-height: 1.2;
}
