/* Case studies — list (/use-cases/) + detail (/use-cases/*.html)
   Structure adapted from a reference case-study collection, re-skinned with
   the site's existing Apple-style light/dark tokens. */

.cs-page {
  background: var(--surface-bg, #fbfbfd);
  color: var(--text-primary, #1d1d1f);
  flex: 1 0 auto;
  font-family: var(--font-text, -apple-system, sans-serif);
}

.cs-container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.cs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */
.cs-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(104px, 11vw, 156px) 0 clamp(64px, 7vw, 96px);
  background:
    radial-gradient(ellipse 55% 60% at 12% 18%, var(--accent-tint, #0071e314), transparent 70%),
    radial-gradient(ellipse 46% 52% at 88% 78%, #ffa6571a, transparent 72%),
    linear-gradient(180deg, #eaf3ff0a, var(--surface-bg, #fbfbfd) 78%);
}

.cs-hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 40%, var(--accent-tint, #0071e314), transparent 72%);
}

.cs-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.cs-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent, #0071e3);
  margin: 0 0 18px;
}

.cs-eyebrow::after {
  content: "";
  display: inline-block;
  width: 56px;
  height: 1px;
  margin-left: 14px;
  vertical-align: middle;
  background: var(--rule-strong, #00000024);
}

.cs-hero__title {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(40px, 6.2vw, 78px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.04;
  margin: 0 0 22px;
}

.cs-hero__lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary, #86868b);
  max-width: 620px;
  margin: 0 0 32px;
}

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

.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 10px;
  border: 1px solid var(--rule, #00000014);
  border-radius: 980px;
  background: var(--surface-card, #fff);
  color: var(--text-primary, #1d1d1f);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-card, 0 1px 3px #0000000a);
  transition: border-color .25s, transform .25s;
}

.cs-chip:hover {
  border-color: var(--accent, #0071e3);
  transform: translateY(-2px);
}

.cs-chip span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-tint, #0071e314);
  color: var(--accent, #0071e3);
  font-size: 11px;
  font-weight: 700;
}

.cs-counter {
  padding: 34px 32px 30px;
  border: 1px solid var(--rule, #00000014);
  border-radius: 26px;
  background: var(--surface-card, #fff);
  box-shadow: var(--shadow-card, 0 1px 3px #0000000a, 0 8px 24px #0000000f);
}

.cs-counter__value {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(64px, 7vw, 92px);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .95;
  color: var(--accent, #0071e3);
  margin: 0 0 10px;
}

.cs-counter__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
  margin: 0;
}

.cs-counter__rule {
  height: 1px;
  background: var(--rule, #00000014);
  margin: 26px 0 22px;
}

.cs-counter__split {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.cs-counter__split li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-counter__split .n {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--text-primary, #1d1d1f);
}

.cs-counter__split .k {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
}

.cs-counter__note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary, #86868b);
  margin: 24px 0 0;
}

/* ---------- Sort bar ---------- */
.cs-bar {
  border-top: 1px solid var(--rule, #00000014);
  border-bottom: 1px solid var(--rule, #00000014);
  background: var(--surface-bg, #fbfbfd);
}

.cs-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.cs-bar__label,
.cs-bar__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
  margin: 0;
}

.cs-bar__meta {
  font-weight: 500;
  letter-spacing: .06em;
}

/* ---------- Grid ---------- */
.cs-body {
  background: var(--surface-band, #f5f5f7);
  padding: clamp(48px, 6vw, 76px) 0 clamp(72px, 8vw, 104px);
}

.cs-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
}

.cs-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rule, #00000014);
  border-radius: var(--radius-card, 22px);
  background: var(--surface-card, #fff);
  box-shadow: var(--shadow-card, 0 1px 3px #0000000a, 0 8px 24px #0000000f);
  transition: transform .35s var(--ease-soft, cubic-bezier(.16, 1, .3, 1)), box-shadow .35s var(--ease-soft, cubic-bezier(.16, 1, .3, 1));
}

.cs-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover, 0 4px 6px #0000000d, 0 20px 50px #0000001a);
}

.cs-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-band, #f5f5f7);
}

.cs-card__media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cs-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease-soft, cubic-bezier(.16, 1, .3, 1));
}

.cs-card:hover .cs-card__media img {
  transform: scale(1.045);
}

.cs-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  border-radius: 8px;
  background: #ffffffeb;
  color: #0066cc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px #0000001a;
  backdrop-filter: blur(8px);
}

.cs-card__flag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 980px;
  background: var(--accent, #0071e3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cs-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 26px;
}

.cs-card__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent, #0071e3);
  margin: 0 0 12px;
}

.cs-card__title {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.3;
  margin: 0 0 12px;
}

.cs-card__title a {
  color: var(--text-primary, #1d1d1f);
  text-decoration: none;
}

.cs-card__title a:hover {
  color: var(--accent, #0071e3);
}

.cs-card__summary {
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--text-secondary, #86868b);
  margin: 0 0 20px;
  flex: 1;
}

.cs-card__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 0 0;
  margin: 0 0 18px;
  border-top: 1px solid var(--rule, #00000014);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
}

.cs-card__meta li + li {
  position: relative;
  padding-left: 16px;
}

.cs-card__meta li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.cs-card__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent, #0071e3);
  text-decoration: none;
}

.cs-card__link span {
  transition: transform .25s var(--ease-soft, cubic-bezier(.16, 1, .3, 1));
}

.cs-card__link:hover span {
  transform: translateX(5px);
}

/* Lead card spans the first two columns with a horizontal split */
.cs-card--lead {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
}

.cs-card--lead .cs-card__media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 340px;
}

.cs-card--lead .cs-card__body {
  padding: clamp(30px, 3.4vw, 46px);
  justify-content: center;
}

.cs-card--lead .cs-card__title {
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.cs-card--lead .cs-card__summary {
  font-size: 16px;
  line-height: 1.62;
}

/* ---------- CTA ---------- */
.cs-cta {
  background: var(--surface-bg, #fbfbfd);
  padding: clamp(64px, 8vw, 96px) 0;
  text-align: center;
}

.cs-cta__inner h2 {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

.cs-cta__inner p {
  font-size: 17px;
  color: var(--text-secondary, #86868b);
  margin: 0 0 28px;
}

.cs-btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 980px;
  background: var(--accent, #0071e3);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: opacity .25s, transform .25s;
}

.cs-btn:hover {
  opacity: .88;
  transform: translateY(-2px);
}

/* ---------- Detail ---------- */
.cs-detail-hero {
  position: relative;
  padding: clamp(112px, 10vw, 148px) 0 clamp(44px, 5vw, 64px);
  background:
    radial-gradient(ellipse 55% 60% at 14% 12%, var(--accent-tint, #0071e314), transparent 70%),
    linear-gradient(180deg, #eaf3ff0a, var(--surface-bg, #fbfbfd) 82%);
}

.cs-back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent, #0071e3);
  text-decoration: none;
}

.cs-back:hover {
  text-decoration: underline;
}

.cs-detail-hero .cs-eyebrow {
  margin-bottom: 16px;
}

.cs-detail-title {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(32px, 4.6vw, 58px);
  font-weight: 700;
  letter-spacing: -.032em;
  line-height: 1.1;
  margin: 0 0 20px;
}

.cs-detail-summary {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary, #86868b);
  margin: 0;
}

.cs-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule, #00000014);
}

.cs-detail-meta div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-detail-meta dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
}

.cs-detail-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent, #0071e3);
}

.cs-detail-media {
  position: relative;
  width: min(1080px, calc(100% - 48px));
  margin: clamp(28px, 4vw, 48px) auto 0;
}

.cs-detail-media img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  border-radius: 26px;
  box-shadow: 0 12px 40px #0000001a;
}

.cs-detail-media.is-zoomable {
  cursor: zoom-in;
}

.cs-detail-media.is-zoomable img {
  transition: opacity .25s;
}

.cs-detail-media.is-zoomable:hover img {
  opacity: .92;
}

.cs-detail-media.is-zoomable::after {
  content: "View full image";
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 980px;
  background: #ffffffeb;
  color: #1d1d1f;
  font-family: var(--font-text, system-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  pointer-events: none;
  box-shadow: 0 2px 10px #0000001a;
}

.cs-prose {
  max-width: 840px;
  margin: 0 auto;
  padding: clamp(44px, 5vw, 68px) 24px clamp(32px, 4vw, 56px);
}

.cs-prose h2 {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 44px 0 14px;
  color: var(--text-primary, #1d1d1f);
}

.cs-prose p {
  font-size: 17px;
  line-height: 1.75;
  color: #3a3a3c;
  margin: 0 0 18px;
}

.cs-prose .cs-lede {
  font-size: 20px;
  line-height: 1.65;
  color: var(--text-primary, #1d1d1f);
  margin-bottom: 26px;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 40px;
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  border: 1px solid var(--rule, #00000014);
  border-radius: var(--radius-tile, 18px);
  background: var(--surface-band, #f5f5f7);
}

.cs-stat__value {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
  color: var(--accent, #0071e3);
}

.cs-stat__unit {
  font-size: 14px;
  font-weight: 650;
  margin-left: 4px;
  letter-spacing: 0;
}

.cs-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
}

.cs-products {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 0 0 12px;
  padding: 0;
}

.cs-products li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: #3a3a3c;
}

.cs-products li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-tint-strong, #0071e338);
  border: 1.5px solid var(--accent, #0071e3);
}

/* Ratio-aware mosaic: landscape images run full width, portrait images
   pair up side by side, a lone portrait is centred as a detail shot.
   Classes are applied by initCaseStudyMedia() in skin/js/site.js. */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin: 28px 0 8px;
}

.cs-gallery figure {
  grid-column: span 1;
  min-width: 0;
  margin: 0;
}

.cs-gallery figure.cs-fig--wide {
  grid-column: span 2;
}

.cs-gallery figure.cs-fig--solo {
  grid-column: span 2;
  width: min(420px, 100%);
  margin-inline: auto;
}

.cs-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: var(--surface-band, #f5f5f7);
}

.cs-gallery.is-zoomable figure {
  cursor: zoom-in;
}

.cs-gallery.is-zoomable img {
  transition: opacity .25s;
}

.cs-gallery.is-zoomable figure:hover img {
  opacity: .88;
}

.cs-gallery figcaption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary, #86868b);
  margin-top: 9px;
}

.cs-detail-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4vw, 48px);
}

.cs-detail-nav__side {
  min-width: 0;
}

.cs-detail-nav__side--next {
  text-align: right;
}

.cs-detail-nav__link {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--accent, #0071e3);
  text-decoration: none;
}

.cs-detail-nav__label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary, #86868b);
}

/* Full pre/next titles: never clip, wrap on any long word instead. */
.cs-detail-nav__title {
  display: block;
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.01em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cs-detail-nav__link:hover .cs-detail-nav__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-detail-nav__center {
  padding-top: 2px;
}

.cs-detail-nav__center a {
  display: inline-block;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent, #0071e3);
  text-decoration: none;
}

.cs-detail-nav__center a:hover {
  text-decoration: underline;
}

.cs-detail-nav__empty {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary, #86868b);
}

.cs-related {
  background: var(--surface-band, #f5f5f7);
  padding: clamp(56px, 7vw, 84px) 0;
}

.cs-related h2 {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -.025em;
  text-align: center;
  margin: 0 0 36px;
}

.cs-related .cs-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cs-card--compact .cs-card__title {
  font-size: 17px;
  line-height: 1.32;
}

.cs-card--compact .cs-card__summary {
  display: none;
}

.cs-card--compact .cs-card__body {
  flex: 1;
  padding: 20px 20px 22px;
}

.cs-card--compact .cs-card__kicker {
  margin-bottom: 10px;
}

.cs-card--compact .cs-card__title {
  margin-bottom: 18px;
}

.cs-detail-cta {
  background: var(--surface-bg, #fbfbfd);
  padding: clamp(64px, 8vw, 92px) 24px;
  text-align: center;
}

.cs-detail-cta h2 {
  font-family: var(--font-display, -apple-system, sans-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

.cs-detail-cta p {
  font-size: 17px;
  color: var(--text-secondary, #86868b);
  margin: 0 0 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cs-hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cs-counter {
    max-width: 520px;
  }

  .cs-grid,
  .cs-related .cs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-card--lead {
    grid-column: span 2;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .cs-container {
    width: min(1200px, calc(100% - 32px));
  }

  .cs-hero {
    padding-top: 108px;
  }

  .cs-hero__title {
    font-size: clamp(36px, 10vw, 52px);
  }

  .cs-grid,
  .cs-related .cs-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cs-card--lead {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .cs-card--lead .cs-card__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .cs-card--lead .cs-card__body {
    padding: 24px 24px 26px;
  }

  .cs-card--lead .cs-card__title {
    font-size: 23px;
  }

  .cs-bar__inner {
    padding: 14px 0;
  }

  .cs-detail-meta {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .cs-detail-media {
    width: calc(100% - 32px);
  }

  .cs-detail-media img {
    height: 300px;
    border-radius: 20px;
  }

  .cs-detail-media.is-zoomable::after {
    right: 12px;
    bottom: 12px;
    padding: 6px 11px;
    font-size: 11px;
  }

  .cs-stats {
    grid-template-columns: 1fr 1fr;
  }

  .cs-products {
    grid-template-columns: 1fr;
  }

  .cs-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cs-gallery figure,
  .cs-gallery figure.cs-fig--wide,
  .cs-gallery figure.cs-fig--solo {
    grid-column: span 1;
    width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 480px) {
  .cs-stats {
    grid-template-columns: 1fr;
  }

  .cs-detail-meta {
    grid-template-columns: 1fr;
  }
}

/* ---------- Detail prev/next navigation ---------- */
@media (max-width: 1024px) {
  .cs-detail-nav {
    gap: 20px;
  }
}

@media (max-width: 700px) {
  .cs-detail-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 0 16px 44px;
  }

  .cs-detail-nav__side--next {
    text-align: left;
  }

  .cs-detail-nav__center {
    order: 3;
    padding-top: 0;
  }
}

/* ---------- Lightbox ---------- */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000ed;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.cs-lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1400px);
  text-align: center;
}

.cs-lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 32px 120px #000c;
}

.cs-lightbox__caption {
  font: 400 14px/1.4 var(--font-text, system-ui);
  color: #a1a1a6;
  margin-top: 14px;
}

.cs-lightbox__close,
.cs-lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff1f;
  color: #f5f5f7;
  font-family: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.cs-lightbox__close:hover,
.cs-lightbox__nav:hover {
  background: #ffffff3d;
}

.cs-lightbox__close {
  top: 20px;
  right: 20px;
  font-size: 26px;
}

.cs-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.cs-lightbox__nav--prev {
  left: 16px;
}

.cs-lightbox__nav--next {
  right: 16px;
}

@media (max-width: 640px) {
  .cs-lightbox__img {
    max-height: 72vh;
  }

  .cs-lightbox__nav--prev {
    left: 8px;
  }

  .cs-lightbox__nav--next {
    right: 8px;
  }
}
