@import url("./tokens.css");
@import url("./brand-themes.css");

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  color: var(--color-text);
  background: var(--color-page);
  font-family: var(--font-body);
  font-size: 100%;
  line-height: var(--line-height-body);
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 18rem), var(--brand-parent-background);
}

body, button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

.container {
  width: min(100% - (var(--layout-site-margin) * 2), var(--layout-container-max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(252, 252, 252, 0.94);
  border-bottom: var(--border-width-main) solid var(--nav-border);
  box-shadow: var(--shadow-micro);
  backdrop-filter: blur(16px);
}

.site-header > .container {
  width: calc(100% - 2rem);
}

.site-header__top {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--brand-parent-ink);
  font-family: var(--font-body);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-weight: var(--font-weight-extra-bold);
  line-height: 1.15;
}

.brand-mark__love {
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05em;
  font-style: italic;
  font-weight: var(--font-weight-regular);
  line-height: 1;
}

.brand-mark__inc {
  font-family: var(--font-body);
  font-weight: var(--font-weight-extra-bold);
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark__tag {
  margin-left: var(--space-3);
  padding: 0.28rem var(--space-2);
  color: var(--color-text-muted);
  background: var(--color-background-dark);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-micro);
  font-size: 0.55rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-actions__link {
  color: var(--color-text);
  font-size: var(--font-size-text-small);
}

.icon-button {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  color: var(--brand-parent-ink);
  background: var(--color-surface);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-round);
  cursor: pointer;
  font-size: var(--font-size-text-small);
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

@media (max-width: 36rem) {
  .site-actions {
    display: none;
  }

  .brand-mark__tag {
    display: none;
  }
}

.gallery-page {
  padding-top: var(--space-6);
}

.gallery-article {
  display: grid;
  gap: var(--layout-section-small);
}

.gallery-hero {
  display: grid;
  gap: var(--space-6);
}

.gallery-hero__content {
  display: grid;
  gap: var(--space-4);
}

.gallery-hero h1 {
  max-width: 21ch;
  margin: 0;
  color: var(--brand-parent-ink);
  font-family: var(--font-heading);
  font-size: clamp(2.35rem, 6.4vw, 4.35rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  line-height: 0.98;
}

.gallery-standfirst {
  max-width: 38rem;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.45;
}

.gallery-byline {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-text-small);
}

.gallery-hero__image {
  width: 100%;
  max-height: 44rem;
  object-fit: cover;
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-image);
  cursor: zoom-in;
}

.gallery-slides {
  display: grid;
  gap: var(--space-6);
}

.gallery-slide {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border-width-main) solid var(--color-border);
}

.gallery-slide__figure {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.gallery-slide__image-button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-main);
  cursor: zoom-in;
}

.gallery-slide__figure img,
.gallery-slide__image-button img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-main);
}

.gallery-slide__figure figcaption {
  color: var(--color-text-muted);
  font-size: var(--font-size-text-small);
}

.gallery-slide__content {
  display: grid;
  gap: var(--space-3);
}

.gallery-slide__content h2 {
  margin: 0;
  color: var(--color-grey-800);
  font-family: var(--font-heading);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  line-height: var(--line-height-heading-tight);
}

.gallery-slide__content p {
  max-width: 42rem;
  margin: 0;
  color: var(--color-text);
}

.gallery-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-1);
}

.gallery-switcher a {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  color: var(--color-grey-700);
  background: var(--color-grey-100);
  border: var(--border-width-main) solid var(--color-border-light);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-micro);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-medium);
}

.gallery-switcher a.is-active {
  color: var(--color-grey-100);
  background: var(--brand-500);
  border-color: var(--brand-500);
}

.gallery-switcher a:hover,
.gallery-switcher a:focus-visible {
  color: var(--brand-900);
  border-color: var(--brand-500);
  outline: 0;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: var(--space-3);
  padding: var(--space-5);
  background: rgba(16, 13, 11, 0.92);
  align-content: center;
  justify-items: center;
}

.gallery-lightbox__stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  max-width: 80rem;
}

.gallery-lightbox__figure {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  color: var(--color-grey-100);
  text-align: left;
  overflow: hidden;
}

.gallery-lightbox__figure img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-small);
}

