.content-page {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.6rem);
  max-width: min(76rem, 100%);
  margin: 0 auto;
}

.content-page-main-panel {
  display: grid;
  gap: 0;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.12);
  border-radius: var(--radius-xl);
  background: rgba(249, 250, 251, 0.96);
  box-shadow: none;
  overflow: hidden;
}

.content-page-hero {
  display: grid;
  gap: 0.95rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.content-page-hero-with-image {
  gap: 0.9rem;
}

.content-page-hero-copy {
  display: grid;
  gap: 0.95rem;
}

.content-page-hero:not(.content-page-hero-with-image) {
  padding-bottom: clamp(1rem, 2.2vw, 1.5rem);
}

.content-page-hero-media {
  position: relative;
  overflow: hidden;
  min-height: clamp(15rem, 34vw, 22rem);
  max-height: clamp(15rem, 34vw, 22rem);
  border-radius: var(--radius-lg);
}

.content-page-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(15rem, 34vw, 22rem);
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.16);
}

/* Photo shows people; anchor to the top so faces stay clear of the bottom caption scrim. */
.content-page-hero-media[data-slug="repair-cafe"] img {
  object-position: center top;
}

.content-page-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.1rem, 3vw, 1.9rem);
  background: linear-gradient(180deg, rgba(15, 31, 54, 0) 40%, rgba(15, 31, 54, 0.82) 100%);
}

.content-page-hero-card {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  max-width: 40rem;
  justify-items: start;
  text-align: left;
}

.content-page-hero-card .pill {
  background: rgba(253, 252, 250, 0.94);
}

.content-page-hero-card .content-page-title,
.content-page-hero-card .content-page-lead {
  color: var(--paper);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}

.content-page-breadcrumb {
  padding-inline: clamp(0.2rem, 1vw, 0.4rem);
}

.content-page-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(var(--ink-strong-rgb), 0.52);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.content-page-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.content-page-breadcrumb-item:not(:last-child)::after {
  content: "/";
  color: rgba(var(--ink-strong-rgb), 0.24);
}

.content-page-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.content-page-breadcrumb a:hover,
.content-page-breadcrumb a:focus-visible {
  color: var(--accent);
}

.content-page-breadcrumb-current {
  color: rgba(var(--ink-strong-rgb), 0.7);
}

.content-page-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.content-page-lead {
  max-width: 52ch;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(var(--text-rgb), 0.92);
}

.content-page-hero-copy .content-page-lead {
  font-size: 1.08rem;
  line-height: 1.65;
}

.content-page-body {
  display: grid;
  gap: 1.35rem;
  padding: 0 clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
}

.content-page-body:not(:empty) {
  border-top: 1px solid rgba(var(--ink-strong-rgb), 0.12);
  padding-top: clamp(1.4rem, 3vw, 2rem);
}

.content-page-hero:not(.content-page-hero-with-image) + .content-page-body:not(:empty) {
  border-top: 0;
  padding-top: 0;
}

.content-page-sections {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.2rem);
  margin-top: 0.4rem;
}

.content-page-section-panel {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid rgba(var(--ink-strong-rgb), 0.12);
  border-radius: var(--radius-xl);
  background: rgba(251, 251, 251, 0.97);
  box-shadow: none;
}

.content-page-section-copy {
  display: grid;
  gap: 1rem;
}

.content-page-card-group {
  display: grid;
  gap: 1rem;
}

/* Masonry layout: cards keep their photo's natural height instead of being
   stretched into a shared row height, so no one gets cropped and the grid
   can settle into a slightly asymmetric, uneven layout. */
.content-page-card-grid {
  column-count: 3;
  column-gap: 1.1rem;
  width: 100%;
}

.content-page-card-grid .page-card {
  break-inside: avoid;
  margin-bottom: 1.1rem;
}

.content-page-sections .gallery-section {
  gap: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.content-page-sections .gallery-section-heading {
  display: grid;
  gap: 0.35rem;
}

.content-page-sections .gallery-section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.content-page-sections .gallery-section-description {
  margin: 0;
  color: rgba(var(--text-rgb), 0.8);
  font-size: 1rem;
  line-height: 1.65;
}

.content-page-sections .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1rem;
}

/* Masonry layout: images keep their natural proportions instead of being
   cropped into uniform tiles, so portrait and landscape shots both stand out. */
