.hero-gallery {
  display: grid;
  align-content: start;
  min-width: 0;
}

.gallery-controls {
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 2px 10px;
}

.hero-gallery .hero-image {
  grid-area: 2 / 1;
  align-self: start;
}

.hero-gallery .hero-image[inert] {
  visibility: hidden;
}

.gallery-controls select {
  width: 100%;
  color: var(--ink);
  background-color: #14223b;
  border: 1px solid #42597d;
  border-radius: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.hero-project-link {
  flex-basis: 100%;
  width: fit-content;
  margin-top: 2px;
  color: var(--blue);
  font-weight: 650;
}

.hero-project-link:hover {
  text-decoration: underline;
}

.gallery-buttons {
  display: flex;
  gap: 4px;
}

.gallery-buttons button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--blue);
  background: #14223b;
  border: 1px solid #42597d;
  border-radius: 8px;
}

.gallery-buttons button:hover {
  color: var(--ink);
  background: #203452;
}

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

.gallery-photo {
  aspect-ratio: 3 / 2;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-landmarks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gallery-landmarks polyline {
  fill: none;
  stroke: #ffe369;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 1px #101423);
}

.gallery-landmarks circle {
  fill: #ff4355;
  stroke: #101423;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}

.gallery-caption {
  padding: 14px 16px 16px;
}

.gallery-title {
  color: var(--ink);
  font-size: 1.03rem;
  font-weight: 760;
}

.gallery-note {
  margin-top: 3px;
  font-size: .82rem;
}

.gallery-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: .77rem;
  color: #bdeeff;
}

.gallery-topics li {
  padding: 4px 8px;
  border: 1px solid #42597d;
  border-radius: 6px;
}

.gallery-study {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #344963;
}

.hero-measurement-lists + .gallery-study {
  margin: 0;
  padding: 13px 14px 15px;
}

.gallery-study h3 { color: var(--ink); font-size: .96rem; }
.gallery-study p { margin-top: 3px; color: #becde1; font-size: .82rem; }
.gallery-study dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr));
  gap: 7px;
  margin: 10px 0;
}
.gallery-study dl div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #122940;
}
.gallery-study dt { flex: 1; font-size: .74rem; line-height: 1.22; }
.gallery-study dd { margin: 0; color: #a3e8ff; font-size: 1.17rem; font-weight: 730; font-variant-numeric: tabular-nums; }
.gallery-study small { display: block; color: #becde1; font-size: .73rem; font-weight: 500; line-height: 1.1; }
.gallery-study a { font-size: .77rem; color: #9bdbff; text-decoration: underline; }

@media (min-width: 761px) {
  .hero-grid > .hero-copy {
    align-self: start;
    margin-block-start: clamp(70px, 10vw, 145px);
  }
}

@media (max-width: 760px) {
  .hero-gallery .hero-image[inert] {
    display: none;
  }
}

@media (max-width: 480px) {
  .gallery-controls select {
    font-size: .91rem;
  }
}

.gallery-frame-measurements { margin-top: 10px; }
.gallery-frame-measurements:empty { display: none; }
.gallery-reference-picker { margin-top: 12px; font-size: .82rem; }
.gallery-measure-overlay path, .gallery-measure-overlay line {
  fill: none;
  stroke: #a4efff;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.gallery-measure-overlay text {
  fill: #d9fbff;
  stroke: #081525;
  stroke-width: 4.2px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  text-anchor: middle;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.gallery-dimension line {stroke-dasharray:4 2;stroke:#8ddfba}
.gallery-dimension text {fill:#b7ffda}