.gallery-lightbox__figure figcaption {
  color: var(--color-grey-200);
  font-size: var(--font-size-text-small);
  line-height: 1.5;
  max-width: 50rem;
  margin-inline: auto;
}

.gallery-lightbox__figure figcaption strong {
  display: block;
  color: var(--color-grey-100);
  font-weight: var(--font-weight-semibold);
  font-size: 1.05em;
  margin-bottom: var(--space-1);
}

.gallery-lightbox__figure figcaption em {
  display: block;
  font-style: italic;
  opacity: 0.8;
  margin-top: var(--space-1);
}

.gallery-lightbox__arrow {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  color: var(--color-grey-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-round);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.gallery-lightbox__arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gallery-lightbox__thumbnails {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  max-width: 80rem;
}

.gallery-lightbox__thumb {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 3rem;
  padding: 0;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s;
}

.gallery-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-lightbox__thumb.is-active,
.gallery-lightbox__thumb:hover {
  opacity: 1;
  border-color: var(--color-grey-100);
}

.gallery-lightbox__close {
  position: absolute;
  right: var(--space-5);
  top: var(--space-5);
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  padding: 0;
  color: var(--color-grey-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-round);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  transition: background 0.15s;
}

.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.gallery-lightbox__counter {
  position: absolute;
  left: var(--space-5);
  top: var(--space-5);
  color: var(--color-grey-100);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-medium);
  opacity: 0.8;
}

.gallery-related {
  margin-top: var(--space-6);
}

.gallery-related + .footer-legal {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-heading__title {
  margin: 0;
  color: var(--color-grey-800);
  font-family: var(--font-body);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  line-height: var(--line-height-heading-tight);
}

.section-heading__link {
  color: var(--brand-500);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.section-heading__link::after {
  content: ">";
  margin-left: var(--space-2);
}

.article-grid {
  display: grid;
  gap: var(--space-5) var(--space-6);
}

.article-card {
  min-width: 0;
}

.article-card__link {
  display: grid;
  gap: var(--space-4);
}

.article-card__media {
  position: relative;
}

.article-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-surface-subtle);
  border-radius: var(--media-radius);
}

.article-card__body {
  display: grid;
  gap: var(--space-2);
}

.article-card__title {
  margin: 0;
  color: var(--color-grey-800);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-text-small);
  line-height: 1.3;
}

.article-meta__category {
  color: var(--brand-500);
  font-weight: var(--font-weight-semibold);
}

.story-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: var(--button-height-micro);
  padding: var(--space-1) var(--space-2);
  color: var(--brand-900);
  background: var(--brand-100);
  border: var(--border-width-main) solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-round);
  box-shadow: var(--shadow-micro);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.article-card__media .story-badge {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
}

.site-footer {
  background: var(--color-surface);
  border-top: var(--border-width-main) solid var(--color-border);
}

.footer-cta {
  color: var(--footer-cta-text);
  background: var(--footer-cta-background);
}

.footer-cta__inner {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-8);
}

.footer-cta h2,
.footer-cta p {
  max-width: 32rem;
  margin: 0;
}

.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.brand-pill {
  padding: var(--space-2) var(--space-3);
  color: var(--brand-parent-ink);
  background: var(--color-grey-200);
  border-radius: var(--radius-small);
  font-weight: var(--font-weight-semibold);
}

.footer-legal {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  padding-block: var(--space-4);
  color: var(--color-text-muted);
  border-top: var(--border-width-main) solid var(--color-border);
  font-size: var(--font-size-text-small);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}

.footer-links a {
  color: var(--brand-500);
}

.footer-links a:not(:last-child)::after {
  content: "|";
  margin-left: var(--space-2);
  color: var(--color-text-muted);
}

@media (min-width: 42rem) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .gallery-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: end;
  }

  .gallery-slide {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: start;
  }

  .article-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Template action card (signup) */
.template-signup {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) 0 0;
  border-top: var(--border-width-main) solid var(--color-border-light);
}

.template-signup .gallery-subscribe__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  width: min(100%, 28rem);
}

.template-signup .gallery-subscribe__form input {
  min-height: 2.7rem;
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-round);
  font-size: var(--font-size-text-small);
}

