:root {
  --fdm-black: #1d1d1d;
  --fdm-ink: #282828;
  --fdm-muted: #6c7274;
  --fdm-line: #d8dedf;
  --fdm-cyan: #54c3cb;
  --fdm-cyan-soft: #d8f3f5;
  --fdm-lime: #a8d531;
  --fdm-white: #ffffff;
  --fdm-offwhite: #fafaf7;
}

.fulg-diaspora-map,
.fulg-diaspora-map * {
  box-sizing: border-box;
}

.fulg-diaspora-map {
  width: 100%;
  background: var(--fdm-white);
  color: var(--fdm-ink);
  font-family: Arial, Helvetica, sans-serif;
  padding: clamp(34px, 4vw, 56px);
}

.fdm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.fdm-kicker {
  margin: 0 0 12px;
  color: var(--fdm-cyan);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fdm-hero h1,
.fdm-map-head h2,
.fdm-bottom h2,
.fdm-hero p {
  margin: 0;
}

.fdm-hero h1 {
  color: var(--fdm-black);
  font-size: clamp(50px, 8vw, 112px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fdm-hero p {
  max-width: 560px;
  font-size: 21px;
  line-height: 1.45;
}

.fdm-summary {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(260px, .85fr);
  margin: 0 0 18px;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-black);
}

.fdm-main-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  min-height: 72px;
  padding: 12px 20px;
  background: var(--fdm-lime);
  color: var(--fdm-black);
}

.fdm-main-metric strong {
  display: block;
  font-size: clamp(36px, 4.2vw, 54px);
  font-weight: 900;
  line-height: .78;
}

.fdm-main-metric span,
.fdm-mini-metrics span {
  display: block;
  font-size: clamp(11px, .9vw, 14px);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.fdm-main-metric span {
  max-width: 28ch;
  margin-bottom: 2px;
}

.fdm-mini-metrics span {
  margin-top: 5px;
  white-space: nowrap;
}

.fdm-mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  color: var(--fdm-white);
}

.fdm-mini-metrics > div {
  display: flex;
  min-height: 72px;
  padding: 12px 16px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  flex-direction: column;
  justify-content: flex-end;
}

.fdm-mini-metrics strong {
  color: var(--fdm-white);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900;
  line-height: .85;
}

.fdm-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.fdm-filter {
  display: grid;
  gap: 10px;
}

.fdm-filter > span {
  color: var(--fdm-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.fdm-segmented {
  display: flex;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 2px solid var(--fdm-black);
}

.fdm-segmented button,
.fdm-filter select {
  min-height: 48px;
  border: 0;
  background: var(--fdm-white);
  color: var(--fdm-black);
  font: inherit;
  font-weight: 900;
}

.fdm-segmented button {
  padding: 0 22px;
  border-right: 2px solid var(--fdm-black);
  cursor: pointer;
  color: var(--fdm-black) !important;
  text-decoration: none !important;
}

.fdm-segmented button:last-child {
  border-right: 0;
}

.fdm-segmented button.is-active {
  background: var(--fdm-cyan);
  color: var(--fdm-black) !important;
}

.fdm-segmented button:hover,
.fdm-segmented button:focus,
.fdm-segmented button:active {
  color: var(--fdm-black) !important;
  text-decoration: none !important;
}

.fdm-filter select {
  width: 100%;
  padding: 0 16px;
  border: 2px solid var(--fdm-black);
}

.fdm-map-section {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  background: var(--fdm-cyan);
}

.fdm-map-head {
  display: none;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin: 0;
}

.fdm-map-head h2 {
  color: var(--fdm-black);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.fdm-map-head p {
  display: none;
}

.fdm-legend {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 7px 9px;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-offwhite);
  box-shadow: 4px 4px 0 rgba(29, 29, 29, .14);
  font-weight: 900;
  white-space: nowrap;
}

.fdm-legend span {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--fdm-black);
  background: var(--fdm-lime);
}

.fdm-legend span:nth-child(2) {
  background: #7eab1e;
}

.fdm-legend span:nth-child(3) {
  background: #4f7510;
}

.fdm-legend span:nth-child(n+4) {
  display: none;
}

.fdm-legend small {
  margin-left: 7px;
  font-size: 12px;
  text-transform: uppercase;
}

.fdm-zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-white);
  box-shadow: 5px 5px 0 rgba(29, 29, 29, .12);
}

.fdm-zoom-controls button {
  min-width: 34px;
  min-height: 32px;
  padding: 0 9px;
  appearance: none;
  border: 0;
  border-right: 2px solid var(--fdm-black);
  background: var(--fdm-white);
  color: var(--fdm-black);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none !important;
}

.fdm-zoom-controls button:last-child {
  border-right: 0;
}

