:root {
  --ars-gallery-red: #94132f;
  --ars-gallery-teal: #01969c;
  --ars-gallery-orange: #ff8f1f;
  --ars-gallery-ink: #20242a;
  --ars-gallery-muted: #5e6670;
  --ars-gallery-soft: #eef7f7;
}

.ars-gallery-overview,
.ars-gallery-detail {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--ars-gallery-ink);
}

.ars-gallery-detail > h1 {
  margin: .1em 0 .55em;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: .98;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.ars-gallery-overview__header {
  margin-bottom: var(--ars-static-header-gap, clamp(2rem, 4.5vw, 3.25rem));
}

.ars-gallery-overview__header span {
  color: #006f74;
}

.ars-gallery-kicker {
  margin: 0 0 var(--ars-static-eyebrow-gap, .6rem);
  color: #006f74;
  font-size: var(--ars-static-eyebrow-size, clamp(.86rem, 2.2vw, 1rem));
  font-weight: 800;
  letter-spacing: var(--ars-static-eyebrow-spacing, .14em);
}

.ars-gallery-cards {
  display: grid;
  gap: 1.5rem;
}

.ars-gallery-filter {
  margin: 0 0 2rem;
  overflow: hidden;
  border: 1px solid #d9dedf;
  border-radius: .35rem;
  background: #fff;
}

.ars-gallery-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.8rem;
  padding: .95rem 1.25rem;
  cursor: pointer;
  list-style: none;
  color: var(--ars-gallery-ink);
  font-size: clamp(1rem, 3vw, 1.18rem);
  font-weight: 750;
}

.ars-gallery-filter summary::-webkit-details-marker { display: none; }

.ars-gallery-filter summary::after {
  flex: 0 0 auto;
  width: .78rem;
  height: .78rem;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  color: #006f74;
  content: "";
  transform: rotate(45deg);
  transform-origin: 62% 62%;
  transition: transform .18s ease;
}

.ars-gallery-filter[open] summary {
  border-bottom: 1px solid #d9dedf;
  background: #eaf3ff;
  color: #0b63ce;
}

.ars-gallery-filter[open] summary::after { transform: rotate(225deg); }

.ars-gallery-filter summary:focus-visible {
  outline: .2rem solid var(--ars-gallery-orange);
  outline-offset: -.25rem;
}

.ars-gallery-filter form {
  padding: clamp(1rem, 3vw, 1.35rem);
  background: var(--ars-gallery-soft);
}

.ars-gallery-filter__controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  align-items: end;
  gap: .65rem;
}

.ars-gallery-filter label {
  display: block;
  margin-bottom: .3rem;
  font-weight: 800;
}

.ars-gallery-filter__field {
  min-width: 0;
}

.ars-gallery-filter__field--small {
  max-width: 8rem;
}

.ars-gallery-filter select,
.ars-gallery-filter button {
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .75rem;
  border: 2px solid var(--ars-gallery-teal);
  border-radius: .2rem;
  background: #fff;
  color: var(--ars-gallery-ink);
  font: inherit;
}

.ars-gallery-filter button {
  background: var(--ars-gallery-teal);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.ars-gallery-filter a {
  color: var(--ars-gallery-red);
  font-weight: 750;
}

.ars-gallery-filter select:focus-visible,
.ars-gallery-filter button:focus-visible,
.ars-gallery-filter a:focus-visible {
  outline: .2rem solid var(--ars-gallery-orange);
  outline-offset: .15rem;
}

.ars-gallery-card {
  border: 1px solid #c8d7d8;
  border-radius: .35rem;
  background: #fff;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.ars-gallery-card:has(a:hover),
.ars-gallery-card:has(a:focus-visible) {
  transform: translateY(-2px);
  box-shadow: 0 .65rem 1.4rem rgba(19, 51, 54, .14);
}

.ars-gallery-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ars-gallery-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #dfe8e8;
  overflow: hidden;
}

.ars-gallery-cover img,
.ars-gallery-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ars-gallery-cover span {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  padding: .35rem .6rem;
  background: rgba(25, 20, 22, .82);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}

.ars-gallery-card-copy {
  position: relative;
  min-height: 10rem;
  padding: 1.2rem 1.25rem 1.25rem;
  border-left: .45rem solid var(--ars-gallery-teal);
}

.ars-gallery-card-copy > p:first-child {
  margin: 0 0 .35rem;
  color: var(--ars-gallery-muted);
  font-weight: 700;
}

.ars-gallery-card h2 {
  margin: 0 0 .55rem;
  font-size: 1.45rem;
  line-height: 1.12;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.ars-gallery-card-copy > p:not(:first-child) {
  padding-right: 2.75rem;
}

.ars-gallery-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .8rem 2.75rem 0 0;
  padding: 0;
  list-style: none;
}

.ars-gallery-card-tags li {
  padding: .24rem .55rem;
  border: 1px solid #b8d8da;
  border-radius: 999px;
  background: #eef7f7;
  color: #006f74;
  font-size: .78rem;
  font-weight: 750;
}

.ars-gallery-arrow {
  position: absolute;
  right: 1.25rem;
  bottom: 1.05rem;
  color: var(--ars-gallery-red);
  font-size: 2rem;
  font-weight: 800;
}

.ars-gallery-back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--ars-gallery-red);
  font-weight: 750;
}