.template-signup .gallery-subscribe__form button {
  min-height: 2.7rem;
  padding: 0 var(--space-5);
  color: var(--color-grey-100);
  background: var(--brand-500);
  border: 0;
  border-radius: var(--radius-round);
  cursor: pointer;
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 35rem) {
  .template-signup .gallery-subscribe__form {
    grid-template-columns: 1fr;
  }
}

/* ─── Slideshow view ─── */
.gallery-page--slideshow .gallery-hero {
  grid-template-columns: 1fr;
}

.gallery-page--slideshow .gallery-hero__content {
  align-items: center;
  text-align: center;
}

.gallery-slideshow {
  display: grid;
  gap: var(--space-4);
}

.gallery-slideshow__stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
}

.gallery-slideshow__media {
  display: grid;
  gap: 0;
  margin: 0;
}

.gallery-slideshow__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-image);
}

.gallery-slideshow__caption {
  color: var(--color-text-muted);
  font-size: var(--font-size-text-small);
  line-height: 1.5;
  text-align: center;
  max-width: 50rem;
  margin-inline: auto;
}

.gallery-slideshow__caption strong {
  display: block;
  color: var(--color-grey-800);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.gallery-slideshow__caption em {
  display: block;
  font-style: italic;
  margin-top: var(--space-1);
}

.gallery-slideshow__arrow {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  color: var(--color-grey-700);
  background: var(--color-grey-100);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-round);
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.15s, border-color 0.15s;
}

.gallery-slideshow__arrow:hover {
  background: var(--brand-100);
  border-color: var(--brand-500);
  color: var(--brand-900);
}

.gallery-slideshow__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  background: var(--color-grey-100);
  border-color: var(--color-border);
  color: var(--color-grey-700);
}

.gallery-slideshow__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gallery-slideshow__thumbnails {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.gallery-slideshow__thumb {
  flex: 0 0 auto;
  width: 5.5rem;
  height: 3.5rem;
  padding: 0;
  background: transparent;
  border: var(--border-width-main) solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}

.gallery-slideshow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-slideshow__thumb.is-active,
.gallery-slideshow__thumb:hover {
  opacity: 1;
  border-color: var(--brand-500);
}

.gallery-slideshow__thumb:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* ─── Sidebar layout ─── */
.gallery-sidebar-layout {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.gallery-sidebar-layout .gallery-slides {
  order: 1;
}

.gallery-sidebar-layout .gallery-sidebar {
  order: 0;
}

.gallery-sidebar__sticky {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: var(--space-5);
  align-content: start;
}

.gallery-sidebar__toc h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  color: var(--color-grey-800);
}

.gallery-sidebar__toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.gallery-sidebar__toc li a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
  background: var(--color-grey-100);
  border: var(--border-width-main) solid var(--color-border-light);
  border-radius: var(--radius-small);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-medium);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.gallery-sidebar__toc li a:hover {
  background: var(--brand-100);
  border-color: var(--brand-500);
  color: var(--brand-900);
}

.gallery-sidebar-layout .template-signup {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 64rem) {
  .gallery-sidebar-layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
  }

  .gallery-sidebar-layout .gallery-slides {
    order: 0;
  }

  .gallery-sidebar-layout .gallery-sidebar {
    order: 1;
  }
}

/* Brand wordmark inline styling */
.brand-wordmark {
  display: inline;
  font-family: var(--font-body);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  white-space: nowrap;
}

.brand-wordmark--money {
  color: var(--brand-money);
}

.brand-wordmark--food {
  color: var(--brand-food);
}

.brand-wordmark--exploring {
  color: var(--brand-exploring);
}

.brand-wordmark--property {
  color: var(--brand-property);
}

.brand-wordmark__love {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: var(--font-weight-regular);
}

.brand-wordmark__suffix {
  font-weight: var(--font-weight-extra-bold);
  text-transform: uppercase;
}

/* Weekly signup card (video/gallery template style) */
.template-signup--weekly {
  position: relative;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(16rem, 24rem);
  gap: var(--space-4) var(--space-5);
  align-items: center;
  width: min(100%, 58rem);
  padding: var(--space-5);
  overflow: hidden;
  color: #24211f;
  background: #fffaf3;
  border: var(--border-width-main) solid rgba(36, 33, 31, 0.09);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-small);
}