.fdm-zoom-controls button:hover,
.fdm-zoom-controls button:focus-visible {
  background: var(--fdm-lime);
  text-decoration: none !important;
}

.fdm-map-wrap {
  position: relative;
  min-height: 500px;
  border: 2px solid var(--fdm-black);
  background: #ffffff;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.fdm-map-wrap svg {
  display: block;
  width: 100%;
  height: min(58vh, 620px);
  min-height: 500px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.fdm-country {
  fill: #f4f7f7;
  stroke: #ffffff;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  transition: fill .18s ease, opacity .18s ease;
}

.fdm-country.has-data {
  cursor: pointer;
}

.fdm-country.is-active,
.fdm-special-region.is-active {
  stroke: var(--fdm-black);
  stroke-width: 2.2;
}

.fdm-special-region {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: fill .18s ease, opacity .18s ease;
}

.fdm-island-shape {
  cursor: pointer;
  stroke: var(--fdm-black);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}

.fdm-territory-label {
  fill: var(--fdm-black);
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: var(--fdm-offwhite);
  stroke-width: 4px;
  text-anchor: middle;
  text-transform: uppercase;
}

.fdm-tooltip {
  position: absolute;
  z-index: 8;
  width: min(300px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 14px;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-white);
  box-shadow: 8px 8px 0 rgba(29, 29, 29, .16);
  pointer-events: auto;
}

.fdm-tooltip h3 {
  margin: 0 0 7px;
  color: var(--fdm-black);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.fdm-tooltip p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.fdm-tooltip-total {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-lime);
  color: var(--fdm-black);
}

.fdm-tooltip-total strong {
  font-size: 34px;
  font-weight: 900;
  line-height: .8;
}

.fdm-tooltip-total span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.fdm-tooltip dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 14px;
  margin: 8px 0 0;
}

.fdm-sector-list {
  display: grid;
  gap: 2px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.fdm-sector-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--fdm-line);
}

.fdm-sector-list strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fdm-sector-list span {
  font-size: 18px;
  font-weight: 900;
}

.fdm-tooltip dt {
  color: var(--fdm-muted);
}

.fdm-tooltip dd {
  margin: 0;
  font-weight: 900;
}

.fdm-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.fdm-bottom article {
  min-width: 0;
  padding: 20px;
  border: 2px solid var(--fdm-black);
  background: var(--fdm-white);
}

.fdm-bottom .fdm-privacy {
  grid-column: 1 / -1;
}

.fdm-bottom h2 {
  margin-bottom: 10px;
  color: var(--fdm-black);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.fdm-bottom p {
  margin: 0;
  color: var(--fdm-muted);
  font-size: 15px;
  line-height: 1.45;
}

.fdm-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--fdm-line);
  align-items: center;
}

.fdm-row:last-child {
  border-bottom: 0;
}

.fdm-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fdm-row span {
  font-size: 20px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .fdm-hero,
  .fdm-summary,
  .fdm-toolbar,
  .fdm-bottom {
    grid-template-columns: 1fr;
  }

  .fdm-mini-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .fdm-mini-metrics > div {
    min-height: 72px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
  }

  .fdm-map-wrap {
    min-height: 360px;
  }

  .fdm-map-wrap svg {
    min-height: 360px;
    height: auto;
  }
}

@media (max-width: 560px) {
  .fulg-diaspora-map {
    padding: 34px 16px;
  }

  .fdm-hero h1 {
    font-size: 44px;
  }

  .fdm-hero p {
    font-size: 20px;
  }

  .fdm-main-metric {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 14px 16px;
  }

  .fdm-main-metric strong {
    font-size: 42px;
  }

  .fdm-main-metric span {
    max-width: none;
    font-size: 12px;
    line-height: 1.15;
  }

  .fdm-mini-metrics > div {
    min-height: 62px;
    padding: 10px 14px;
  }

  .fdm-mini-metrics strong {
    font-size: 26px;
  }

  .fdm-segmented {
    width: 100%;
  }

  .fdm-segmented button {
    flex: 1;
    padding: 0 12px;
  }

  .fdm-map-head {
    display: none;
  }

  .fdm-map-wrap {
    height: 250px;
    min-height: 250px;
    overflow: hidden;
  }

  .fdm-map-wrap svg {
    width: 100%;
    height: 250px;
    max-width: none;
    min-height: 0;
  }

  .fdm-legend {
    top: 10px;
    right: 10px;
    padding: 5px 7px;
  }

  .fdm-legend span {
    width: 11px;
    height: 11px;
  }

  .fdm-legend small {
    font-size: 10px;
  }

  .fdm-zoom-controls {
    right: 10px;
    bottom: 10px;
  }

  .fdm-zoom-controls button {
    min-width: 30px;
    min-height: 28px;
    padding: 0 7px;
    font-size: 12px;
  }
}
