/* Europe Expat Livability Framework — widget styles (v1.1.1)
   Self-contained palette that works on light AND dark WordPress themes
   without relying on prefers-color-scheme. Supports explicit
   data-elf-theme="dark" or data-elf-theme="light" override. */

.elf-widget {
  /* Defaults: auto-detect via prefers-color-scheme but force readability
     by using semi-transparent panels inside the widget. */
  --elf-bg: #ffffff;
  --elf-panel: #f8f9fa;
  --elf-fg: #111418;
  --elf-fg-strong: #000;
  --elf-muted: #5a6471;
  --elf-border: #d1d5db;
  --elf-accent: #0d7a3d;
  --elf-accent-fg: #ffffff;
  --elf-danger: #b91c1c;
  --elf-radius: 8px;
  --elf-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);

  color: var(--elf-fg);
  background: var(--elf-bg);
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  box-shadow: var(--elf-shadow);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  /* Always render in the widget's own typography stack — don't inherit
     site fonts that may have low-contrast colors baked in via :root. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark theme — applies via shortcode override OR via auto-detection of dark site. */
.elf-widget[data-elf-theme="dark"],
.elf-widget--dark {
  --elf-bg: #0f1419;
  --elf-panel: #161b22;
  --elf-fg: #e6edf3;
  --elf-fg-strong: #ffffff;
  --elf-muted: #8b949e;
  --elf-border: #30363d;
  --elf-accent: #3aa64a;
  --elf-accent-fg: #ffffff;
  --elf-danger: #f85149;
  --elf-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Auto dark mode based on OS — only applies if no explicit theme is set. */
@media (prefers-color-scheme: dark) {
  .elf-widget:not([data-elf-theme="light"]) {
    --elf-bg: #0f1419;
    --elf-panel: #161b22;
    --elf-fg: #e6edf3;
    --elf-fg-strong: #ffffff;
    --elf-muted: #8b949e;
    --elf-border: #30363d;
    --elf-accent: #3aa64a;
    --elf-accent-fg: #ffffff;
    --elf-danger: #f85149;
  }
}

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

/* All text inside the widget inherits widget colors (defends against
   page CSS forcing dark text on dark widget backgrounds). */
.elf-widget,
.elf-widget h1, .elf-widget h2, .elf-widget h3, .elf-widget h4,
.elf-widget p, .elf-widget li, .elf-widget td, .elf-widget th,
.elf-widget label, .elf-widget span, .elf-widget div,
.elf-widget button, .elf-widget select, .elf-widget input {
  color: var(--elf-fg);
}

/* Header / filters --------------------------------------------------- */
.elf-widget__header {
  padding: 16px;
  border-bottom: 1px solid var(--elf-border);
  background: var(--elf-panel);
}

.elf-widget__title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.elf-widget__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--elf-fg-strong) !important;
}

.elf-widget__updated {
  color: var(--elf-muted);
  font-size: 12px;
}

.elf-widget__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.elf-widget__filter-group { display: flex; flex-direction: column; gap: 6px; }
.elf-widget__filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--elf-muted);
  font-weight: 600;
}

.elf-widget__select {
  padding: 6px 10px;
  border: 1px solid var(--elf-border);
  border-radius: 6px;
  background: var(--elf-bg);
  color: var(--elf-fg);
  font-size: 13px;
  min-width: 160px;
  font-family: inherit;
}

.elf-widget__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.elf-widget .elf-chip {
  padding: 6px 12px !important;
  border: 1px solid var(--elf-border) !important;
  background: var(--elf-bg) !important;
  color: var(--elf-fg) !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  font-family: inherit !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
}
.elf-widget .elf-chip:hover {
  background: var(--elf-panel) !important;
  border-color: var(--elf-accent) !important;
}
.elf-widget .elf-chip.elf-chip--active,
.elf-widget .elf-chip--active {
  background: var(--elf-accent) !important;
  color: #ffffff !important;
  border-color: var(--elf-accent) !important;
}
.elf-chip:focus-visible {
  outline: 2px solid var(--elf-accent);
  outline-offset: 2px;
}

.elf-widget__view-toggle {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--elf-border);
  border-radius: 6px;
  overflow: hidden;
}
.elf-widget .elf-view-btn {
  background: var(--elf-bg) !important;
  color: var(--elf-fg) !important;
  border: 0 !important;
  padding: 7px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  font-family: inherit !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.elf-widget .elf-view-btn + .elf-view-btn { border-left: 1px solid var(--elf-border) !important; }
.elf-widget .elf-view-btn:hover { background: var(--elf-panel) !important; }
.elf-widget .elf-view-btn.elf-view-btn--active,
.elf-widget .elf-view-btn--active {
  background: var(--elf-accent) !important;
  color: #ffffff !important;
}

/* Body --------------------------------------------------------------- */
.elf-widget__body { position: relative; background: var(--elf-bg); }

.elf-widget__map {
  width: 100% !important;
  min-height: 400px;
  background: var(--elf-panel);
  position: relative;
}

/* Leaflet container hardening — prevent WordPress themes from collapsing the map. */
.elf-widget .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 400px !important;
  background: var(--elf-panel) !important;
  font-family: inherit !important;
  outline: none;
  position: relative !important;
  overflow: hidden !important;
}
/* Tile pane visibility — defeats theme rules like img { max-width: 100% }.
   Note: SVG marker paths need pointer-events:auto so clicks work — do NOT
   pin position:absolute on the SVG itself or markers can't be clicked. */
.elf-widget .leaflet-tile,
.elf-widget .leaflet-tile img,
.elf-widget .leaflet-marker-icon,
.elf-widget .leaflet-marker-shadow,
.elf-widget .leaflet-tile-container,
.elf-widget .leaflet-zoom-box,
.elf-widget .leaflet-image-layer {
  max-width: none !important;
  max-height: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  filter: none !important;
}
/* Ensure SVG marker overlay accepts clicks. */
.elf-widget .leaflet-overlay-pane svg,
.elf-widget .leaflet-overlay-pane path.leaflet-interactive,
.elf-widget .leaflet-overlay-pane circle.leaflet-interactive {
  pointer-events: auto !important;
  cursor: pointer;
}
/* v1.1.8 fix that prevents WordPress theme img { max-width: 100% } from
   collapsing Leaflet panes to 0 width. v1.1.9 refinement: do NOT force
   width/height on .leaflet-overlay-pane or .leaflet-marker-pane — that breaks
   SVG marker click hit-testing. Just defeat the max-width constraint. */
.elf-widget .leaflet-map-pane,
.elf-widget .leaflet-tile-pane,
.elf-widget .leaflet-shadow-pane,
.elf-widget .leaflet-tooltip-pane,
.elf-widget .leaflet-popup-pane,
.elf-widget .leaflet-layer,
.elf-widget .leaflet-tile-container {
  max-width: none !important;
  max-height: none !important;
}
.elf-widget .leaflet-overlay-pane,
.elf-widget .leaflet-marker-pane {
  max-width: none !important;
  max-height: none !important;
  pointer-events: none;
}
.elf-widget .leaflet-overlay-pane > * {
  pointer-events: auto;
}

/* v1.1.20: Tooltip box. Without these rules the theme's container width
   collapses the tooltip to a thin column with overflowing text. */
.elf-widget .leaflet-tooltip {
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 4px 8px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  pointer-events: none !important;
}
/* Hide tooltips on touch devices — tap opens the detail panel below the map
   already, and on mobile the tooltip can't be dismissed cleanly. */
@media (hover: none) and (pointer: coarse) {
  .elf-widget .leaflet-tooltip { display: none !important; }
}

/* Force the tile image dimensions to 256x256 (Leaflet's standard tile size).
   Browser test showed inline style="width:256px" gets computed to 0 because
   theme img { max-width: 100% } evaluates against the (broken) 0-width parent.
   Setting !important here defeats the theme rule. */
.elf-widget .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  min-width: 256px !important;
  min-height: 256px !important;
  max-width: 256px !important;
  max-height: 256px !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Match for the tile-loaded variant too (Leaflet adds class on load). */