.template-signup--weekly::after {
  content: "";
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 10rem;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 20% 35%, rgba(226, 129, 140, 0.23) 0 28%, transparent 29%),
    radial-gradient(circle at 68% 65%, rgba(80, 145, 95, 0.15) 0 24%, transparent 25%),
    radial-gradient(circle at 48% 92%, rgba(73, 105, 166, 0.16) 0 21%, transparent 22%);
  pointer-events: none;
}

.template-signup__copy,
.template-signup--weekly .gallery-subscribe__form,
.template-signup__trust {
  position: relative;
  z-index: 1;
}

.template-signup__copy {
  display: grid;
  gap: var(--space-2);
}

.template-signup__copy h2 {
  margin: 0;
  color: inherit;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.template-signup__copy p:not(.template-signup__kicker) {
  max-width: 32rem;
  margin: 0;
  color: #3d3a36;
  font-size: var(--font-size-text-small);
  line-height: 1.45;
}

.template-signup__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: #4969a6;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: var(--font-weight-extra-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.template-signup__kicker span {
  display: inline-grid;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  place-items: center;
  color: #24211f;
  background: rgba(226, 129, 140, 0.18);
  border-radius: var(--radius-round);
}

.template-signup__kicker svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.template-signup--weekly .gallery-subscribe__form {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-signup--weekly .gallery-subscribe__form input {
  min-height: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-small);
}

.template-signup--weekly .gallery-subscribe__form button {
  min-height: 3rem;
  background: #191715;
  border-radius: var(--radius-small);
}

.template-signup__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) clamp(1rem, 3vw, 2.25rem);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  grid-column: 1 / -1;
}

.template-signup__trust li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: #24211f;
  font-size: 0.98rem;
  font-weight: var(--font-weight-medium);
}

.template-signup__trust li::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: var(--radius-round);
  background: #4969a6;
}

.template-signup__trust li:nth-child(2)::before {
  background: #50915f;
}

.template-signup__trust li:nth-child(3)::before {
  background: #ba2b26;
}

@media (max-width: 63.9375rem) {
  .template-signup--weekly {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 42rem) {
  .template-signup--weekly .gallery-subscribe__form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 64rem) {
  .gallery-sidebar__toc ul {
    display: none;
  }

  .gallery-sidebar__toc h3 {
    cursor: pointer;
  }

  .gallery-sidebar__toc h3::after {
    content: ' ▼';
    font-size: 0.75em;
    opacity: 0.5;
  }

  .gallery-sidebar__toc.is-open ul {
    display: grid;
  }

  .gallery-sidebar__toc.is-open h3::after {
    content: ' ▲';
  }
}

/* ─── Country selector (shared with homepage) ─── */
.country-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.country-selector summary {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: var(--space-2);
  padding: 0 1.75rem 0 var(--space-3);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-micro);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
  list-style: none;
}

.country-selector summary::-webkit-details-marker {
  display: none;
}

.country-selector summary::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 0.25rem solid transparent;
  border-right: 0.25rem solid transparent;
  border-top: 0.35rem solid currentColor;
  pointer-events: none;
  transform: translateY(-35%);
}

.country-selector__menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-1));
  z-index: 10;
  display: grid;
  min-width: 5.75rem;
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--border-width-main) solid var(--color-border);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-small);
}

.country-selector:not([open]) .country-selector__menu {
  display: none;
}

.country-selector__menu a {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: var(--space-2);
  justify-content: flex-start;
  padding: 0 var(--space-2);
  color: var(--color-text);
  border-radius: var(--radius-micro);
  font-size: 0.9rem;
}

.country-selector__menu a:hover,
.country-selector__menu a:focus-visible,
.country-selector__menu a[aria-current="true"] {
  background: var(--color-surface-subtle);
  outline: 0;
}

.country-flag {
  display: inline-block;
  width: 1.25rem;
  height: 0.84rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow-micro);
}

