
:root{--bg:#fff;--bg-alt:#f5f7fb;--surface:#fff;--surface-strong:#050608;--text:#111;--muted:#4b5563;--border:#d7dde5;--accent:#111;--accent-contrast:#fff;--shadow:0 12px 32px rgba(0,0,0,.08);--focus:#0b57d0;--hero-text:#fff}
html[data-theme="dark"]{--bg:#0b0c0f;--bg-alt:#14171d;--surface:#181c23;--surface-strong:#050608;--text:#f3f4f6;--muted:#c7ced8;--border:#2c3340;--accent:#f3f4f6;--accent-contrast:#111;--shadow:0 14px 40px rgba(0,0,0,.35);--focus:#8ab4f8;--hero-text:#fff}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;line-height:1.6}img{max-width:100%;height:auto}a{color:inherit}a:hover{text-decoration-thickness:2px}a:focus-visible,button:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.skip-link{position:absolute;left:1rem;top:-4rem;z-index:1000;padding:.75rem 1rem;background:var(--accent);color:var(--accent-contrast);border-radius:.5rem}.skip-link:focus{top:1rem}
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.94);border-bottom:1px solid var(--border);backdrop-filter:blur(10px)}html[data-theme="dark"] .site-header{background:rgba(11,12,15,.94)}
.site-header-inner,.footer-grid,.hero-grid,.card-grid,.stats-grid,.group-grid,.event-list{display:grid;gap:1.5rem}.site-header-inner{grid-template-columns:1fr auto;align-items:center;padding:.9rem 1rem}
.brand{display:inline-flex;align-items:center;gap:.9rem;text-decoration:none;font-weight:700}.brand-logo{width:56px;height:56px;object-fit:contain;border-radius:12px;background:#fff}.brand-text{font-size:1.1rem;letter-spacing:.02em}
.header-actions{display:flex;align-items:center;gap:1rem}.nav-list,.footer-links,.inline-list,.feature-list{list-style:none;margin:0;padding:0}.nav-list,.footer-links,.inline-list{display:flex;flex-wrap:wrap;gap:1rem}.nav-list a,.footer-links a,.inline-list a{text-decoration:none}.nav-list a:hover,.nav-list a:focus-visible,.footer-links a:hover,.footer-links a:focus-visible,.inline-list a:hover{text-decoration:underline}
.theme-toggle{display:inline-flex;align-items:center;gap:.6rem;padding:.7rem .9rem;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text);cursor:pointer}
.hero{background:linear-gradient(180deg,var(--surface-strong) 0%,var(--bg) 100%)}.hero-shell{grid-template-columns:1.15fr .85fr;align-items:center;min-height:76vh;padding:4rem 1rem}.hero-copy{color:var(--hero-text)}.hero-subtitle{margin:0 0 1rem;font-size:1.35rem;font-weight:700;color:rgba(255,255,255,.92)}.hero-logo{width:min(100%,440px);margin:0 auto;display:block;box-shadow:0 20px 60px rgba(0,0,0,.35)}.hero-mark{display:grid;gap:1.5rem;align-items:center}
.eyebrow{margin:0 0 .75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-size:.88rem}.hero-copy .eyebrow,.hero-copy .intro{color:rgba(255,255,255,.9)}h1,h2,h3{line-height:1.2}h1{margin:0 0 1rem;font-size:clamp(2.8rem,5vw,5.25rem);font-weight:900;letter-spacing:-.02em;text-wrap:balance}h2{margin:0 0 1rem;font-size:clamp(1.7rem,2.6vw,2.4rem)}h3{margin-top:0;font-size:1.2rem}
.intro,.info-card p,.site-footer p,.lede,.event-meta,.event-description,.event-empty,.group-card p{color:var(--muted)}.hero-actions,.callout-actions{display:flex;flex-wrap:wrap;gap:1rem;margin-top:2rem}
.primary-button,.secondary-button,.tertiary-button{padding:.95rem 1.25rem;font-weight:700;text-decoration:none;border-radius:999px;display:inline-flex;align-items:center;gap:.6rem}.primary-button{background:#fff!important;color:#111!important}.secondary-button{background:transparent!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)}.tertiary-button{background:var(--surface);color:var(--text);border:1px solid var(--border)}
.hero-panel,.info-card,.stat-card,.group-card,.event-card,.callout-panel{background:var(--surface);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow)}.hero-panel,.callout-panel{padding:1.5rem}.feature-list li{display:grid;grid-template-columns:1.25rem 1fr;column-gap:.8rem;align-items:start;margin-bottom:1rem}.feature-list i,.info-card h3 i,.event-card h3 i,.group-card h3 i{width:1.25rem;text-align:center;margin-top:.08rem;flex:0 0 1.25rem}.info-card h3,.event-card h3,.group-card h3{display:flex;align-items:flex-start;gap:.55rem}
.content-section{background:var(--bg)}.alt-section{background:var(--bg-alt)}.section-heading{margin-bottom:2rem}.section-heading .lede{max-width:64rem;margin-top:0}.info-card,.stat-card,.group-card,.event-card{padding:1.5rem;height:100%}.two-up{grid-template-columns:repeat(2,minmax(0,1fr))}.three-up{grid-template-columns:repeat(3,minmax(0,1fr))}.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.group-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat-value{margin:0;font-size:clamp(2rem,3vw,2.75rem);font-weight:900}.stat-label{margin:0;color:var(--muted);font-weight:700}
.event-list{grid-template-columns:repeat(2,minmax(0,1fr))}.event-card h3{margin-bottom:.65rem}.event-meta{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:.8rem;font-size:.96rem}.event-meta span{display:inline-flex;align-items:center;gap:.45rem}.event-description{margin-bottom:1rem}.badge{display:inline-block;padding:.3rem .65rem;border-radius:999px;background:var(--bg-alt);border:1px solid var(--border);font-size:.8rem;font-weight:700;margin-bottom:.75rem}.event-empty{padding:1rem 0 0}
.page-hero{padding:4rem 1rem 2rem;background:linear-gradient(180deg,var(--surface-strong) 0%,var(--bg) 100%);color:#fff}.breadcrumbs{margin:0 0 1rem;font-size:.95rem}.breadcrumbs a{color:rgba(255,255,255,.85)}.group-page-logo{width:min(100%,180px);display:block;margin-bottom:1.25rem;background:#fff}
.site-footer{border-top:1px solid var(--border);background:var(--bg)}.footer-grid{grid-template-columns:1fr auto;align-items:start}.footer-title{margin:0 0 .35rem;font-weight:700;color:var(--text)!important}.footer-meta{margin:.2rem 0;color:var(--muted)}.footer-secondary{display:grid;gap:1rem;justify-items:end}.built-with{color:var(--muted)}
@media (max-width:1100px){.event-list,.group-grid,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){.site-header-inner,.hero-shell,.two-up,.three-up,.footer-grid,.stats-grid,.group-grid,.event-list{grid-template-columns:1fr}.header-actions{flex-direction:column;align-items:flex-start}.hero-shell{min-height:auto;padding-top:3rem;padding-bottom:3rem}.hero-mark{order:-1}.footer-secondary{justify-items:start}}
@media (max-width:640px){.nav-list{gap:.75rem}.brand-text{font-size:1rem}.hero-actions,.callout-actions{flex-direction:column;align-items:stretch}.primary-button,.secondary-button,.tertiary-button,.theme-toggle{text-align:center;justify-content:center}}

.panel-mission {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}
html[data-theme="dark"] .panel-mission {
  color: var(--text);
}
.plain-list {
  margin: 0;
  padding-left: 1.2rem;
}
.plain-list li {
  margin-bottom: 0.45rem;
}
.site-footer .footer-grid {
  grid-template-columns: 1fr;
}

.facts-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fact-card h3 {
  margin-bottom: 0;
}
.fact-card-wide {
  grid-column: 1 / -1;
}
#groups .group-grid {
  grid-template-columns: 1fr;
}
#groups .group-card {
  display: grid;
  grid-template-columns: 1.3fr auto auto;
  align-items: center;
  gap: 1.25rem;
}
#groups .group-card h3,
#groups .group-card p {
  margin: 0;
}
#groups .group-card p:last-child {
  justify-self: end;
}
@media (max-width: 1100px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  #groups .group-card {
    grid-template-columns: 1fr;
    align-items: start;
  }
  #groups .group-card p:last-child {
    justify-self: start;
  }
  .fact-card-wide {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  .facts-grid {
    grid-template-columns: 1fr;
  }
}