.elf-widget img.leaflet-tile,
.elf-widget img.leaflet-tile-loaded {
  width: 256px !important;
  height: 256px !important;
  min-width: 256px !important;
  min-height: 256px !important;
  max-width: 256px !important;
  max-height: 256px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
/* Parent body must allow the map to actually render. */
.elf-widget .elf-widget__body {
  overflow: visible !important;
  position: relative;
}
.elf-widget .leaflet-control-attribution { background: rgba(255,255,255,0.85); color: #222; font-size: 11px; }
.elf-widget .leaflet-control-attribution a { color: #0d7a3d; }

.elf-loading,
.elf-error,
.elf-empty {
  padding: 32px;
  text-align: center;
  color: var(--elf-muted);
}

.elf-error { color: var(--elf-danger); }

/* Leaflet popup overrides: ensure popups render light even on dark site themes */
.elf-widget .leaflet-popup-content-wrapper {
  background: #ffffff;
  color: #111418;
}
.elf-widget .leaflet-popup-tip { background: #ffffff; }
.elf-widget .leaflet-popup-content { margin: 12px 14px; }
.elf-widget .leaflet-popup-content * { color: inherit; }

/* Popup -------------------------------------------------------------- */
.elf-popup { font-size: 13px; line-height: 1.45; color: #111418; }
.elf-popup__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.elf-popup__title { font-weight: 700; font-size: 15px; color: #000; }
.elf-popup__score {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}
.elf-popup__framing {
  margin: 0 0 10px 0;
  color: #4b5563;
  font-style: italic;
  font-size: 12.5px;
}

.elf-popup__why {
  margin: 8px 0 10px 0;
  padding: 8px 10px;
  background: #f0f7f3;
  border-left: 3px solid #0d7a3d;
  border-radius: 4px;
}
.elf-popup__why strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0d7a3d;
  margin-bottom: 4px;
}
.elf-popup__why ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #1f2937;
}
.elf-popup__why li { margin: 2px 0; }

.elf-popup__scores { margin: 8px 0; padding: 0; }
.elf-popup__score-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}
.elf-popup__score-row dt { color: #6b7280; font-size: 11.5px; }
.elf-popup__score-row dd { margin: 0; display: flex; align-items: center; gap: 6px; color: #111418; }

.elf-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.elf-bar__fill {
  height: 100%;
  background: #0d7a3d;
}
.elf-bar__val { font-size: 11px; color: #6b7280; min-width: 32px; }

.elf-popup__meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-size: 12px;
  color: #1f2937;
}
/* v1.1.18: every meta child spans full width by default so inserted blocks
   (like the cost breakdown card) don't get squeezed into a half-column. */
.elf-popup__meta > div,
.elf-popup__meta > .elf-popup__cost-breakdown { grid-column: 1 / -1; }

.elf-popup__tags { margin-top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.elf-tag {
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #374151;
}

.elf-popup__sources {
  margin-top: 10px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}
.elf-popup__sources a { color: #0d7a3d; text-decoration: none; }
.elf-popup__sources a:hover { text-decoration: underline; }

/* Table -------------------------------------------------------------- */
.elf-widget__table { padding: 0; background: var(--elf-bg); }
.elf-table__wrap { overflow-x: auto; }
.elf-table__el {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--elf-bg);
}
.elf-table__el th,
.elf-table__el td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--elf-border);
  text-align: left;
  vertical-align: middle;
  color: var(--elf-fg);
}
.elf-table__el thead {
  background: var(--elf-panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
.elf-table__el thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--elf-muted);
  font-weight: 600;
}
.elf-rank {
  color: var(--elf-muted);
  font-weight: 700;
  width: 36px;
}
.elf-overall {
  font-weight: 700;
  font-size: 15px;
}
.elf-table__country {
  color: var(--elf-muted);
  font-size: 11px;
}
.elf-table__el tbody tr:hover { background: var(--elf-panel); }
.elf-widget .elf-table__row { cursor: pointer; }
.elf-widget .elf-table__row:focus-visible {
  outline: 2px solid var(--elf-accent);
  outline-offset: -2px;
}

/* Detail panel that opens when a table row is clicked. */
.elf-table__detail {
  margin: 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--elf-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #111418;
  position: relative;
}
.elf-table__detail-inner { position: relative; }
.elf-table__detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffffff !important;
  border: 1px solid var(--elf-border) !important;
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  color: #6b7280 !important;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 3;
}
.elf-table__detail-close:hover { color: #111418 !important; }
/* v1.1.17: reserve room on the right edge of the popup header so the score
   pill doesn't slide under the close button. */
.elf-table__detail .elf-popup__header,
.elf-map__detail .elf-popup__header {
  padding-right: 48px;
}
/* Dark widget theme — detail panel stays light for readability. */
.elf-widget[data-elf-theme="dark"] .elf-table__detail,
.elf-widget--dark .elf-table__detail {
  background: #ffffff;
  color: #111418;
}

/* v1.1.15: Marker-click detail panel — appears below the map, same look
   as the table-row detail. Reuses popup styling for the content. */
.elf-map__detail {
  display: none;
  margin: 16px;
  padding: 16px 16px 12px 16px;
  background: #ffffff;
  border: 1px solid var(--elf-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #111418;
  position: relative;
}
.elf-map__detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffffff !important;
  border: 1px solid var(--elf-border) !important;
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  color: #6b7280 !important;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 2;
}
.elf-map__detail-close:hover { color: #111418 !important; }
/* Reuse popup styles inside the marker detail panel — keep text readable. */
.elf-map__detail .elf-popup__title { font-size: 16px; font-weight: 600; color: #111418; }
.elf-map__detail .elf-popup__header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-right: 36px; }
.elf-map__detail .elf-popup__score { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; }
.elf-map__detail .elf-popup__framing { color: #4b5563; font-size: 13px; margin: 8px 0 12px 0; }
/* v1.1.19: bullets were rendering OUTSIDE the green panel because the
   override used margin-left (pushes list outside) instead of padding-left
   (keeps bullets inside). Fix: use padding-left so bullets stay contained. */
.elf-map__detail .elf-popup__why ul { margin: 4px 0 12px 0; padding: 0 0 0 20px; list-style-position: outside; }
.elf-table__detail .elf-popup__why ul { margin: 4px 0 12px 0; padding: 0 0 0 20px; list-style-position: outside; }
.elf-map__detail .elf-popup__why li { font-size: 13px; color: #4b5563; margin-bottom: 2px; }
.elf-map__detail .elf-popup__scores { margin: 12px 0; }
.elf-map__detail .elf-popup__meta { font-size: 13px; color: #374151; margin: 12px 0; display: grid; gap: 4px; }
.elf-map__detail .elf-popup__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.elf-map__detail .elf-popup__sources { font-size: 12px; color: #6b7280; margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--elf-border); }
.elf-map__detail .elf-popup__sources a { color: var(--elf-accent, #0d7a3d); }

/* v1.1.16: Cost breakdown panel (rent + non-rent split). */
.elf-popup__cost-breakdown {
  margin: 8px 0 12px 0;
  padding: 10px 12px;
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
}
.elf-popup__cost-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: #374151;
}
.elf-popup__cost-line span:first-child { color: #6b7280; }
.elf-popup__cost-line span:last-child { font-weight: 600; color: #111418; }
.elf-popup__cost-evidence {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #d1d5db;
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
  line-height: 1.4;
}
.elf-popup__score-note {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: #6b7280;
  cursor: help;
  vertical-align: middle;
}
.elf-popup__score-note:hover { color: var(--elf-accent, #0d7a3d); }
.elf-widget[data-elf-theme="dark"] .elf-map__detail,
.elf-widget--dark .elf-map__detail {
  background: #ffffff;
  color: #111418;
}

/* Footer / methodology ---------------------------------------------- */
.elf-widget__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--elf-border);
  background: var(--elf-panel);
  font-size: 12px;
  color: var(--elf-fg);
}
.elf-methodology-toggle {
  background: transparent;
  border: 0;
  color: var(--elf-accent);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  font-family: inherit;
}
.elf-methodology { margin-top: 10px; color: var(--elf-fg); }
.elf-methodology h3 { margin: 14px 0 6px 0; font-size: 13px; font-weight: 600; color: var(--elf-fg-strong); }
.elf-methodology h3:first-child { margin-top: 0; }
.elf-methodology p { margin: 6px 0; color: var(--elf-fg); }
.elf-sources-list { margin: 6px 0 10px 18px; padding: 0; font-size: 12px; line-height: 1.6; color: var(--elf-fg); }
.elf-sources-list li { margin: 2px 0; color: var(--elf-fg); }
.elf-sources-list a { color: var(--elf-accent); text-decoration: none; }
.elf-sources-list a:hover { text-decoration: underline; }
.elf-disclaimer { color: var(--elf-muted); font-size: 11.5px; padding-top: 8px; border-top: 1px dashed var(--elf-border); margin-top: 12px; }

/* Responsive --------------------------------------------------------- */
@media (max-width: 640px) {
  .elf-widget__title { font-size: 16px; }
  .elf-widget__filters { gap: 12px; }
  .elf-widget__view-toggle { margin-left: 0; }
  /* CRITICAL: pin a FIXED height for the map on mobile so Leaflet measures
     the real container size before init. min-height alone doesn't work —
     the container can still be larger or jump around during init, breaking
     tile origin computation. Fixed height = stable measurement = correct tiles. */
  .elf-widget__map {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
  }
  .elf-widget .leaflet-container {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
  }
  .elf-table__el th, .elf-table__el td { padding: 8px 6px; font-size: 12px; }
  /* Hide less critical columns on mobile */
  .elf-table__el thead th:nth-child(4),
  .elf-table__el thead th:nth-child(5),
  .elf-table__el thead th:nth-child(6),
  .elf-table__el thead th:nth-child(7),
  .elf-table__el thead th:nth-child(8),
  .elf-table__el tbody td:nth-child(4),
  .elf-table__el tbody td:nth-child(5),
  .elf-table__el tbody td:nth-child(6),
  .elf-table__el tbody td:nth-child(7),
  .elf-table__el tbody td:nth-child(8) {
    display: none;
  }
}

/* Food & dining + Editorial notes (v1.1.30) ------------------------- */
.elf-food, .elf-notes {
  margin-top: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 10px;
}
.elf-food > summary, .elf-notes > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 8px;
  list-style: none;
}
.elf-food > summary::-webkit-details-marker,
.elf-notes > summary::-webkit-details-marker { display: none; }
.elf-food__overview { font-size: .9rem; margin: 4px 0 10px; color: #444; }
.elf-food__block { margin-bottom: 10px; font-size: .88rem; }
.elf-food__block > strong { display: block; margin-bottom: 4px; }
.elf-food__dishes, .elf-food__spots { list-style: none; margin: 0; padding: 0; }
.elf-food__dishes li, .elf-food__spots li { padding: 3px 0; }
.elf-food__dish-name, .elf-food__spot-name { font-weight: 600; }
.elf-food__price { color: #b06a00; font-weight: 600; }
.elf-food__type {
  font-size: .72rem; background: rgba(15,90,94,.12); color: #0f5a5e;
  padding: 1px 6px; border-radius: 999px; margin-left: 4px;
}
.elf-food__spot-note { font-size: .82rem; color: #666; }
.elf-food__costs { margin: 0; }
.elf-food__cost-row { display: flex; justify-content: space-between; padding: 2px 0; }
.elf-food__cost-row dt { color: #555; }
.elf-food__cost-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.elf-notes__list { list-style: none; margin: 0; padding: 0; }
.elf-note {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.elf-note:last-child { border-bottom: none; }
.elf-note__title { font-weight: 600; font-size: .9rem; }
.elf-note__body { font-size: .86rem; color: #555; margin: 2px 0; }
.elf-note__img { max-width: 100%; border-radius: 8px; margin-top: 6px; display: block; }
.elf-note__video {
  position: relative; width: 100%; padding-top: 56.25%; margin-top: 6px;
  border-radius: 8px; overflow: hidden;
}
.elf-note__video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.elf-note__link { font-size: .84rem; word-break: break-all; }

/* ============================================================
   v1.2.0 — Departures Board ([expat_departures_board])
   Airport flip-board: dark, monospace, scoped under .elf-board.
   ============================================================ */
.elf-board {
  --elf-board-bg: #0b1220;
  --elf-board-panel: #111a2e;
  --elf-board-line: #1e293b;
  --elf-board-fg: #e5e7eb;
  --elf-board-muted: #94a3b8;
  --elf-board-accent: #fbbf24;
  background: var(--elf-board-bg);
  color: var(--elf-board-fg);
  border-radius: 10px;
  padding: 18px 16px 8px;
  font-family: "SFMono-Regular", ui-monospace, "Roboto Mono", Menlo, Consolas, monospace;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.elf-board__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--elf-board-line);
}
.elf-board__plane {
  color: var(--elf-board-accent);
  font-size: 1.6rem;
  line-height: 1;
  transform: rotate(45deg);
}
.elf-board__title {
  color: var(--elf-board-accent);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.elf-board__row {
  display: grid;
  grid-template-columns: 1.1fr 2.2fr 0.9fr 1.3fr 0.7fr;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--elf-board-line);
}
.elf-board__row--header {
  color: var(--elf-board-muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  border-bottom: 2px solid var(--elf-board-line);
}
/* Scrollable body: caps the board height and scrolls the rows, while the
   header stays put. Scrollbar is hidden (still scrollable via wheel/touch/drag)
   on all browsers. */
.elf-board__scroll {
  max-height: var(--elf-board-max-h, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge/IE */
}
.elf-board__scroll::-webkit-scrollbar { width: 0; height: 0; display: none; } /* WebKit */
/* Pinned (sticky) rows: subtle highlight + a pin marker, and they sit at the
   very top of the scroll area. */
.elf-board__row--sticky {
  background: color-mix(in srgb, var(--elf-board-accent, #d4af37) 12%, transparent);
  position: relative;
}
.elf-board__row--sticky .elf-board__cell--flight::before {
  content: "\1F4CC";  /* pushpin */
  margin-right: 6px;
  font-size: 0.8em;
}
.elf-board__row:not(.elf-board__row--header) {
  opacity: 0;
  transform: translateY(-6px) rotateX(-25deg);
  transform-origin: top center;
  animation: elf-board-flip 0.5s ease forwards;
}
@keyframes elf-board-flip {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .elf-board__row:not(.elf-board__row--header) {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
.elf-board__cell {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.elf-board__cell--flight,
.elf-board__cell--gate { color: var(--elf-board-accent); font-weight: 700; }
.elf-board__cell--time { font-variant-numeric: tabular-nums; }
.elf-board__dest-link { color: var(--elf-board-fg); text-decoration: none; }
.elf-board__dest-link:hover,
.elf-board__dest-link:focus { color: var(--elf-board-accent); text-decoration: underline; }
/* v1.4.1 — native look by default: plain status text, no pill/box, no forced
   color. The status TEXT is tinted inline only when the "Colorize board status
   labels" admin setting is on (default off). The bordered pill was removed. */
.elf-board__status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.elf-board__empty { color: var(--elf-board-muted); font-style: italic; }
.elf-board__empty .elf-board__cell { white-space: normal; }

/* v1.2.1 — country divider row for [expat_departures_board group_by="country"] */
.elf-board__country {
  padding: 10px 6px 8px;
  border-bottom: 1px solid var(--elf-board-line);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0));
}
.elf-board__country-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--elf-board-accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.elf-board__country-flag { font-size: 1.2rem; letter-spacing: 0; }

@media (max-width: 640px) {
  .elf-board__row {
    grid-template-columns: 2fr 1fr 1.2fr;
  }
  .elf-board__cell--flight,
  .elf-board__cell--gate { display: none; }
}

/* ============================================================
   v1.7.5 — Compact / footer variant (global board)
   Container-driven (class, not viewport media query) so a narrow footer
   COLUMN on a wide viewport still collapses cleanly. Keeps DESTINATION +
   TIME + STATUS legible with NO truncation; drops FLIGHT NO. + GATE.
   Only .elf-board--compact / --footer boards; per-city board is untouched.
   ============================================================ */
.elf-board--compact {
  /* ~6 rows tall so it matches the footer's other columns; scroll stays
     hidden (see .elf-board__scroll). */
  --elf-board-max-h: 226px;
  padding: 12px 12px 6px;
}
.elf-board--compact .elf-board__head {
  gap: 7px;
  padding-bottom: 8px;
  margin-bottom: 6px;
}
.elf-board--compact .elf-board__plane { font-size: 1.15rem; }
.elf-board--compact .elf-board__title {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}
/* 3 columns: DESTINATION | TIME | STATUS. */
.elf-board--compact .elf-board__row {
  grid-template-columns: 1.7fr 0.9fr 1.1fr;
  gap: 6px;
  padding: 7px 4px;
}
.elf-board--compact .elf-board__cell--flight,
.elf-board--compact .elf-board__cell--gate { display: none; }
/* Smaller type so the kept columns fit ~360px without an ellipsis. */
.elf-board--compact .elf-board__cell {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.elf-board--compact .elf-board__row--header {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
/* Never clip DESTINATION or TIME; show the full HH:MM. */
.elf-board--compact .elf-board__cell--dest,
.elf-board--compact .elf-board__cell--time {
  overflow: visible;
  text-overflow: clip;
}
.elf-board--compact .elf-board__status { font-size: 0.68rem; letter-spacing: 0.04em; }
/* Shorten the DESTINATION header to DEST so it can't truncate in the
   narrow column (data cells keep the full city name). */
.elf-board--compact .elf-board__row--header .elf-board__cell--dest {
  font-size: 0;
}
.elf-board--compact .elf-board__row--header .elf-board__cell--dest::after {
  content: "DEST";
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

/* ============================================================
   v1.7.6 — Footer variant polish (global/footer board ONLY)
   Flatten the board so it reads as a footer COLUMN — not a floating
   navy card — and match the footer's editorial column headers.
   Scoped to .elf-board--footer so the per-city single-location board
   and the header/takeover board are untouched.
   ============================================================ */
.elf-board--footer {
  /* Hairline dividers + muted label ink on the near-black footer bg. */
  --elf-board-line: rgba(255, 255, 255, 0.08);
  --elf-board-muted: rgba(255, 255, 255, 0.55);
  /* Kill the card: flat on the footer background, no radius, no shadow. */
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  /* Flush with the column edge so DEST lines up with EXPLORE/COMPANY. */
  padding: 0;
  /* Clean readable footer face for everything; TIME re-asserts mono below. */
  font-family: inherit;
}
/* "DEPARTURES" as a footer column label: small-caps, muted, section-sized
   (not big bright amber). Plane stays a small, sparing amber glyph. */
.elf-board--footer .elf-board__head {
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--elf-board-line);
}
.elf-board--footer .elf-board__plane {
  color: var(--elf-board-accent);
  font-size: 0.85rem;
  opacity: 0.85;
}
.elf-board--footer .elf-board__title {
  color: var(--elf-board-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* Rows: hairline separators, flush-left, rhythm matching footer link lists. */
.elf-board--footer .elf-board__row {
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--elf-board-line);
}
.elf-board--footer .elf-board__row--header {
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--elf-board-line);
  color: var(--elf-board-muted);
}
.elf-board--footer .elf-board__row:last-child { border-bottom: 0; }
/* Clean, readable destination in the footer face; normalize spacing so
   two-word cities ("LAKE GARDA") don't read as double-spaced. */
.elf-board--footer .elf-board__cell {
  letter-spacing: 0.01em;
  word-spacing: normal;
}
.elf-board--footer .elf-board__dest-link { color: var(--elf-board-fg); }
/* Departures-board cue: monospace + tabular figures ONLY on TIME. */
.elf-board--footer .elf-board__cell--time {
  font-family: "SFMono-Regular", ui-monospace, "Roboto Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--elf-board-muted);
}
/* Status: small uppercase muted label. Amber only via the opt-in colorize
   setting (BOARDING/DELAYED), so it stays a sparing accent. */
.elf-board--footer .elf-board__status {
  color: var(--elf-board-muted);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   v1.2.0 — Single Location page (single-elf_location.php)
   ============================================================ */
/* ============================================================
   Location single page (single-elf_location.php)
   Restyled v1.2.5 to mirror the ELF map detail panel: shared
   --elf-* tokens, carded sections, score bars, dark-mode aware.
   ============================================================ */
.elf-loc {
  --elf-accent: #0d7a3d;
  --elf-panel: #f8f9fa;
  --elf-fg: #1a1f26;
  --elf-muted: #5a6471;
  --elf-border: #e5e7eb;
  --elf-radius: 14px;
  --elf-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  /* Sits inside the theme's content column (cfd-single-layout__main), so fill
     the column rather than imposing our own centered max-width. The standalone
     max-width only applies as a fallback when not inside that wrapper. */
  width: 100%;
  margin: 0 0 3rem;
  font-size: 1rem;      /* base body size matches the theme's posts (16px) */
  line-height: 1.75;    /* matches post paragraph line-height */
  color: var(--elf-fg);
  -webkit-font-smoothing: antialiased;
}
/* Fallback: if the theme wrapper is absent, keep it readable + centered. */
.content-area > .cfd-single-wrap .elf-loc,
.cfd-single-layout__main .elf-loc { max-width: none; }

/* ------------------------------------------------------------------
   Self-contained layout for the location single page.
   The theme's single.css (which styles .cfd-single-wrap and the sidebar
   grid) is NOT enqueued on this plugin-provided template, so we replicate
   the essential wrapper layout here, matching the theme tokens
   (--cfd-single-contained: 920px, --cfd-gutter: 24px). Scoped to the
   location main so it never affects the rest of the site.
   ------------------------------------------------------------------ */
/* Match a regular post exactly: full-bleed wrap with 40px side gutters and a
   small 20px top padding (measured from the theme's own single posts). */
.content-area.cfd-single-main:has(.elf-loc),
.cfd-single-main:has(.elf-loc) { padding-top: 0 !important; margin-top: 0 !important; }
.content-area.cfd-single-main:has(.elf-loc) .cfd-single-wrap,
.cfd-single-wrap:has(.elf-loc) {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 20px clamp(24px, 5vw, 40px) clamp(40px, 6vw, 64px);
  box-sizing: border-box;
}
.cfd-single-layout--sidebar:has(.elf-loc) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(300px, 28vw);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.cfd-single-layout__main:has(.elf-loc) { min-width: 0; margin-top: 0 !important; padding-top: 0 !important; }
/* zero the browser default top margin on the breadcrumb nav so content sits
   right under the wrap's 20px top padding (matches regular posts). */
.elf-loc__breadcrumb { margin-top: 0 !important; }
@media (max-width: 900px) {
  .cfd-single-layout--sidebar:has(.elf-loc) { grid-template-columns: 1fr; }
}
/* Fallback for browsers without :has() — target via the location article's
   own ancestor context using a plain descendant selector on our body class. */
body.cfd-has-sidebar .content-area.cfd-single-main { padding-top: 0 !important; margin-top: 0 !important; }
body.cfd-has-sidebar .content-area.cfd-single-main .cfd-single-wrap {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 20px clamp(24px, 5vw, 40px) clamp(40px, 6vw, 64px);
  box-sizing: border-box;
}
body.cfd-has-sidebar .cfd-single-layout--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(300px, 28vw);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
body.cfd-has-sidebar .cfd-single-layout__main { margin-top: 0 !important; padding-top: 0 !important; }
@media (max-width: 900px) {
  body.cfd-has-sidebar .cfd-single-layout--sidebar { grid-template-columns: 1fr; }
}
/* Note: the location page intentionally follows the site's LIGHT theme and
   does NOT switch on the OS prefers-color-scheme, so it stays readable on the
   cream site background regardless of the visitor's dark-mode setting. */

.elf-loc__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .25rem;
}
/* Typography mirrors the theme's single-post styles so location pages read
   like regular posts: h1 ~3.06rem, h2 ~1.85rem, h3 ~1.45rem, body 1rem/1.75,
   headings weight 500 (Playfair), body DM Sans. */
.elf-loc__title {
  margin: 0;
  /* Stay smaller than the masthead "Cleared for Departure" site name at every
     width. Masthead is ~26px on mobile and ~49px on desktop, so the H1 scales
     ~22px → ~40px and never exceeds it. */
  font-size: clamp(1.375rem, 4.2vw, 2.5rem);
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.2;
}
.elf-loc__flag { font-size: .9em; }
.elf-loc__country { font-weight: 400; color: var(--elf-fg); }
/* Country name links to the country index, but looks identical to the H1 text:
   inherits color/weight, no underline, and NO hover/focus color change. */
.elf-loc__country-link,
.elf-loc__country-link:link,
.elf-loc__country-link:visited,
.elf-loc__country-link:hover,
.elf-loc__country-link:focus,
.elf-loc__country-link:active {
  color: inherit;
  font: inherit;
  text-decoration: none;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
}
.elf-loc__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  height: 3.25rem;
  padding: 0 .7rem;
  border-radius: 999px;
  background: var(--elf-accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 4px 12px rgba(13,122,61,.28);
  flex-shrink: 0;
}
.elf-loc__summary {
  font-size: .95rem;       /* slightly smaller than body for the intro lede */
  line-height: 1.6;
  color: var(--elf-muted);
  margin: .6rem 0 1.4rem;
  max-width: 70ch;
}

/* Facts as a compact card strip */
.elf-loc__facts {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  background: var(--elf-panel);
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  overflow: hidden;
}
.elf-loc__fact {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.4rem;
  flex: 1 1 auto;
  min-width: 140px;
  border-right: 1px solid var(--elf-border);
}
.elf-loc__fact:last-child { border-right: 0; }
.elf-loc__fact-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--elf-muted);
  font-weight: 600;
}
.elf-loc__fact-value { font-size: 1.25rem; font-weight: 700; }

/* v1.29.0 — Visa/entry info card (Country archive pages only), sourced
   from X-Pat Pro. Reuses .elf-loc__section for the outer card look. */
.elf-visa-card__grid {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  background: var(--elf-bg, #fff);
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  overflow: hidden;
}
.elf-visa-card__item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.4rem;
  flex: 1 1 auto;
  min-width: 180px;
  border-right: 1px solid var(--elf-border);
}
.elf-visa-card__item:last-child { border-right: 0; }
.elf-visa-card__label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--elf-muted);
  font-weight: 600;
}
.elf-visa-card__value { font-size: 1.1rem; font-weight: 700; color: var(--elf-fg); }
.elf-visa-card__notes {
  font-size: .92rem;
  color: var(--elf-fg);
  margin: 0 0 .5rem;
  line-height: 1.5;
}
.elf-visa-card__sources {
  font-size: .82rem;
  color: var(--elf-muted);
  margin: 0 0 .75rem;
}
.elf-visa-card__sources a {
  color: var(--elf-accent);
  text-decoration: none;
  margin-left: .15rem;
}
.elf-visa-card__sources a:hover { text-decoration: underline; }
.elf-visa-card__disclaimer {
  font-size: .78rem;
  color: var(--elf-muted);
  font-style: italic;
  margin: 0;
  padding-top: .75rem;
  border-top: 1px solid var(--elf-border);
}
@media (max-width: 600px) {
  .elf-visa-card__grid { flex-direction: column; }
  .elf-visa-card__item { border-right: 0; border-bottom: 1px solid var(--elf-border); }
  .elf-visa-card__item:last-child { border-bottom: 0; }
}

.elf-loc__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.elf-loc__tag {
  background: color-mix(in srgb, var(--elf-accent) 12%, transparent);
  color: var(--elf-accent);
  border: 1px solid color-mix(in srgb, var(--elf-accent) 25%, transparent);
  border-radius: 999px;
  padding: .28rem .8rem;
  font-size: .8rem;
  font-weight: 600;
}

.elf-loc__body { margin: 1.5rem 0; font-size: 1.05rem; }

/* Carded sections */
.elf-loc__section {
  margin-top: 1.5rem;
  background: var(--elf-panel);
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  box-shadow: var(--elf-shadow);
  padding: 1.5rem 1.6rem;
}
.elf-loc__section > h2 {
  font-size: 1.85rem;      /* matches post h2 (~29.6px) */
  font-weight: 500;
  margin: 3.2rem 0 1.2rem; /* matches post h2 top/bottom margins */
  letter-spacing: normal;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.elf-loc__section > h2::before {
  content: "";
  width: 4px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--elf-accent);
}

/* Scores as bars (max-value context injected by template) */
.elf-loc__scores { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.elf-loc__score-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: .5rem 1rem;
}
.elf-loc__score-key { color: var(--elf-fg); font-weight: 500; }
.elf-loc__score-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.elf-loc__score-bar {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--elf-muted) 22%, transparent);
  overflow: hidden;
}
.elf-loc__score-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--elf-accent);
}

/* Per-signal evidence disclosure (only on rows with approved score_evidence).
   The row becomes a native <details>; its <summary> reuses the same grid as a
   plain score row so the bar and value stay put. */
.elf-loc__score-row--evi { display: block; }
.elf-loc__score-evi { display: block; }
.elf-loc__score-summary {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: .5rem 1rem;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
  padding: .25rem .35rem;
  margin: -.25rem -.35rem;
  min-height: 44px; /* comfortable tap target on mobile */
}
.elf-loc__score-summary::-webkit-details-marker { display: none; }
.elf-loc__score-summary:hover { background: color-mix(in srgb, var(--elf-muted) 12%, transparent); }
.elf-loc__score-summary:focus-visible {
  outline: 2px solid var(--elf-accent);
  outline-offset: 2px;
}
.elf-loc__score-info {
  display: inline-block;
  margin-left: .4rem;
  color: var(--elf-accent);
  font-size: .95em;
  line-height: 1;
  transition: transform .15s ease;
}
.elf-loc__score-evi[open] .elf-loc__score-info { transform: rotate(180deg); }
.elf-loc__score-panel {
  grid-column: 1 / -1;
  padding: .6rem .35rem .1rem;
  animation: elf-evi-in .18s ease;
}
@keyframes elf-evi-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.elf-loc__score-why {
  margin: 0 0 .5rem;
  color: var(--elf-fg);
  font-size: .92rem;
  line-height: 1.5;
}
.elf-loc__score-sources { font-size: .85rem; }
.elf-loc__score-sources-label {
  color: var(--elf-muted);
  font-weight: 600;
  margin-right: .35rem;
}
.elf-loc__score-sources-list {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
}
.elf-loc__score-sources-list a {
  color: var(--elf-accent);
  text-decoration: underline;
  word-break: break-word;
}
@media (prefers-reduced-motion: reduce) {
  .elf-loc__score-panel { animation: none; }
  .elf-loc__score-info { transition: none; }
}

/* Advantages & drawbacks (two columns on wide screens, stacked on mobile) */
.elf-loc__proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) { .elf-loc__proscons { grid-template-columns: 1fr; gap: 1rem; } }
.elf-loc__proscons-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: inherit;
}
.elf-loc__proscons-heading--pro { color: var(--elf-accent, #0d7a3d); }
.elf-loc__proscons-heading--con { color: #b4232a; }
.elf-loc__proscons-heading--pro::before { content: "\2713"; }  /* check */
.elf-loc__proscons-heading--con::before { content: "\2715"; }  /* cross */
.elf-loc__proscons-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.elf-loc__proscons-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--elf-fg);
}
.elf-loc__proscons-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--elf-muted);
}
.elf-loc__pros .elf-loc__proscons-list li::before { background: var(--elf-accent, #0d7a3d); }
.elf-loc__cons .elf-loc__proscons-list li::before { background: #b4232a; }

/* Monthly costs — label/value rows */
.elf-loc__costs {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  overflow: hidden;
}
.elf-loc__cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--elf-border);
}
.elf-loc__cost-row:last-child { border-bottom: 0; }
.elf-loc__cost-label { color: var(--elf-muted); font-size: 1rem; }
.elf-loc__cost-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--elf-fg); }
.elf-loc__costs-note { font-size: .85rem; color: var(--elf-muted); margin: .6rem 0 0; }

/* Sources list */
.elf-loc__sources-note { font-size: .9rem; color: var(--elf-muted); margin: 0 0 .8rem; }
.elf-loc__sources-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.elf-loc__sources-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .95rem;
  line-height: 1.5;
}
.elf-loc__sources-list li::before {
  content: "\2197";  /* up-right arrow */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--elf-muted);
  font-size: .8rem;
}
.elf-loc__sources-list a { color: var(--elf-accent, #0d7a3d); text-decoration: none; word-break: break-word; }
.elf-loc__sources-list a:hover { text-decoration: underline; }

.elf-loc__notes, .elf-loc__food {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .6rem;
}
.elf-loc__notes li, .elf-loc__food li {
  padding: .55rem .8rem;
  background: color-mix(in srgb, var(--elf-fg) 3%, transparent);
  border: 1px solid var(--elf-border);
  border-radius: 8px;
  font-size: .95rem;
}
/* Editorial note media (video/image/link/text) */
.elf-loc__note-title { margin: 0 0 .4rem; font-size: 1rem; }
.elf-loc__note-body { margin: 0; }
.elf-loc__note-caption { margin: .4rem 0 0; font-size: .85rem; color: color-mix(in srgb, var(--elf-fg) 70%, transparent); }
.elf-loc__note-link a { color: var(--elf-accent, #0d7a3d); text-decoration: none; word-break: break-word; }
.elf-loc__note-link a:hover { text-decoration: underline; }
.elf-loc__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .elf-loc__embed { height: 0; padding-bottom: 56.25%; }
}
.elf-loc__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.elf-loc__note-video { display: block; width: 100%; max-width: 100%; border-radius: 8px; background: #000; }
.elf-loc__note-image { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 8px; }

/* Structured food guide (overview + signature dishes + where to eat + markets) */
.elf-loc__food-overview { margin: 0 0 1.35rem; color: var(--elf-fg); font-size: 1rem; line-height: 1.75; }
.elf-loc__food-heading {
  /* matches post h3 (~23.2px, Playfair, weight 500, no uppercase) */
  font-size: 1.45rem;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: normal;
  text-transform: none;
  color: var(--elf-fg);
  margin: 2.5rem 0 .95rem;
  font-weight: 500;
  line-height: 1.2;
}
.elf-loc__food-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .55rem;
}
.elf-loc__food-item {
  display: block;
  padding: .6rem .8rem;
  background: color-mix(in srgb, var(--elf-fg) 3%, transparent);
  border: 1px solid var(--elf-border);
  border-radius: 8px;
  font-size: 1rem;        /* body size, matches post paragraphs */
  line-height: 1.6;
}
.elf-loc__food-name { font-weight: 700; color: var(--elf-fg); }
.elf-loc__food-type {
  font-size: .78rem;
  color: var(--elf-accent, #0d7a3d);
  font-weight: 600;
  text-transform: lowercase;
}
.elf-loc__food-desc { display: block; color: var(--elf-muted); margin-top: .2rem; font-size: 1rem; line-height: 1.6; }
.elf-loc__food-item > .elf-loc__food-desc:only-child { color: var(--elf-fg); margin-top: 0; }

/* ---- Food-guide combined map (Leaflet + OSM) ---- */
.elf-loc__map {
  width: 100%;
  height: 360px;
  margin: 0 0 .75rem;
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  overflow: hidden;
  background: var(--elf-panel, #f8f9fa);
  z-index: 0; /* keep Leaflet panes below the theme's sticky chrome */
}
.elf-loc__map.leaflet-container,
.elf-loc__nhood-map.leaflet-container { font: inherit; position: relative; }
/* Location maps also need protection from theme image sizing rules. */
.elf-loc__map .leaflet-tile,
.elf-loc__nhood-map .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.elf-loc__map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin: 0 0 1.4rem;
  font-size: .82rem;
  color: var(--elf-muted);
}
.elf-loc__legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.elf-loc__legend-dot {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--elf-border);
  flex-shrink: 0;
}
/* Clickable food-guide list items (those with a matching map pin). */
.elf-loc__food-item--mappable { cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.elf-loc__food-item--mappable:hover,
.elf-loc__food-item--mappable:focus-visible {
  border-color: var(--elf-accent);
  background: color-mix(in srgb, var(--elf-accent) 8%, transparent);
  outline: none;
}
.elf-loc__food-item--mappable:focus-visible { box-shadow: 0 0 0 2px var(--elf-accent); }
/* Map popup content. */
.elf-loc__popup { line-height: 1.4; }
.elf-loc__popup-name { display: block; font-weight: 700; color: #1a1f26; }
.elf-loc__popup-type {
  display: block;
  font-size: .78rem;
  color: var(--elf-accent, #0d7a3d);
  font-weight: 600;
  text-transform: lowercase;
  margin-top: .1rem;
}
.elf-loc__popup-note { display: block; color: #5a6471; margin-top: .25rem; font-size: .85rem; }
.elf-loc__popup-addr,
.elf-loc__popup-web {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  margin-top: .4rem;
  font-size: .82rem;
  line-height: 1.35;
  text-decoration: none;
  color: var(--elf-accent, #0d7a3d);
  word-break: break-word;
}
.elf-loc__popup-addr { color: #3a4551; }
.elf-loc__popup-addr:hover,
.elf-loc__popup-web:hover { text-decoration: underline; }
.elf-loc__popup-addr-icon,
.elf-loc__popup-web-icon { flex: 0 0 auto; font-size: .85rem; line-height: 1.35; }

/* ---- Expat neighborhoods (polygon map + clickable list) ---- */
.elf-loc__nhood-intro { color: var(--elf-muted); font-size: .9rem; margin: 0 0 .75rem; }
.elf-loc__nhood-map {
  width: 100%;
  height: 380px;
  margin: 0 0 1rem;
  border: 1px solid var(--elf-border);
  border-radius: var(--elf-radius);
  overflow: hidden;
  background: var(--elf-panel, #f8f9fa);
  z-index: 0;
}
.elf-loc__nhood-map .leaflet-container { font: inherit; }
.elf-loc__nhood-tip {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--elf-border);
  border-radius: 4px;
  box-shadow: none;
  color: #1a1f26;
  font-size: .78rem;
  font-weight: 600;
  padding: .1rem .35rem;
}
.elf-loc__nhood-tip::before { display: none; }
.elf-loc__nhood-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.elf-loc__nhood-item {
  display: block;
  padding: .6rem .8rem;
  background: color-mix(in srgb, var(--elf-fg) 3%, transparent);
  border: 1px solid var(--elf-border);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.6;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.elf-loc__nhood-item:hover,
.elf-loc__nhood-item:focus-visible {
  border-color: var(--elf-accent);
  background: color-mix(in srgb, var(--elf-accent) 8%, transparent);
  outline: none;
}
.elf-loc__nhood-item:focus-visible { box-shadow: 0 0 0 2px var(--elf-accent); }
.elf-loc__nhood-name { font-weight: 700; color: var(--elf-fg); }
.elf-loc__nhood-summary { display: block; color: var(--elf-muted); margin-top: .2rem; }
.elf-loc__nhood-sources { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .35rem; font-size: .78rem; }
.elf-loc__nhood-sources a { color: var(--elf-accent, #0d7a3d); text-decoration: none; word-break: break-word; }
.elf-loc__nhood-sources a:hover { text-decoration: underline; }
.elf-loc__popup-srcs { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .4rem; font-size: .8rem; }
.elf-loc__popup-srcs a { color: var(--elf-accent, #0d7a3d); text-decoration: none; }
.elf-loc__popup-srcs a:hover { text-decoration: underline; }

.elf-loc__related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.elf-loc__related-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--elf-border);
}
.elf-loc__related-list li:last-child { border-bottom: 0; }
.elf-loc__related-list a {
  color: var(--elf-fg);
  text-decoration: none;
  font-weight: 600;
}
.elf-loc__related-list a:hover { color: var(--elf-accent); text-decoration: underline; }
.elf-loc__related-date { color: var(--elf-muted); font-size: .82rem; white-space: nowrap; flex-shrink: 0; }

/* v1.25.0 — "Upcoming events" section (single-elf_location.php): its own
   section, no excerpts, bold date leading each row, month/year filter.
   v1.28.9: month dropdown + search box share a row via .elf-loc__events-controls. */
.elf-loc__events-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin: 0 0 1.1rem;
}
.elf-loc__events-filter,
.elf-loc__events-search {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.elf-loc__events-search-input {
  font-size: .92rem;
  padding: .4rem .7rem;
  border: 1px solid var(--elf-border);
  border-radius: 6px;
  background: var(--elf-bg, #fff);
  color: var(--elf-fg);
  min-width: 220px;
}
.elf-loc__events-search label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--elf-muted);
}
.elf-loc__events-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--elf-border);
}
.elf-loc__events-prev, .elf-loc__events-next {
  font-size: .88rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border: 1px solid var(--elf-border);
  border-radius: 6px;
  background: var(--elf-bg, #fff);
  color: var(--elf-accent, #0d7a3d);
  cursor: pointer;
}
.elf-loc__events-prev:hover:not(:disabled), .elf-loc__events-next:hover:not(:disabled) {
  background: var(--elf-accent, #0d7a3d);
  color: #fff;
}
.elf-loc__events-prev:disabled, .elf-loc__events-next:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.elf-loc__events-range-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--elf-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.elf-loc__events-filter label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--elf-muted);
}
.elf-loc__events-select {
  font-size: .92rem;
  padding: .4rem .7rem;
  border: 1px solid var(--elf-border);
  border-radius: 6px;
  background: var(--elf-bg, #fff);
  color: var(--elf-fg);
}
.elf-loc__events-timeline { display: grid; gap: 1.4rem; }
.elf-loc__events-month-label {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  color: var(--elf-accent, #0d7a3d);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* v1.28.13 redesign: Location + Category columns added, row markup and
   styling rebuilt as a proper 4-column grid "table" (Date / Event /
   Location / Category) with a real header row, instead of a bare
   date+title flex list. */
.elf-loc__events-head {
  display: grid;
  grid-template-columns: 8.5em 1fr 11em 12.5em;
  gap: 1rem;
  padding: 0 0 .55rem;
  margin-bottom: .15rem;
  border-bottom: 2px solid var(--elf-border);
}
.elf-loc__events-head span {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--elf-muted);
}
.elf-loc__events-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.elf-loc__events-row {
  display: grid;
  grid-template-columns: 8.5em 1fr 11em 12.5em;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--elf-border);
  border-radius: 4px;
  transition: background-color .15s ease;
}
.elf-loc__events-row:hover { background: rgba(1, 105, 111, .05); }
.elf-loc__events-row:last-child { border-bottom: 0; }
/* v1.28.9 fixup: an earlier rule set display:flex on every row, which has
   higher specificity than the browser's default [hidden]{display:none} UA
   style -- confirmed live: the search filter's JS was correctly setting the
   hidden attribute, but filtered-out items kept rendering anyway. This
   forces hidden items to actually disappear. Still needed with display:grid. */
.elf-loc__events-row[hidden] { display: none; }
.elf-loc__events-title { color: var(--elf-fg); text-decoration: none; font-weight: 600; font-size: .95rem; }
.elf-loc__events-title:hover { color: var(--elf-accent); text-decoration: underline; }
.elf-loc__events-date {
  color: var(--elf-fg);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
}
.elf-loc__events-location {
  font-size: .85rem;
  color: var(--elf-muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.elf-loc__events-location[href] { color: var(--elf-accent); font-weight: 600; }
.elf-loc__events-location[href]:hover { text-decoration: underline; }
.elf-loc__events-location--empty { color: var(--elf-border); }
.elf-loc__events-category {
  display: inline-block;
  justify-self: start;
  align-self: center;
  max-width: 100%;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.25;
  padding: .3rem .65rem;
  border-radius: 12px;
  background: rgba(1, 105, 111, .1);
  color: var(--elf-accent, #0d7a3d);
  white-space: normal; /* some category names (e.g. "Theme Park Seasonal
    Event (Halloween/Winter)") are too long for one line at any reasonable
    column width -- wrap onto 2 lines inside the pill rather than truncate
    mid-word with an ellipsis, which looked broken. */
}
.elf-loc__events-category--empty { background: transparent; color: var(--elf-border); padding: .28rem 0; }
.elf-loc__events-empty { color: var(--elf-muted); font-size: .95rem; margin: 0; }

@media (max-width: 640px) {
  .elf-loc__events-head { display: none; }
  .elf-loc__events-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    row-gap: .3rem;
    column-gap: .75rem;
    padding: .8rem 0;
  }
  .elf-loc__events-date { grid-column: 1 / 3; grid-row: 1; }
  .elf-loc__events-title { grid-column: 1 / 3; grid-row: 2; font-size: 1rem; }
  .elf-loc__events-location { grid-column: 1 / 2; grid-row: 3; }
  .elf-loc__events-category { grid-column: 2 / 3; grid-row: 3; justify-self: end; }
}

/* v1.15.0 — "Recent stories" (companies/city auto-detection linking),
   single-elf_location.php, between "Latest news & media" and "Sources". */
.elf-loc__stories-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.elf-loc__stories-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--elf-border);
}
.elf-loc__stories-item:last-child { border-bottom: 0; }
.elf-loc__stories-item a {
  color: var(--elf-fg);
  text-decoration: none;
  font-weight: 600;
}
.elf-loc__stories-item a:hover { color: var(--elf-accent); text-decoration: underline; }
.elf-loc__stories-date { color: var(--elf-muted); font-size: .82rem; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 600px) {
  .elf-loc__fact { border-right: 0; border-bottom: 1px solid var(--elf-border); }
  .elf-loc__fact:last-child { border-bottom: 0; }
  /* Score-changes footnote is flat (padding:0) so on mobile its summary + expanded
     panel sit flush to the card's outer edge (~16px gutter) instead of aligning
     with the inset content of sibling cards. Restore matching left/right padding
     so the footnote line, dropdown, summary and bar list line up with other cards. */
  .elf-changes--footnote { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* ============================================================
   v1.2.1 — Breadcrumb + Country archive (taxonomy-elf_country.php)
   ============================================================ */
.elf-loc__breadcrumb,
.elf-country__breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 1.2rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.elf-loc__breadcrumb a,
.elf-country__breadcrumb a { color: #3730a3; text-decoration: none; }
.elf-loc__breadcrumb a:hover,
.elf-country__breadcrumb a:hover { text-decoration: underline; }
.elf-loc__crumb-sep,
.elf-country__crumb-sep { color: #9ca3af; }
.elf-loc__crumb-current,
.elf-country__crumb-current { color: #6b7280; }

.elf-country {
  max-width: 960px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  line-height: 1.6;
}
.elf-country__header { margin: 0.4rem 0 1.6rem; }
.elf-country__title { margin: 0; font-size: 2.2rem; display: flex; align-items: center; gap: 0.6rem; }
.elf-country__flag { font-size: 1.8rem; }
.elf-country__desc { color: #374151; font-size: 1.05rem; }
.elf-country__section { margin-top: 2rem; }
.elf-country__section h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.elf-country__cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.elf-country__card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}
.elf-country__card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
  font-size: 1.1rem;
}
.elf-country__card-link:hover .elf-country__card-name { text-decoration: underline; }
.elf-country__card-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: #0d7a3d;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}
.elf-country__card-summary { margin: 0.6rem 0 0; color: #4b5563; font-size: 0.92rem; }
.elf-country__empty { color: #6b7280; font-style: italic; }
.elf-country__latest-list { list-style: none; padding: 0; margin: 0; }
.elf-country__latest-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.elf-country__latest-date { color: #9ca3af; font-size: 0.85rem; white-space: nowrap; }

/* ===================================================================
   Phase 4 — "Score changes" (year-over-year contrast) section
   =================================================================== */
.elf-changes__empty {
  color: var(--elf-muted);
  font-style: italic;
  margin: .25rem 0 0;
}

/* Collapsed footnote link that sits directly under the Livability scores. */
.elf-changes--footnote {
  margin-top: .5rem;
  padding: 0;
  border: 0;
  background: none;
}
.elf-changes__footnote {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem;
  color: var(--elf-muted);
  font-size: .88rem;
  line-height: 1.4;
  padding: .35rem .1rem;
  min-height: 32px;
}
.elf-changes__footnote::-webkit-details-marker { display: none; }
.elf-changes__footnote:hover { color: var(--elf-fg); }
.elf-changes__footnote:focus-visible { outline: 2px solid var(--elf-accent); outline-offset: 2px; border-radius: 6px; }
.elf-changes__footnote-icon {
  display: inline-block;
  transition: transform .15s ease;
  font-size: .8em;
}
.elf-changes--footnote[open] .elf-changes__footnote-icon { transform: rotate(90deg); }
.elf-changes__footnote-since { font-weight: 600; }
.elf-changes__footnote-sep { opacity: .6; }
.elf-changes__panel { margin: .6rem 0 0; }
.elf-changes__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .6rem;
  margin: 0 0 .9rem;
}
.elf-changes__select-label {
  color: var(--elf-muted);
  font-size: .85rem;
  font-weight: 600;
}
.elf-changes__select {
  font: inherit;
  font-size: .9rem;
  padding: .35rem .5rem;
  border: 1px solid color-mix(in srgb, var(--elf-muted) 40%, transparent);
  border-radius: 8px;
  background: var(--elf-bg, #fff);
  color: var(--elf-fg);
  max-width: 100%;
}
.elf-changes__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .75rem;
  margin: 0 0 1rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--elf-muted) 10%, transparent);
  font-size: 1rem;
}
.elf-changes__summary-overall { font-weight: 500; }
.elf-changes__summary-overall strong { font-variant-numeric: tabular-nums; }
.elf-changes__summary-counts { color: var(--elf-muted); font-size: .92rem; }
.elf-changes__summary--up   { box-shadow: inset 3px 0 0 #1a7f37; }
.elf-changes__summary--down { box-shadow: inset 3px 0 0 #c0392b; }
.elf-changes__summary--same { box-shadow: inset 3px 0 0 var(--elf-muted); }

.elf-changes__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.elf-changes__list.is-busy { opacity: .5; pointer-events: none; }
.elf-changes__row { display: block; padding: .1rem 0; }
.elf-changes__evi { display: block; }

/* Shared row grid: label | old→new+delta ; bar spans the full width below. */
.elf-changes__row > .elf-changes__key,
.elf-changes__summary-row > .elf-changes__key {
  color: var(--elf-fg);
  font-weight: 500;
}
.elf-changes__row,
.elf-changes__summary-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: .35rem 1rem;
}
.elf-changes__summary-row {
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
  padding: .25rem .35rem;
  margin: -.25rem -.35rem;
  min-height: 44px;
}
.elf-changes__summary-row::-webkit-details-marker { display: none; }
.elf-changes__summary-row:hover { background: color-mix(in srgb, var(--elf-muted) 12%, transparent); }
.elf-changes__summary-row:focus-visible { outline: 2px solid var(--elf-accent); outline-offset: 2px; }

.elf-changes__vals {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.elf-changes__old { color: var(--elf-muted); }
.elf-changes__new { font-weight: 700; }
.elf-changes__arrow { font-size: .85em; line-height: 1; }
.elf-changes__row--up   .elf-changes__arrow,
.elf-changes__summary--up   .elf-changes__arrow { color: #1a7f37; }
.elf-changes__row--down .elf-changes__arrow,
.elf-changes__summary--down .elf-changes__arrow { color: #c0392b; }
.elf-changes__row--same .elf-changes__arrow { color: var(--elf-muted); }
.elf-changes__delta { font-size: .82rem; font-weight: 600; }
.elf-changes__delta--up   { color: #1a7f37; }
.elf-changes__delta--down { color: #c0392b; }
.elf-changes__delta--same { color: var(--elf-muted); }

/* Diverging delta bar: centre axis, fill grows right (up) or left (down). */
.elf-changes__bar {
  grid-column: 1 / -1;
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--elf-muted) 18%, transparent);
  overflow: hidden;
}
.elf-changes__bar-axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--elf-muted) 55%, transparent);
  transform: translateX(-.5px);
}
.elf-changes__bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 2px;
}
.elf-changes__bar-fill--up   { background: #1a7f37; }
.elf-changes__bar-fill--down { background: #c0392b; }

.elf-changes__msg { margin: .6rem 0 0; font-size: .88rem; min-height: 1em; }
.elf-changes__msg--err { color: #c0392b; }

/* ===================================================================
   v1.15.0 — elf_company archive template (/company/<slug>)
   Mirrors the elf-country__* card/list visual language above, with
   added filter controls (post type/date) + search box.
   =================================================================== */
.elf-company {
  max-width: 960px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  line-height: 1.6;
}
.elf-company__breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 1.2rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.elf-company__breadcrumb a { color: #3730a3; text-decoration: none; }
.elf-company__breadcrumb a:hover { text-decoration: underline; }
.elf-company__crumb-sep { color: #9ca3af; }
.elf-company__crumb-current { color: #6b7280; }

.elf-company__header { margin: 0.4rem 0 1.6rem; }
.elf-company__title { margin: 0; font-size: 2.2rem; }
.elf-company__desc { color: #374151; font-size: 1.05rem; margin-top: 0.4rem; }
.elf-company__meta { color: #6b7280; font-size: 0.9rem; margin-top: 0.4rem; }

.elf-company__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.8rem;
  padding: 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}
.elf-company__filter-field { display: flex; flex-direction: column; min-width: 160px; flex: 1 1 160px; }
.elf-company__search,
.elf-company__select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.92rem;
  background: #fff;
  color: #111827;
}
.elf-company__filter-submit {
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  background: #0d7a3d;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.elf-company__filter-submit:hover { background: #0a5f30; }
.elf-company__filter-reset { font-size: 0.85rem; color: #3730a3; text-decoration: none; }
.elf-company__filter-reset:hover { text-decoration: underline; }

.elf-company__section { margin-top: 2rem; }
.elf-company__section h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.elf-company__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.elf-company__item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}
.elf-company__item-link { text-decoration: none; color: #111827; }
.elf-company__item-title { font-weight: 700; font-size: 1.1rem; }
.elf-company__item-link:hover .elf-company__item-title { text-decoration: underline; }
.elf-company__item-excerpt { margin: 0.5rem 0 0; color: #4b5563; font-size: 0.92rem; }
.elf-company__item-meta {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: #9ca3af;
}
.elf-company__item-type {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}
.elf-company__empty { color: #6b7280; font-style: italic; }

/* Inline (render-time) company mention links inserted by autolink_company_mentions(). */
.elf-company-link { color: #0d7a3d; text-decoration: underline; text-decoration-style: dotted; }
.elf-company-link:hover { text-decoration-style: solid; }

/* ===================================================================
   v1.15.0 — "Detected Companies & Cities" admin meta box
   (Journal / Opportunity native edit screens, story-detection-admin.js)
   =================================================================== */
.elf-story-detect__label { font-weight: 600; margin: 0.8rem 0 0.3rem; font-size: 0.85rem; }
.elf-story-detect__chips {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.elf-story-detect__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 0.2rem 0.3rem 0.2rem 0.65rem;
  font-size: 0.82rem;
}
.elf-story-detect__remove {
  border: 0;
  background: transparent;
  color: #3730a3;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.25rem;
}
.elf-story-detect__remove:hover { color: #c0392b; }
.elf-story-detect__none { color: #6b7280; font-style: italic; font-size: 0.85rem; }
.elf-story-detect__redetect { margin-top: 0.6rem; }
.elf-story-detect__msg { min-height: 1.2em; }

/* v1.17.0: [elf_related_posts] shortcode — reusable Country/Location story
   loop, droppable anywhere in content with a customizable header + spacing. */
.elf-related-posts { margin: 2rem 0; }
.elf-related-posts__header { margin: 0 0 .75rem; font-size: 1.15rem; }
.elf-related-posts__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.elf-related-posts__item {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
  padding: .55rem 0; border-bottom: 1px solid var(--elf-border, #e5e7eb);
}
.elf-related-posts__item:last-child { border-bottom: 0; }
.elf-related-posts__item a { color: var(--elf-accent, #0a6a70); text-decoration: none; font-weight: 500; }
.elf-related-posts__item a:hover { text-decoration: underline; }
.elf-related-posts__date { color: var(--elf-muted, #6b7280); font-size: .82rem; white-space: nowrap; flex-shrink: 0; }
.elf-related-posts__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.elf-related-posts__type {
  color: var(--elf-accent, #0a6a70); font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .02em; background: rgba(10, 106, 112, .08); border-radius: 3px; padding: .1rem .4rem;
}
.elf-related-posts--compact { margin: 1rem 0; }
.elf-related-posts--compact .elf-related-posts__header { font-size: 1rem; margin-bottom: .4rem; }
.elf-related-posts--compact .elf-related-posts__item { padding: .35rem 0; }
.elf-related-posts--relaxed { margin: 3rem 0; }
.elf-related-posts--relaxed .elf-related-posts__header { font-size: 1.35rem; margin-bottom: 1.1rem; }
.elf-related-posts--relaxed .elf-related-posts__item { padding: .85rem 0; }

/* v1.20.0 — Event Group single page: description + member-events POI map. */
/* v1.27.0: width/centering now comes from the theme's own cfd-single-wrap
   (single-elf_event_group.php) or the surrounding post content (the
   [elf_event_group] embed shortcode) -- .elf-eg itself no longer imposes
   its own max-width, which previously double-narrowed the single-group
   page inside the theme's own content column. */
.elf-eg__header { margin-bottom: 1.25rem; }
.elf-eg__title { margin: 0 0 .5rem; }
.elf-eg--embed {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--elf-border, #e5e7eb);
  border-radius: 8px;
  background: var(--elf-panel, #fbfbf9);
}
.elf-eg__title--embed { font-size: 1.3rem; }
.elf-eg__title--embed a { color: inherit; text-decoration: none; }
.elf-eg__title--embed a:hover { text-decoration: underline; }
.elf-eg__map--embed { height: 320px; }
.elf-eg__draft-note {
  margin: 0 0 1rem;
  padding: .6rem .8rem;
  border-left: 3px solid var(--elf-warning, #964219);
  background: rgba(150, 66, 25, .06);
  font-size: .9rem;
}
.elf-eg__desc { color: var(--elf-muted, #5a6471); line-height: 1.6; }
/* v1.28.5: same credit/caption treatment as Events -- covers any captioned
   image an editor adds inside a group's own description content. */
.elf-eg__desc figcaption {
  padding: 6px 2px 0;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--elf-muted, #6b7280);
}
.elf-eg__map {
  width: 100%;
  height: 420px;
  margin: 1.5rem 0;
  border: 1px solid var(--elf-border, #e5e7eb);
  border-radius: var(--elf-radius, 6px);
  overflow: hidden;
  background: var(--elf-panel, #f8f9fa);
  z-index: 0;
}
.elf-eg__map .leaflet-container { font: inherit; }
.elf-eg__popup { line-height: 1.4; max-width: 220px; }
.elf-eg__popup-photo { display: block; width: 100%; height: 110px; object-fit: cover; border-radius: 4px; margin-bottom: .4rem; }
.elf-eg__popup-name { display: block; font-weight: 700; color: #1a1f26; }
.elf-eg__popup-category {
  display: inline-block; margin-top: .2rem; font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .02em; color: var(--elf-accent, #b8860b); background: rgba(184,134,11,.1); border-radius: 3px; padding: .1rem .4rem;
}
.elf-eg__popup-dates { display: block; color: #5a6471; font-size: .82rem; margin-top: .25rem; }
.elf-eg__popup-summary { margin: .35rem 0 0; font-size: .85rem; color: #3a4551; }
.elf-eg__popup-link, .elf-eg__popup-official {
  display: flex; align-items: center; gap: .3rem; margin-top: .4rem; font-size: .82rem;
  color: var(--elf-accent, #0d7a3d); text-decoration: none;
}
.elf-eg__popup-link:hover, .elf-eg__popup-official:hover { text-decoration: underline; }
.elf-eg__list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .5rem; }
.elf-eg__list-item { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--elf-border, #e5e7eb); }
.elf-eg__list-item a { color: var(--elf-accent, #0d7a3d); text-decoration: none; font-weight: 500; }
.elf-eg__list-item a:hover { text-decoration: underline; }
.elf-eg__list-date { color: var(--elf-muted, #6b7280); font-size: .82rem; white-space: nowrap; }
.elf-eg__empty { color: var(--elf-muted, #6b7280); font-style: italic; }

/* v1.17.1 — thumbnail + grid layout support for [elf_related_posts] */
.elf-related-posts__item--has-thumb { align-items: flex-start; gap: 1rem; }
.elf-related-posts__thumb { flex-shrink: 0; display: block; border-radius: 6px; overflow: hidden; line-height: 0; }
.elf-related-posts__thumb img { display: block; width: 88px; height: 88px; object-fit: cover; }
.elf-related-posts__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.elf-related-posts__link { color: var(--elf-accent, #0a6a70); text-decoration: none; font-weight: 500; }
.elf-related-posts__link:hover { text-decoration: underline; }
.elf-related-posts__excerpt { margin: 0; color: var(--elf-muted, #6b7280); font-size: .88rem; line-height: 1.4; }

.elf-related-posts--layout-grid .elf-related-posts__list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.elf-related-posts--layout-grid.elf-related-posts--cols-2 .elf-related-posts__list { grid-template-columns: repeat(2, 1fr); }
.elf-related-posts--layout-grid.elf-related-posts--cols-4 .elf-related-posts__list { grid-template-columns: repeat(4, 1fr); }
.elf-related-posts--layout-grid .elf-related-posts__item {
  flex-direction: column; align-items: stretch; justify-content: flex-start;
  border: 1px solid var(--elf-border, #e5e7eb); border-radius: 8px; padding: 0; overflow: hidden;
  gap: 0;
}
.elf-related-posts--layout-grid .elf-related-posts__thumb { border-radius: 0; }
.elf-related-posts--layout-grid .elf-related-posts__thumb img { width: 100%; height: 150px; }
.elf-related-posts--layout-grid .elf-related-posts__body { padding: .85rem 1rem 1rem; gap: .35rem; }
.elf-related-posts--layout-grid .elf-related-posts__date { white-space: normal; }
@media (max-width: 720px) {
  .elf-related-posts--layout-grid .elf-related-posts__list,
  .elf-related-posts--layout-grid.elf-related-posts--cols-2 .elf-related-posts__list,
  .elf-related-posts--layout-grid.elf-related-posts--cols-4 .elf-related-posts__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .elf-related-posts--layout-grid .elf-related-posts__list,
  .elf-related-posts--layout-grid.elf-related-posts--cols-2 .elf-related-posts__list,
  .elf-related-posts--layout-grid.elf-related-posts--cols-4 .elf-related-posts__list { grid-template-columns: 1fr; }
}

/* ─── v1.22.0: single Event page ───────────────────────────────────────────
   Scoped under .elf-ev so nothing here can leak into the theme's own
   article styles. Inherits the theme's fonts/colour tokens where they
   exist and falls back to sensible values elsewhere. */

.elf-ev {
  --elf-ev-rule: var(--cfd-border, #d8d2c5);
  --elf-ev-accent: var(--cfd-accent, var(--cfd-rust, #a4402c));
  --elf-ev-muted: var(--cfd-muted, #6b6355);
}

.elf-ev__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}
.elf-ev__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--elf-ev-accent);
}
.elf-ev__kicker--muted { color: var(--elf-ev-muted); font-weight: 600; }

.elf-ev__title { margin: 0 0 12px; }

.elf-ev__standfirst {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 4px;
  color: var(--elf-ev-muted);
  font-size: 0.95rem;
}
.elf-ev__standfirst-item { display: inline-block; }

.elf-ev__hero { margin: 24px 0 8px; }
.elf-ev__hero img { width: 100%; height: auto; display: block; border-radius: 4px; }
/* v1.28.5: featured-image credit/caption, pulled from the Media Library
   "Caption" field. Plugin-owned (not the theme's .cfd-article__caption)
   since single.css never loads on elf_event pages. */
.elf-ev__hero-caption {
  margin: 0;
  padding: 8px 2px 0;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--elf-muted, #6b7280);
}

/* Key-facts card */
.elf-ev__facts {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid var(--elf-ev-rule);
  border-left: 3px solid var(--elf-ev-accent);
  border-radius: 4px;
  background: var(--cfd-surface, #fbf9f4);
}
.elf-ev__factlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 28px;
  margin: 0;
}
.elf-ev__fact { margin: 0; }
.elf-ev__fact dt {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--elf-ev-muted);
  margin: 0 0 4px;
}
.elf-ev__fact dd { margin: 0; font-size: 1rem; line-height: 1.45; }
.elf-ev__fact-sub { color: var(--elf-ev-muted); font-size: 0.9rem; }

.elf-ev__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--elf-ev-rule);
}
.elf-ev__btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--elf-ev-accent);
  border-radius: 3px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  color: var(--elf-ev-accent);
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
.elf-ev__btn:hover,
.elf-ev__btn:focus-visible { background: var(--elf-ev-accent); color: #fff; }
.elf-ev__btn--primary { background: var(--elf-ev-accent); color: #fff; }
.elf-ev__btn--primary:hover,
.elf-ev__btn--primary:focus-visible { background: transparent; color: var(--elf-ev-accent); }

.elf-ev__section { margin: 36px 0; }
.elf-ev__h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--elf-ev-rule);
  font-size: 1.15rem;
}
.elf-ev__h2--small { font-size: 1rem; }

.elf-ev__map {
  height: 380px;
  width: 100%;
  border: 1px solid var(--elf-ev-rule);
  border-radius: 4px;
  overflow: hidden;
}
.elf-ev__popup strong { display: block; margin-bottom: 3px; }
.elf-ev__popup-place { color: #555; font-size: 0.85rem; margin-bottom: 6px; }
.elf-ev__popup-dir { font-size: 0.85rem; font-weight: 600; }

.elf-ev__video {
  position: relative;
  padding-top: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.elf-ev__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.elf-ev__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.elf-ev__gallery-item { display: block; margin: 0; border-radius: 4px; overflow: hidden; }
.elf-ev__gallery-item a { display: block; overflow: hidden; border-radius: 4px; }
.elf-ev__gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.elf-ev__gallery-item a:hover img { transform: scale(1.04); }
/* v1.28.5: per-image credit/caption, pulled from each gallery image's own
   Media Library "Caption" field. Gallery items became <figure> elements
   (were plain <a> tags) to carry this; the link + image styling above is
   unchanged, just re-scoped from .elf-ev__gallery-item to its child <a>. */
.elf-ev__gallery-caption {
  margin: 0;
  padding: 6px 2px 0;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--elf-muted, #6b7280);
}

.elf-ev__note {
  margin: 36px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--elf-ev-rule);
  background: var(--cfd-surface, #fbf9f4);
  font-size: 0.95rem;
}
.elf-ev__note p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .elf-ev__facts { padding: 16px; }
  .elf-ev__map { height: 280px; }
  .elf-ev__actions .elf-ev__btn { flex: 1 1 auto; text-align: center; }
}

/* ─── v1.26.0: Event Groups archive (archive-elf_event_group.php) ────────── */
.elf-ega { --elf-ega-rule: var(--cfd-border, #d8d2c5); --elf-ega-accent: var(--cfd-accent, #a4402c); --elf-ega-muted: var(--cfd-muted, #6b6355); }
.elf-ega__title { margin: 0 0 8px; }
.elf-ega__standfirst { color: var(--elf-ega-muted); margin: 0 0 24px; font-size: 1.02rem; }

.elf-ega__controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.elf-ega__search {
  flex: 1 1 260px;
  padding: .6rem .8rem;
  border: 1px solid var(--elf-ega-rule);
  border-radius: 6px;
  font-size: .95rem;
}
.elf-ega__country {
  padding: .6rem .8rem;
  border: 1px solid var(--elf-ega-rule);
  border-radius: 6px;
  font-size: .95rem;
  background: #fff;
}

.elf-ega__map {
  height: 380px;
  width: 100%;
  margin-bottom: 26px;
  border: 1px solid var(--elf-ega-rule);
  border-radius: 4px;
  overflow: hidden;
}
.elf-ega__popup strong { display: block; margin-bottom: 3px; }
.elf-ega__popup-country { color: #555; font-size: .85rem; margin-bottom: 6px; }

.elf-ega__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.elf-ega__card {
  display: block;
  border: 1px solid var(--elf-ega-rule);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.elf-ega__card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.elf-ega__card-photo { height: 150px; background-size: cover; background-position: center; background-color: #eee; }
.elf-ega__card-photo--placeholder { background: linear-gradient(135deg, #f0ece2, #e3ddce); }
.elf-ega__card-body { padding: 14px 16px; }
.elf-ega__card-title { font-size: 1.05rem; margin: 0 0 4px; }
.elf-ega__card-meta { color: var(--elf-ega-muted); font-size: .82rem; margin-bottom: 8px; }
.elf-ega__card-excerpt { font-size: .88rem; color: var(--elf-ega-muted); margin: 0; line-height: 1.4; }

.elf-ega__empty { color: var(--elf-ega-muted); font-size: .95rem; padding: 24px 0; text-align: center; }

@media (max-width: 640px) {
  .elf-ega__map { height: 280px; }
  .elf-ega__controls { flex-direction: column; }
}