.content-page-sections .gallery-grid-grid {
  display: block;
  column-width: 17rem;
  column-gap: 1.25rem;
}

.content-page-sections .gallery-card {
  display: grid;
  gap: 0.6rem;
}

.content-page-sections .gallery-card-grid {
  position: relative;
  break-inside: avoid;
  margin-bottom: 1.25rem;
}

.content-page-sections .gallery-card-media {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(var(--ink-strong-rgb), 0.06);
  box-shadow: 0 16px 30px -20px rgba(var(--ink-strong-rgb), 0.55);
}

/* global.css forces a 4:3 box on grid-appearance media wrappers; the masonry
   layout needs the wrapper to hug the image's own (varying) proportions instead. */
.content-page-sections .gallery-card-grid .gallery-card-media {
  aspect-ratio: auto;
}

.content-page-sections .gallery-card-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.content-page-sections .gallery-card-trigger:focus-visible {
  outline: 3px solid rgba(157, 45, 31, 0.5);
  outline-offset: -3px;
}

.content-page-sections .gallery-card-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 260ms ease;
}

.content-page-sections .gallery-card-grid .gallery-card-media img {
  aspect-ratio: auto;
}

.content-page-sections .gallery-card-trigger:hover img,
.content-page-sections .gallery-card-trigger:focus-visible img {
  transform: scale(1.045);
}

.content-page-sections .gallery-card-copy {
  display: grid;
  gap: 0.45rem;
  padding: 0.15rem 0.15rem 0;
}

/* Pin the caption directly onto the bottom of its own photo (instead of
   floating below in the column flow) so it's unambiguous which image it
   describes even when neighbouring masonry columns run at different heights. */
.content-page-sections .gallery-card-grid .gallery-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 0.2rem;
  margin: 0;
  padding: 1.6rem 0.85rem 0.65rem;
  background: linear-gradient(to top, rgba(12, 24, 46, 0.78), rgba(12, 24, 46, 0));
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.content-page-sections .gallery-card-grid .gallery-card-title,
.content-page-sections .gallery-card-grid .gallery-card-subtitle,
.content-page-sections .gallery-card-grid .gallery-card-description {
  color: #fff;
}

.content-page-sections .gallery-card-title,
.content-page-sections .gallery-card-subtitle,
.content-page-sections .gallery-card-description,
.content-page-sections .gallery-card-contacts {
  margin: 0;
}

.content-page-sections .gallery-card-title {
  font-size: 1.05rem;
}

.content-page-sections .gallery-card-subtitle {
  color: rgba(var(--ink-strong-rgb), 0.78);
  font-weight: 600;
}

.content-page-sections .gallery-card-description,
.content-page-sections .gallery-card-contacts {
  color: rgba(var(--text-rgb), 0.88);
  font-size: 0.98rem;
  line-height: 1.6;
}

.content-page-sections .gallery-card-contacts {
  display: grid;
  gap: 0.35rem;
  padding-left: 1rem;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 24, 0.93);
}

.gallery-lightbox-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
  width: min(100%, 88rem);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--paper);
  background: rgba(12, 20, 32, 0.78);
}