#groups .group-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  align-items: center;
}
#groups .group-card a {
  text-decoration: none;
}
#groups .group-card a:hover {
  text-decoration: underline;
}


#groups .group-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

#groups .group-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
}

#groups .group-card > * {
  position: relative;
  z-index: 2;
}

#groups .group-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 24px;
  text-decoration: none;
}

#groups .group-card-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

#groups .group-card-main {
  min-width: 0;
}

#groups .group-card h3 {
  margin: 0 0 0.3rem;
}

#groups .group-tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

#groups .group-card-event {
  justify-self: start;
  text-align: left;
}

#groups .group-event-text {
  display: inline-block;
}

#groups .group-event-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  position: relative;
  z-index: 3;
}

#groups .group-card-action {
  justify-self: end;
}

#groups .group-card-action .tertiary-button {
  pointer-events: none;
  white-space: nowrap;
}

#groups .group-card:hover {
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  #groups .group-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main action"
      "event action";
    gap: 1rem 1.25rem;
  }

  #groups .group-card-main { grid-area: main; }
  #groups .group-card-event { grid-area: event; }
  #groups .group-card-action { grid-area: action; align-self: center; }
}

@media (max-width: 700px) {
  #groups .group-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "event"
      "action";
    align-items: start;
  }

  #groups .group-card-action {
    justify-self: start;
  }

  #groups .group-card-action .tertiary-button {
    white-space: normal;
  }
}


