.gallery-page {
  overflow: hidden;
}

.gallery-page .section {
  position: relative;
}

.gallery-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--space-7);
}

.gallery-hero__grid > * { min-width: 0; width: 100%; }
.gallery-hero__copy { max-width: 35rem; }
.gallery-hero__meta,
.gallery-hero__actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.gallery-hero__meta > *, .gallery-hero__actions > * { min-width: 0; }
.gallery-hero__note {
  max-width: 33rem;
  padding-left: var(--space-4);
  border-left: 4px solid var(--color-sun-amber);
  color: var(--color-muted-slate);
}
.gallery-hero__figure { width: 100%; margin: 0; }
.gallery-hero__figure img { width: 100%; aspect-ratio: 16 / 11; border: var(--border-default); border-radius: var(--radius-xl); object-fit: cover; }
.gallery-hero__figure figcaption { max-width: 42rem; }
.gallery-text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }

.gallery-method__intro { max-width: 43.75rem; }
.gallery-method__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.gallery-method__grid > * { min-width: 0; width: 100%; }
.gallery-criterion { display: flex; flex-direction: column; gap: var(--space-3); }
.gallery-criterion > * { min-width: 0; margin: 0; }
.gallery-criterion__heading { display: flex; align-items: center; gap: var(--space-3); }
.gallery-criterion__heading span { color: var(--color-sun-amber); font-family: var(--font-heading); font-weight: 800; }
.gallery-criterion__heading p { color: var(--color-ocean-teal); font-size: var(--text-sm); font-weight: 700; }
.gallery-criterion h3 { font-size: 1.25rem; }

.gallery-summary__intro { max-width: 42rem; }
.gallery-summary__table-wrap { overflow: hidden; border: var(--border-default); border-radius: var(--radius-lg); background: var(--color-card-white); box-shadow: var(--shadow-card); }
.gallery-summary table { table-layout: fixed; }
.gallery-summary caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.gallery-summary th:nth-child(1), .gallery-summary td:nth-child(1) { width: 5.5rem; text-align: center; }
.gallery-summary th:nth-child(2), .gallery-summary td:nth-child(2) { width: 21%; }
.gallery-summary th:nth-child(3), .gallery-summary td:nth-child(3) { width: 20%; }
.gallery-summary td { overflow-wrap: anywhere; }
.gallery-rank { display: inline-grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--color-seafoam); color: var(--color-slate); font-weight: 800; }
.gallery-rank--top { background: var(--color-sun-amber); }
.gallery-summary__cards { display: none; }

.gallery-profile__panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(22.5rem, 5fr);
  gap: var(--space-6);
  align-items: stretch;
}
.gallery-profile__panel > * { min-width: 0; width: 100%; }
.gallery-profile__copy { display: flex; flex-direction: column; gap: var(--space-5); max-width: 42.5rem; }
.gallery-profile__copy > * { min-width: 0; margin: 0; }
.gallery-profile__copy h2 { margin-top: calc(var(--space-3) * -1); }
.gallery-profile__value, .gallery-profile__choose { max-width: 40rem; }
.gallery-profile__choose ul { padding: 0; margin: 0; }
.gallery-profile__choose li { position: relative; padding-left: 1.25rem; margin-bottom: var(--space-3); }
.gallery-profile__choose li::before { position: absolute; left: 0; color: var(--color-ocean-teal); content: "•"; font-weight: 800; }
.gallery-profile__warning { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-seafoam); }
.gallery-profile__warning h3 { font-size: 1.125rem; }
.gallery-profile__warning > :last-child { margin-bottom: 0; }
.gallery-profile__media { width: 100%; height: 100%; margin: 0; }
.gallery-profile__media img { width: 100%; height: 100%; min-height: 25rem; border: var(--border-default); border-radius: var(--radius-xl); object-fit: cover; }

.gallery-builder__intro { max-width: 35rem; }
.gallery-builder__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.gallery-builder__grid > * { min-width: 0; width: 100%; }
.gallery-builder-card { display: flex; flex-direction: column; gap: var(--space-3); }
.gallery-builder-card > * { min-width: 0; margin: 0; }
.gallery-builder-card > span { color: var(--color-ocean-teal); font-size: var(--text-sm); font-weight: 700; }
.gallery-builder-card h3 { font-size: 1.25rem; }

.gallery-collector__intro { max-width: 38.75rem; }
.gallery-collector__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(18.75rem, 5fr); gap: var(--space-5); align-items: stretch; }
.gallery-collector__grid > * { min-width: 0; width: 100%; }
.gallery-collector__main { display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); }
.gallery-collector__main > * { min-width: 0; margin: 0; }
.gallery-collector__side { display: flex; min-width: 0; flex-direction: column; gap: var(--space-5); }
.gallery-collector__side > * { min-width: 0; width: 100%; margin: 0; }
.gallery-collector__side h3 { font-size: 1.25rem; }