.ars-gallery-date {
  color: var(--ars-gallery-muted);
  font-weight: 700;
}

.ars-gallery-intro {
  margin: 1.5rem 0 2.5rem;
  font-size: 1.15rem;
  line-height: 1.55;
}

.ars-gallery-grid {
  display: grid;
  gap: 1rem;
}

.ars-gallery-figure {
  margin: 0;
  border: 1px solid #cfd7d8;
  background: #fff;
}

.ars-gallery-image-wrap,
.ars-gallery-stage {
  position: relative;
}

.ars-gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 4 / 3;
  background: #e7ecec;
  cursor: zoom-in;
}

.ars-gallery-open:focus-visible {
  outline: .25rem solid var(--ars-gallery-orange);
  outline-offset: .2rem;
}

.ars-gallery-figure figcaption,
.ars-gallery-dialog figcaption {
  padding: .65rem .8rem;
  color: var(--ars-gallery-muted);
}

.ars-gallery-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: .45rem .7rem;
  background: rgba(24, 25, 28, .82);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
}

.ars-gallery-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #15191f;
  color: #fff;
  overflow-y: auto;
}

.ars-gallery-dialog::backdrop { background: rgba(5, 7, 9, .88); }

.ars-gallery-dialog__top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.85rem, 2.2vw, 1.35rem) clamp(1rem, 4vw, 1.75rem) 0;
  background: transparent;
}

.ars-gallery-dialog__brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.ars-gallery-dialog__brand:focus,
.ars-gallery-dialog__brand:focus-visible {
  outline: none;
}

.ars-gallery-dialog__brand img {
  display: block;
  width: clamp(2.8rem, 5.5vw, 4rem);
  height: auto;
}

.ars-gallery-close {
  position: fixed;
  top: clamp(.8rem, 2vw, 1.25rem);
  right: clamp(1rem, 3vw, 1.75rem);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .15rem 2rem .15rem 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(.92rem, 2vw, 1.08rem);
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.ars-gallery-close::before,
.ars-gallery-close::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1.35rem;
  height: .16rem;
  background: currentColor;
  border-radius: 0;
  transform-origin: center;
}

.ars-gallery-close::before {
  transform: translateY(-50%) rotate(45deg);
}

.ars-gallery-close::after {
  transform: translateY(-50%) rotate(-45deg);
}

.ars-gallery-close:focus-visible {
  outline: 0;
  text-decoration: underline;
  text-decoration-thickness: .12em;
  text-underline-offset: .18em;
}

.ars-gallery-dialog__title:focus {
  outline: none;
}

.ars-gallery-dialog__content {
  width: min(670px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.25rem) 0 clamp(3rem, 8vw, 5rem);
}

.ars-gallery-dialog__title {
  margin: 0 0 clamp(1.35rem, 3.5vw, 2rem);
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.12;
}

.ars-gallery-dialog__items {
  display: grid;
  gap: clamp(2.25rem, 7vw, 4.5rem);
}

.ars-gallery-dialog__figure {
  margin: 0;
}

.ars-gallery-dialog__media {
  position: relative;
  display: block;
  width: 100%;
  max-width: 670px;
  margin-inline: auto;
  line-height: 0;
  background: #0e1116;
}

.ars-gallery-dialog__media img {
  display: block;
  width: 100%;
  height: auto;
}