#groups .group-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

#groups .group-card h3 {
  margin: 0 0 0.25rem;
}

#groups .group-tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  text-align: left;
  max-width: 42rem;
}

.panel-mission-heading {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

html[data-theme="dark"] .panel-mission-heading {
  color: var(--text);
}


/* Light theme: remove problematic hero fade */
.hero {
  background: var(--bg-alt);
}

html[data-theme="dark"] .hero {
  background: var(--surface-strong);
}

html:not([data-theme="dark"]) .hero-copy,
html:not([data-theme="dark"]) .hero-copy .eyebrow,
html:not([data-theme="dark"]) .hero-copy .intro,
html:not([data-theme="dark"]) .hero-subtitle {
  color: var(--text);
}

/* Improved group cards */
#groups .group-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

#groups .group-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  cursor: pointer;
}

#groups .group-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

#groups .group-card h3 {
  margin: 0 0 0.25rem;
}

#groups .group-tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  text-align: left;
  max-width: 42rem;
}

#groups .group-card-event {
  justify-self: start;
  text-align: left;
}

#groups .group-event-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

#groups .group-card-action {
  justify-self: end;
}

#groups .group-page-button {
  position: relative;
  z-index: 3;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  #groups .group-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main action"
      "event action";
    gap: 1rem 1.25rem;
  }

  #groups .group-card-main {
    grid-area: main;
  }

  #groups .group-card-event {
    grid-area: event;
  }

  #groups .group-card-action {
    grid-area: action;
    align-self: center;
  }
}

@media (max-width: 700px) {
  #groups .group-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "event"
      "action";
    align-items: start;
  }

  #groups .group-card-action {
    justify-self: start;
  }

  #groups .group-page-button {
    white-space: normal;
  }
}

/* Event card images */

.event-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1rem;
  background: var(--bg-alt);
}

/* Light theme: remove fade from individual group pages */

.page-hero {
  padding: 4rem 1rem 2rem;
  background: var(--bg-alt);
  color: var(--text);
}

html[data-theme="dark"] .page-hero {
  background: var(--surface-strong);
  color: #fff;
}

html:not([data-theme="dark"]) .page-hero,
html:not([data-theme="dark"]) .page-hero .eyebrow,
html:not([data-theme="dark"]) .page-hero .intro,
html:not([data-theme="dark"]) .page-hero .hero-subtitle,
html:not([data-theme="dark"]) .page-hero .breadcrumbs,
html:not([data-theme="dark"]) .page-hero .breadcrumbs a {
  color: var(--text);
}

/* List/map view toggle */

[hidden] {
  display: none !important;
}