.country-flag--us {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23fff'/%3E%3Cg fill='%23b22234'%3E%3Crect width='60' height='3.08' y='0'/%3E%3Crect width='60' height='3.08' y='6.15'/%3E%3Crect width='60' height='3.08' y='12.31'/%3E%3Crect width='60' height='3.08' y='18.46'/%3E%3Crect width='60' height='3.08' y='24.62'/%3E%3Crect width='60' height='3.08' y='30.77'/%3E%3Crect width='60' height='3.08' y='36.92'/%3E%3C/g%3E%3Crect width='24' height='21.54' fill='%233c3b6e'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='2.4' cy='2.2' r='0.65'/%3E%3Ccircle cx='7.2' cy='2.2' r='0.65'/%3E%3Ccircle cx='12' cy='2.2' r='0.65'/%3E%3Ccircle cx='16.8' cy='2.2' r='0.65'/%3E%3Ccircle cx='21.6' cy='2.2' r='0.65'/%3E%3Ccircle cx='4.8' cy='4.4' r='0.65'/%3E%3Ccircle cx='9.6' cy='4.4' r='0.65'/%3E%3Ccircle cx='14.4' cy='4.4' r='0.65'/%3E%3Ccircle cx='19.2' cy='4.4' r='0.65'/%3E%3Ccircle cx='2.4' cy='6.6' r='0.65'/%3E%3Ccircle cx='7.2' cy='6.6' r='0.65'/%3E%3Ccircle cx='12' cy='6.6' r='0.65'/%3E%3Ccircle cx='16.8' cy='6.6' r='0.65'/%3E%3Ccircle cx='21.6' cy='6.6' r='0.65'/%3E%3Ccircle cx='4.8' cy='8.8' r='0.65'/%3E%3Ccircle cx='9.6' cy='8.8' r='0.65'/%3E%3Ccircle cx='14.4' cy='8.8' r='0.65'/%3E%3Ccircle cx='19.2' cy='8.8' r='0.65'/%3E%3Ccircle cx='2.4' cy='11' r='0.65'/%3E%3Ccircle cx='7.2' cy='11' r='0.65'/%3E%3Ccircle cx='12' cy='11' r='0.65'/%3E%3Ccircle cx='16.8' cy='11' r='0.65'/%3E%3Ccircle cx='21.6' cy='11' r='0.65'/%3E%3Ccircle cx='4.8' cy='13.2' r='0.65'/%3E%3Ccircle cx='9.6' cy='13.2' r='0.65'/%3E%3Ccircle cx='14.4' cy='13.2' r='0.65'/%3E%3Ccircle cx='19.2' cy='13.2' r='0.65'/%3E%3Ccircle cx='2.4' cy='15.4' r='0.65'/%3E%3Ccircle cx='7.2' cy='15.4' r='0.65'/%3E%3Ccircle cx='12' cy='15.4' r='0.65'/%3E%3Ccircle cx='16.8' cy='15.4' r='0.65'/%3E%3Ccircle cx='21.6' cy='15.4' r='0.65'/%3E%3Ccircle cx='4.8' cy='17.6' r='0.65'/%3E%3Ccircle cx='9.6' cy='17.6' r='0.65'/%3E%3Ccircle cx='14.4' cy='17.6' r='0.65'/%3E%3Ccircle cx='19.2' cy='17.6' r='0.65'/%3E%3Ccircle cx='2.4' cy='19.8' r='0.65'/%3E%3Ccircle cx='7.2' cy='19.8' r='0.65'/%3E%3Ccircle cx='12' cy='19.8' r='0.65'/%3E%3Ccircle cx='16.8' cy='19.8' r='0.65'/%3E%3Ccircle cx='21.6' cy='19.8' r='0.65'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.country-flag--uk {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23012169'/%3E%3Cpath d='M0 0 60 40M60 0 0 40' stroke='%23fff' stroke-width='8'/%3E%3Cpath d='M0 0 60 40M60 0 0 40' stroke='%23c8102e' stroke-width='4'/%3E%3Cpath d='M30 0v40M0 20h60' stroke='%23fff' stroke-width='13'/%3E%3Cpath d='M30 0v40M0 20h60' stroke='%23c8102e' stroke-width='8'/%3E%3C/svg%3E");
  background-size: cover;
}

.country-flag--de {
  background: linear-gradient(180deg, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%);
}
  