.ars-gallery-dialog .ars-gallery-dialog__caption {
  padding: .9rem 0 0;
  color: #fff;
  text-align: center;
}

.ars-gallery-dialog .ars-gallery-dialog__caption p {
  margin: 0 0 .7rem;
  color: #fff;
  font-weight: 750;
  line-height: 1.35;
}

.ars-gallery-dialog__download {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .1rem 0 1.1rem;
  color: #fff;
  font-weight: 800;
  text-decoration-thickness: .12em;
  text-underline-offset: .18em;
}

.ars-gallery-dialog__download::before {
  content: "↓";
  font-size: 1.15em;
  font-weight: 900;
}

.ars-gallery-dialog__download:focus-visible {
  outline: .22rem solid var(--ars-gallery-orange);
  outline-offset: .22rem;
}

.ars-gallery-dialog__counter {
  margin: 1rem 0 0;
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 900;
}

@media (min-width: 771px) {
  .ars-gallery-cards,
  .ars-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ars-gallery-cards > .ars-gallery-card:only-of-type {
    grid-column: 1 / -1;
    width: calc((100% - 1.5rem) / 2);
    justify-self: center;
  }
}

@media (min-width: 1025px) {
  .ars-gallery-overview,
  .ars-gallery-detail { margin: 0; }
}

@media (max-width: 770px) {
  .ars-gallery-overview,
  .ars-gallery-detail { padding-inline: 1rem; }
  .ars-gallery-dialog { padding: 0; }
  .ars-gallery-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ars-gallery-dialog__top { align-items: flex-start; padding-right: 4.5rem; }
  .ars-gallery-dialog__content { width: min(100% - 2rem, 670px); }
}

@media (prefers-reduced-motion: reduce) {
  .ars-gallery-card { transition: none; }
}

.ars-gallery-inline {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  border: 1px solid #d9dedf;
  border-radius: .35rem;
  background: #fff;
  overflow: hidden;
}

.ars-gallery-inline__header {
  padding: 1rem 1.15rem;
  border-left: .45rem solid var(--ars-gallery-teal);
}

.ars-gallery-inline__header p {
  margin: 0 0 .35rem;
  color: var(--ars-gallery-muted);
  font-weight: 700;
}

.ars-gallery-inline__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  line-height: 1.15;
}

.ars-gallery-inline__figure {
  margin: 0;
}

.ars-gallery-inline__stage {
  position: relative;
  background: #fff;
  font-size: 0;
  line-height: 0;
}

.ars-gallery-inline__stage .ars-inline-credit-image {
  display: block;
  width: 100%;
  max-width: none;
  font-size: 0;
  line-height: 0;
}

.ars-gallery-inline__stage img,
.ars-gallery-inline__image {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ars-gallery-inline__stage .ars-image-credit {
  display: none !important;
}

.ars-gallery-inline .ars-gallery-credit {
  right: 0;
  bottom: 0;
  margin: 0;
  border-radius: 0;
}

.ars-gallery-inline figcaption {
  position: relative;
  display: block;
  min-height: 3.6rem;
  padding: .45rem 4.5rem .85rem;
  color: var(--ars-gallery-muted);
  line-height: 1.45;
  text-align: center;
}

.ars-gallery-inline figcaption strong {
  position: absolute;
  top: 50%;
  right: 1rem;
  color: var(--ars-gallery-teal);
  font-weight: 850;
  transform: translateY(-50%);
}

.ars-gallery-inline__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: transparent;
  font-size: 0;
  line-height: 1;
  text-align: center;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  transform: translateY(-50%);
  cursor: pointer;
}

.ars-gallery-inline__nav--prev { left: .75rem; }
.ars-gallery-inline__nav--next { right: .75rem; }

.ars-gallery-inline__nav::before {
  content: "";
  display: block;
  width: .78rem;
  height: .78rem;
  border-top: .24rem solid var(--ars-gallery-red);
  border-right: .24rem solid var(--ars-gallery-red);
  box-sizing: border-box;
}

.ars-gallery-inline__nav--prev::before {
  transform: translateX(.12rem) rotate(-135deg);
}

.ars-gallery-inline__nav--next::before {
  transform: translateX(-.12rem) rotate(45deg);
}

.ars-gallery-inline__nav:focus-visible {
  outline: .22rem solid var(--ars-gallery-orange);
  outline-offset: .12rem;
}