.view-toggle {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.view-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.view-toggle-button.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.groups-map-panel {
  margin-top: 1rem;
}

.groups-map {
  display: block;
  width: 100%;
  min-height: 520px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}

.map-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-popup-content {
  color: #111;
  line-height: 1.45;
}

.leaflet-popup-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.leaflet-popup-content p {
  margin: 0.35rem 0;
}

.leaflet-popup-content a {
  color: #111;
  font-weight: 700;
}

@media (max-width: 700px) {
  .groups-map {
    min-height: 420px;
  }
}

/* Fix Leaflet tiles when global img styles are present */
.leaflet-container img,
.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  height: auto;
}

.leaflet-container {
  width: 100%;
  height: 520px;
}

.leaflet-tile-container img {
  width: 256px !important;
  height: 256px !important;
}

/* Critical Leaflet layout fixes */
.leaflet-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 520px;
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container img {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-map-pane {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 400;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}
/* Leaflet popup readability */

.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.leaflet-popup-tip {
  background: var(--surface);
}

.leaflet-popup-content {
  color: var(--text);
  line-height: 1.45;
  font-size: 0.95rem;
  min-width: 220px;
}

.leaflet-popup-content h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.1rem;
}

.leaflet-popup-content p {
  margin: 0.45rem 0;
  color: var(--muted);
}

.leaflet-popup-content strong,
.leaflet-popup-content a {
  color: var(--text);
  font-weight: 700;
}

.leaflet-popup-content a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.leaflet-popup-close-button {
  color: var(--text) !important;
}

/* Custom map markers */

.ukai-map-marker {
  color: #111;
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(255,255,255,.85);
}

html[data-theme="dark"] .ukai-map-marker {
  color: #111;
}

/* Leaflet popup readability */

.leaflet-popup-content-wrapper {
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.leaflet-popup-content {
  margin: 0;
  padding: 1rem 1.15rem;
  color: var(--text);
  line-height: 1.45;
  font-size: 0.95rem;
  min-width: 220px;
}

.leaflet-popup-content h3 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 1.1rem;
}

.leaflet-popup-content p {
  margin: 0.5rem 0;
  color: var(--muted);
}

.leaflet-popup-content strong,
.leaflet-popup-content a {
  color: var(--text);
  font-weight: 700;
}

.leaflet-popup-tip {
  background: var(--surface);
}

/* Correct group-list event spacing after popup refinements */

#groups .group-event-text {
  display: inline-flex !important;
  align-items: flex-start;
  gap: 0.45rem;
  white-space: normal;
}

#groups .group-event-text i {
  width: 1.25rem;
  flex: 0 0 1.25rem;
  text-align: center;
  margin-top: 0.15rem;
}

/* Correct map popup layout without affecting the group list */

.leaflet-popup-content-wrapper .leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 300px !important;
}

.leaflet-popup-content .map-popup-inner {
  display: grid;
  gap: 1rem;
  padding: 1.25rem !important;
}

.leaflet-popup-content .map-popup-title {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  align-items: start;
  gap: 0.65rem;
  margin: 0 !important;
}

.leaflet-popup-content .map-popup-event {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  align-items: start;
  gap: 0.65rem;
  margin: 0 !important;
}

.leaflet-popup-content .map-popup-action {
  margin: 0 !important;
}

.leaflet-popup-content .map-popup-group-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 !important;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none !important;
  font-weight: 700;
}

.leaflet-popup-content .map-popup-group-link:hover,
.leaflet-popup-content .map-popup-group-link:focus {
  text-decoration: none !important;
}

/* Map popup typography and compact spacing */

.leaflet-popup-content-wrapper .leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 300px !important;
}

.leaflet-popup-content .map-popup-inner {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem 1.25rem !important;
}

