@layer pages {
  /* Community: the member total and an anonymous map of postal areas. */
  .community-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); margin-block: 0; }
  .community-total__value { font: 800 var(--text-3xl)/1 var(--font-display); color: var(--color-primary); }
  .community-total__label { font-size: var(--text-lg); font-weight: 600; }

  /* The map is hidden until its script runs; the list of areas below it is the version without a picture. */
  .community-map { position: relative; z-index: 0; isolation: isolate; inline-size: 100%; block-size: clamp(20rem, 60vh, 36rem); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface-sunken); }
  .community-map:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  /* The small map on the home page, next to its text. */
  .community-teaser { display: grid; gap: var(--space-6); align-items: center; }
  .community-teaser > .stack > * { margin-block: 0; }
  .community-map--small { block-size: clamp(16rem, 36vw, 22rem); }
  @media (min-width: 56rem) { .community-teaser { grid-template-columns: 1fr 1.2fr; gap: var(--space-7); } }
  .community-areas { list-style: none; margin: 0; padding: 0; max-inline-size: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .community-areas li { padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-ink-soft); font-size: var(--text-sm); }
  .community-areas__code { font-weight: 700; color: var(--color-ink); }
  .community-join > * { margin-block: 0 var(--space-3); }
  .community-credit { margin-block: 0; color: var(--color-ink-soft); font-size: var(--text-xs); }
}

/* Leaflet's own stylesheet is not in a cascade layer, so a rule that overrides it cannot be inside one either. */
/* The credit line CARTO requires must stay fully visible: keep it clear of the rounded corner. */
.community-map .leaflet-control-attribution { margin: 0 var(--space-3) var(--space-2) 0; border-radius: var(--radius-sm, 4px); }
