/* Shared surfaces and controls across project pages, figures and navigation. */
.md-content__inner.md-typeset h2#team-celebration {
  text-align: center;
}
:root, [data-md-color-scheme] {
  --mach-radius: 0.45rem;
  --mach-border: var(--md-default-fg-color--lightest);
  --mach-surface: color-mix(in srgb, var(--md-default-fg-color) 3%, var(--md-default-bg-color));
}
.mach-control,
.md-typeset a.find-out-more,
.md-typeset a.md-button {
  align-items: center;
  background: var(--md-default-bg-color);
  background-image: none !important;
  border: 1px solid var(--mach-border);
  border-radius: var(--mach-radius);
  color: var(--md-default-fg-color) !important;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1.4;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  text-decoration: none !important;
  transition: background-color 150ms, border-color 150ms;
  cursor: pointer;
}
.mach-control:hover,
.md-typeset a.find-out-more:hover,
.md-typeset a.md-button:hover {
  background: var(--mach-surface);
  border-color: var(--md-default-fg-color--light);
}
.mach-control:focus-visible, .hero-motion-toggle:focus-visible,
.timeline-controls :is(a, select):focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}
.mach-control:disabled { opacity: 0.45; cursor: default; }
.md-typeset :is(.test-item, .subsystem-item, .gare-timeline__card) {
  border-color: var(--mach-border);
  border-radius: var(--mach-radius);
  box-shadow: none;
  background: var(--mach-surface);
}
.md-typeset :is(.test-item, .subsystem-item):hover { transform: none; box-shadow: none; }
.md-typeset :is(.test-gallery, .subsystem-gallery) { gap: 1rem; }
.md-typeset :is(.test-item, .subsystem-item) { display: flex; flex-direction: column; align-items: flex-start; }
.md-typeset :is(.test-item, .subsystem-item) .find-out-more { margin-top: auto; }

/* All portraits have the same crop; initials occupy the same area as a photo. */
.md-typeset .team-leads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-typeset .team-leads img,
.md-typeset .team-leads .team-initials {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  border-radius: 0.25rem;
}
.md-typeset .team-leads .team-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mach-surface);
  border: 1px solid var(--mach-border);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.05em;
}
.md-typeset .team-leads img[alt="Jonathan Al-Hinn"],
.md-typeset .team-leads img[alt="Madison Warren"] {
  object-position: center top;
}
.former-member-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  background: var(--mach-surface);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}
.hero-motion-toggle {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  color: #fff;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
}
.hero-motion-toggle::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
}
.hero-motion-toggle:hover::before, .hero-motion-toggle:focus-visible::before { background: rgb(0 0 0 / 80%); }
.hero-motion-toggle svg { position: relative; width: 12px; height: 12px; fill: currentColor; }
.hero-motion-toggle .hero-motion-icon--pause,
.hero-motion-toggle[data-playing="true"] .hero-motion-icon--play { display: none; }
.hero-motion-toggle[data-playing="true"] .hero-motion-icon--pause { display: block; }
.hero-motion-toggle[hidden] { display: none; }