.leaflet-popup-content .map-popup-title,
.leaflet-popup-content .map-popup-event {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  align-items: start;
  gap: 0.65rem;
  margin: 0 !important;
  font-size: 1rem;
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-title {
  font-weight: 700;
}

.leaflet-popup-content .map-popup-title span,
.leaflet-popup-content .map-popup-event span,
.leaflet-popup-content .map-popup-event a {
  font-size: 1rem;
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-event,
.leaflet-popup-content .map-popup-event span {
  font-weight: 400;
}

.leaflet-popup-content .map-popup-title i,
.leaflet-popup-content .map-popup-event i {
  width: 1.35rem;
  text-align: center;
  margin-top: 0.05rem;
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-action {
  margin: 0.15rem 0 0 !important;
}

.leaflet-popup-content .map-popup-group-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 !important;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none !important;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-group-link:hover,
.leaflet-popup-content .map-popup-group-link:focus {
  text-decoration: none !important;
}

/* Cleaner compact popup link styling */

.leaflet-popup-content-wrapper .leaflet-popup-content {
  min-width: 260px !important;
}

.leaflet-popup-content .map-popup-inner {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.1rem !important;
}

.leaflet-popup-content .map-popup-group-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-group-link:hover,
.leaflet-popup-content .map-popup-group-link:focus {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

/* Final popup typography alignment tweaks */

.leaflet-popup-content .map-popup-event a,
.leaflet-popup-content .map-popup-group-link {
  font-weight: 400 !important;
}

.leaflet-popup-content .map-popup-group-link {
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

.leaflet-popup-content .map-popup-group-link span {
  line-height: 1.35;
}

.leaflet-popup-content .map-popup-group-link i {
  width: 1.35rem;
  text-align: center;
  flex: 0 0 1.35rem;
  margin-top: 0.05rem;
}


/* Compact popup button */

.leaflet-popup-content .map-popup-group-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.45rem 0.8rem;
  border-radius: 999px;

  background: #f3f4f6;
  color: #111 !important;
  border: 1px solid #f3f4f6;

  font-size: 0.95rem;
  font-weight: 600 !important;
  line-height: 1.2;

  text-decoration: none !important;
}

.leaflet-popup-content .map-popup-group-link i {
  text-decoration: none !important;
}

.leaflet-popup-content .map-popup-group-link span {
  text-decoration: none !important;
}

.leaflet-popup-content .map-popup-group-link:hover,
.leaflet-popup-content .map-popup-group-link:focus {
  background: #ffffff;
  border-color: #ffffff;
}


/* Stronger contrast for pill buttons in dark mode */

:root[data-theme="dark"] .primary-button,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .tertiary-button,
:root[data-theme="dark"] .group-page-button {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

:root[data-theme="dark"] .primary-button:hover,
:root[data-theme="dark"] .secondary-button:hover,
:root[data-theme="dark"] .tertiary-button:hover,
:root[data-theme="dark"] .group-page-button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

/* Unified pill button styling */

.primary-button,
.secondary-button,
.tertiary-button,
.group-page-button,
.view-toggle-button,
.leaflet-popup-content .map-popup-group-link {
  background: var(--accent) !important;
  color: var(--accent-contrast) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none !important;
}

.primary-button:hover,
.secondary-button:hover,
.tertiary-button:hover,
.group-page-button:hover,
.view-toggle-button:hover,
.leaflet-popup-content .map-popup-group-link:hover {
  filter: brightness(0.92);
  text-decoration: none !important;
}

:root[data-theme="dark"] .primary-button,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .tertiary-button,
:root[data-theme="dark"] .group-page-button,
:root[data-theme="dark"] .view-toggle-button,
:root[data-theme="dark"] .leaflet-popup-content .map-popup-group-link {
  background: #f3f4f6 !important;
  color: #111 !important;
  border-color: #f3f4f6 !important;
}

:root[data-theme="dark"] .primary-button:hover,
:root[data-theme="dark"] .secondary-button:hover,
:root[data-theme="dark"] .tertiary-button:hover,
:root[data-theme="dark"] .group-page-button:hover,
:root[data-theme="dark"] .view-toggle-button:hover,
:root[data-theme="dark"] .leaflet-popup-content .map-popup-group-link:hover {
  background: #ffffff !important;
  border-color: #ffffff !important;
}

/* Map/list toggle active state should remain obvious */
.view-toggle-button.active {
  background: var(--accent) !important;
  color: var(--accent-contrast) !important;
  border-color: var(--accent) !important;
}

:root[data-theme="dark"] .view-toggle-button.active {
  background: #f3f4f6 !important;
  color: #111 !important;
  border-color: #f3f4f6 !important;
}