.gallery-steps__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(21.25rem, 5fr); gap: var(--space-7); align-items: center; }
.gallery-steps__grid > * { min-width: 0; width: 100%; }
.gallery-steps__copy { max-width: 37.5rem; }
.gallery-steps__list { padding: 0; margin: var(--space-5) 0 0; }
.gallery-steps__list li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-3); padding: 0 0 var(--space-5); }
.gallery-steps__list li > * { min-width: 0; }
.gallery-steps__list li > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--color-seafoam); color: var(--color-ocean-teal); font-weight: 800; }
.gallery-steps__list h3 { margin-bottom: var(--space-2); font-size: 1.125rem; }
.gallery-steps__media { width: 100%; margin: 0; }
.gallery-steps__media img { width: 100%; aspect-ratio: 4 / 5; border: var(--border-default); border-radius: var(--radius-xl); object-fit: cover; }

.gallery-goals__intro { max-width: 38.75rem; }
.gallery-goals__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.gallery-goals__grid > * { min-width: 0; width: 100%; }
.gallery-goal-card { display: flex; min-height: 17rem; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.gallery-goal-card > * { min-width: 0; margin: 0; }
.gallery-goal-card h3 { font-size: 1.25rem; }
.gallery-goal-card a:last-child { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: auto; font-weight: 700; }

.gallery-checklist__panel { width: 100%; max-width: 51.25rem; margin-inline: auto; }
.gallery-checklist__items { display: flex; flex-direction: column; gap: var(--space-4); }
.gallery-checklist__items article { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-4); padding-top: var(--space-4); border-top: var(--border-default); }
.gallery-checklist__items article > * { min-width: 0; }
.gallery-checklist__items article > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: #fffbeb; color: #92400e; font-weight: 800; }
.gallery-checklist__items h3 { margin-bottom: var(--space-2); font-size: 1.125rem; }
.gallery-checklist__items p { margin-bottom: 0; }

.gallery-cta__panel { max-width: 57.5rem; margin-inline: auto; text-align: center; }
.gallery-cta__copy { display: flex; max-width: 38.75rem; min-width: 0; flex-direction: column; align-items: center; gap: var(--space-4); margin-inline: auto; }
.gallery-cta__copy > * { min-width: 0; margin: 0; }
.gallery-cta__copy .button { margin-top: var(--space-2); }

@media (max-width: 58.75rem) {
  .gallery-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .gallery-hero__copy { max-width: 35rem; }
  .gallery-hero__figure img { aspect-ratio: 4 / 3; }
  .gallery-method__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-method__grid > :last-child { grid-column: 1 / -1; }
  .gallery-builder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-builder__grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 55rem) {
  .gallery-summary__table-wrap { display: none; }
  .gallery-summary__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .gallery-summary-card { display: flex; min-width: 0; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: var(--border-default); border-radius: var(--radius-lg); background: var(--color-card-white); box-shadow: var(--shadow-card); }
  .gallery-summary-card > * { min-width: 0; margin: 0; }
  .gallery-summary-card > div { display: flex; min-width: 0; align-items: center; gap: var(--space-3); }
  .gallery-summary-card h3 { min-width: 0; margin: 0; font-size: 1.25rem; }
}

@media (max-width: 52.5rem) {
  .gallery-profile__panel, .gallery-collector__grid, .gallery-steps__grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-profile__copy { max-width: 42.5rem; }
  .gallery-profile__media img { min-height: 0; aspect-ratio: 16 / 10; }
  .gallery-steps__media { order: -1; }
  .gallery-steps__media img { aspect-ratio: 4 / 3; }
}

@media (max-width: 48.75rem) {
  .gallery-goals__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 38.75rem) {
  .gallery-method__grid, .gallery-builder__grid, .gallery-summary__cards { grid-template-columns: minmax(0, 1fr); }
  .gallery-method__grid > :last-child, .gallery-builder__grid > :last-child { grid-column: auto; }
}

@media (max-width: 47.99rem) {
  .gallery-hero__copy h1 { font-size: clamp(2.5rem, 11vw, 3.25rem); }
  .gallery-hero__actions { align-items: stretch; }
  .gallery-hero__actions .button { width: 100%; }
  .gallery-hero__actions .gallery-text-link { justify-content: center; width: 100%; }
  .gallery-profile__panel { padding: var(--space-5); }
  .gallery-profile__copy { gap: var(--space-4); }
  .gallery-collector__side { gap: var(--space-4); }
  .gallery-goal-card { min-height: auto; }
  .gallery-checklist__items article { grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-3); }
  .gallery-cta__copy .button { width: 100%; min-height: 2.75rem; }
}

@media (max-width: 22.5rem) {
  .gallery-checklist__items article { grid-template-columns: minmax(0, 1fr); }
}

ul { list-style: none !important; }
.nav-toggle { flex-direction: column; }