.md-content img.mach-plot { max-height: none; }
.plot-actions { display: flex; justify-content: flex-end; width: 100%; margin: 0.6rem 0; }
body.plot-viewer-open { overflow: hidden; }
dialog.plot-viewer {
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  border: 1px solid var(--mach-border);
  border-radius: var(--mach-radius);
  margin: auto;
  padding: 1rem;
  width: min(96vw, 1700px);
  height: 92dvh;
  max-width: 96vw;
  max-height: 96dvh;
}
dialog.plot-viewer[open] { display: flex; flex-direction: column; gap: 0.65rem; }
.plot-viewer::backdrop { background: rgb(0 0 0 / 70%); }
.plot-viewer__header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.plot-viewer__header h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.plot-viewer__toolbar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.plot-viewer__toolbar output { min-width: 2rem; font-size: 0.75rem; text-align: center; }
.plot-viewer__stage {
  background: white;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--mach-border);
  border-radius: 0.2rem;
  padding: 12px;
}
.plot-viewer__stage img { max-width: none; max-height: none; height: auto; margin: 0 auto; }
.plot-viewer[data-plot-theme="dark"] .plot-viewer__stage { background: #0b0d0f; }
.plot-viewer__hint { font-size: 0.65rem; color: var(--md-default-fg-color--light); margin: 0; }

.timeline-controls { margin: 1.5rem 0 0; }
.md-header__button.mach-drawer-toggle {
  min-height: 44px;
  min-width: 44px;
}
@media screen and (max-width: 37.484375em) {
  .md-header__button.mach-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
  }
}
/* Selected sidebar links sit on a tinted surface, not the page's white. */
[data-md-color-scheme="default"] .md-nav--primary .md-nav__item .md-nav__link--active { color: #354bcc; }
@media screen and (max-width: 37.484375em) {
  .md-header__inner { min-height: 48px; }
  .md-header__button.mach-drawer-toggle { margin: 0; }
}
.gare-tag { color: var(--md-default-fg-color); }
.timeline-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.65rem; }
.timeline-filters label { display: flex; flex: 1 1 9rem; flex-direction: column; gap: 0.3rem; font-size: 0.68rem; font-weight: 600; }
.timeline-filters select {
  appearance: auto;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border: 1px solid var(--mach-border);
  border-radius: var(--mach-radius);
  font: inherit;
  min-height: 44px;
  width: 100%;
  padding: 0.45rem 0.65rem;
}
.timeline-years { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; margin: 0.7rem 0 0; }
.timeline-years a { display: inline-flex; min-height: 44px; align-items: center; font-size: 0.7rem; padding: 0 0.25rem; }
.timeline-filter-status { font-size: 0.68rem; color: var(--md-default-fg-color--light); }
.gare-timeline__year { scroll-margin-top: 7rem; }
.gare-timeline > [hidden], .timeline-years > [hidden] { display: none !important; }
@media (max-width: 600px) {
  section.video-showcase h2, section.about h2 { font-size: 1.4rem; line-height: 1.3; }
  section.about, section.video-showcase, section.photo-showcase { margin-bottom: 2rem; }
  .md-typeset .team-leads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-typeset .team-leads li { padding: 0.6rem; }
  .md-typeset .team-leads .team-initials { font-size: 2rem; }
  .timeline-filters label { flex-basis: calc(50% - 0.65rem); }
  dialog.plot-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 0.6rem; }
  .plot-viewer .mach-control { padding: 0.4rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mach-control { transition: none; }
}
.hotfire-frame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.md-typeset .hotfire-frame-grid figure { margin: 0; min-width: 0; }
.md-typeset .hotfire-frame-grid img { display: block; width: 100%; height: auto; border-radius: 8px; }

.seraphina-team-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.seraphina-team-gallery--single { grid-template-columns: minmax(0, 1fr); max-width: 960px; margin: 1.5rem auto; }
.md-typeset .seraphina-team-gallery figure { margin: 0; min-width: 0; width: 100%; }
.seraphina-team-photo { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; }
.md-typeset .seraphina-team-photo img {
  position: absolute;
  display: block;
  width: var(--photo-width);
  max-width: none;
  max-height: none;
  height: auto;
  left: var(--photo-left);
  top: var(--photo-top);
  margin: 0;
}
.md-typeset .seraphina-team-gallery figcaption { margin: .5rem 0 0; font-size: .75rem; line-height: 1.4; text-align: center; }
.md-typeset h2#team-celebration + .seraphina-team-gallery figcaption { margin-inline: auto; width: 100%; max-width: none; }
@media (max-width: 760px) { .seraphina-team-gallery { grid-template-columns: 1fr; } }
.md-typeset .hotfire-frame-grid figcaption { margin-top: .6rem; text-align: center; }
.hotfire-downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1rem 0 2rem; }
@media (max-width: 600px) {
  .hotfire-frame-grid { grid-template-columns: 1fr; }
  .hotfire-downloads .md-button { width: 100%; text-align: center; }
}