.gallery-lightbox-close {
  justify-self: end;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.gallery-lightbox-nav {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-pill);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox-nav[disabled] {
  opacity: 0.45;
  cursor: default;
}

.gallery-lightbox-figure {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.gallery-lightbox-image {
  display: block;
  width: 100%;
  max-height: min(74vh, 60rem);
  border-radius: var(--radius-xl);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.gallery-lightbox-caption {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 32, 0.5);
  color: var(--paper);
}

.gallery-lightbox-caption[hidden] {
  display: none;
}

.gallery-lightbox-caption-title,
.gallery-lightbox-caption-subtitle,
.gallery-lightbox-caption-description,
.gallery-lightbox-counter {
  margin: 0;
}

.gallery-lightbox-caption-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.gallery-lightbox-caption-subtitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.gallery-lightbox-caption-description,
.gallery-lightbox-counter {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.gallery-lightbox-counter {
  justify-self: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(12, 20, 32, 0.42);
}

.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.content-page-body h2,
.content-page-body h3,
.content-page-body p,
.content-page-body ul {
  margin: 0;
}

.content-page-body > * {
  max-width: 70ch;
}

.content-page-body ul {
  padding-left: 1.2rem;
  line-height: 1.8;
}

.content-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: none;
}

.content-page-body h2 {
  margin-top: 1rem;
  padding-top: 1.4rem;
  max-width: none;
  border-top: 1px solid rgba(var(--ink-strong-rgb), 0.14);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.content-page-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.content-page-body h3 {
  margin-top: 0.75rem;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.content-page-body p,
.content-page-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(var(--text-rgb), 0.96);
}

.content-page-body figure,
.content-page-body table,
.content-page-body blockquote,
.content-page-body .content-page-grid,
.content-page-section-copy figure,
.content-page-section-copy table,
.content-page-section-copy blockquote,
.content-page-section-copy .content-page-grid,
.content-page-section-copy .content-page-table-wrap,
.content-page-section-copy .content-page-attachment {
  max-width: none;
}

.content-page-body blockquote {
  margin: 0;
  padding: 1.2rem 1.35rem;
  border-left: 4px solid rgba(157, 45, 31, 0.4);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: rgba(244, 212, 207, 0.16);
}

.content-page-body img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: none;
}

.content-page-section-copy > * {
  margin: 0;
}

.content-page-section-copy h2 {
  margin-top: 0.2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(var(--ink-strong-rgb), 0.12);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.content-page-section-copy h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.content-page-section-copy p,
.content-page-section-copy li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(var(--text-rgb), 0.96);
}

.content-page-section-copy figure {
  width: 100%;
}

.content-page-section-copy img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: none;
}

.content-page-table-wrap {
  overflow-x: auto;
}

.content-page-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.content-page-table th,
.content-page-table td {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.14);
  text-align: left;
  vertical-align: top;
}

.content-page-table th {
  background: rgba(var(--ink-strong-rgb), 0.08);
  color: var(--ink-strong);
}

.content-page-checklist {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.content-page-checklist-item {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.content-page-checklist-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.18rem;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.24);
  border-radius: 0.35rem;
  color: transparent;
  background: rgba(255, 255, 255, 0.9);
}

.content-page-checklist-item.is-checked .content-page-checklist-marker {
  color: var(--paper);
  border-color: var(--ink-strong);
  background: var(--ink-strong);
}

.content-page-attachment {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(var(--ink-strong-rgb), 0.14);
  border-radius: var(--radius-lg);
  background: rgba(251, 251, 251, 0.97);
}

.content-page-attachment-link {
  color: var(--ink-strong);
  font-weight: 700;
  text-decoration: none;
}

.content-page-attachment-meta {
  color: rgba(var(--text-rgb), 0.76);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .content-page-card-grid {
    column-count: 2;
  }

  .content-page-hero {
    padding: 1rem;
  }

  .content-page-hero-media {
    min-height: 15rem;
    max-height: 15rem;
  }

  .content-page-title {
    max-width: none;
  }

  .content-page-sections .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  }

  .content-page-sections .gallery-grid-grid {
    column-width: 13rem;
    column-gap: 1rem;
  }

  .content-page-sections .gallery-card-grid {
    margin-bottom: 1rem;
  }

  .gallery-lightbox-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .gallery-lightbox-nav-prev {
    left: 0.4rem;
  }

  .gallery-lightbox-nav-next {
    right: 0.4rem;
  }

  .gallery-lightbox-image {
    max-height: 68vh;
  }
}

@media (max-width: 560px) {
  .content-page-card-grid {
    column-count: 1;
  }

  .content-page-sections .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-page-sections .gallery-grid-grid {
    column-count: 2;
    column-width: auto;
  }

  .content-page-sections .gallery-card-grid {
    margin-bottom: 0.85rem;
  }

  .content-page-sections .gallery-card-media {
    border-radius: var(--radius-sm);
  }

  .content-page-sections .gallery-card-grid .gallery-card-copy {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }

  .gallery-lightbox {
    padding: 0.75rem;
  }

  .gallery-lightbox-shell {
    gap: 0.7rem;
  }

  .gallery-lightbox-close {
    width: 2.6rem;
    height: 2.6rem;
  }

  .gallery-lightbox-nav {
    width: 3rem;
    height: 3rem;
    font-size: 1.7rem;
  }

  .gallery-lightbox-image {
    border-radius: var(--radius-md);
    max-height: 62vh;
  }

  .gallery-lightbox-caption {
    padding: 0.85rem 0.95rem;
  }
}