/* The task sites page: the map, its site list, and the task cards below it.
   Loaded after site.css. */

:root {
  /* The two task categories. Science takes the brand blue; technical needs a
     second colour that reads on both the topo map and the aerial image, and
     is not Swiss red, which belongs to the flag. */
  --science: #3a9be8;
  --technical: #f2a93b;
}

/* ---------- map and its site list ---------- */
.atlas {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Framed like the photograph on the home page: a bright map on a dark
   page reads as a document when it has a border, not as a hole. */
#map {
  min-height: 560px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--night-2);
  z-index: 0;
}

.sites {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-label {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice-dim);
  margin: 14px 0 2px;
}

.group-label:first-child {
  margin-top: 0
}

.site {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s ease;
}

.site:hover,
.site:focus-visible,
.site[aria-pressed="true"] {
  border-color: var(--ice-dim)
}

.site:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px
}

.site b {
  display: block;
  font-weight: 600;
  font-size: 15.5px
}

.site span {
  display: block;
  color: var(--ice-dim);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 2px
}

/* The badge is the same element on the map and in the list, so the eye
   can match one to the other without a legend. */
.pin {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--stencil);
  font-size: 13px;
  color: var(--night);
  border: 2px solid var(--night);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.pin.science {
  background: var(--science)
}

.pin.technical {
  background: var(--technical)
}

/* The survey area has no pin on the map, only the band, so its list
   entry shows a swatch of the band instead. */
.pin.band {
  border-radius: 6px;
  border: 2px dashed var(--science);
  background: rgba(58, 155, 232, .35);
  box-shadow: none;
}

.map-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ice-dim);
  max-width: 80ch;
}

/* Leaflet's own chrome, brought onto the page's palette. */
.leaflet-container {
  font: inherit
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--night);
  color: var(--ice);
  border: 1px solid var(--line);
}

.leaflet-popup-content {
  margin: 12px 16px;
  font-size: 14.5px;
  line-height: 1.5
}

.leaflet-popup-content b {
  display: block;
  font-size: 15.5px;
  margin-bottom: 2px
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--ice-dim)
}

.leaflet-div-icon {
  background: none;
  border: 0
}


/* ---------- task cards ---------- */
.card .where {
  font-size: 14px;
  color: var(--ice-dim);
  margin-top: 6px
}

.card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--ice-dim);
  font-size: 15.5px
}

.card li {
  margin-bottom: 8px
}

.card li b {
  color: var(--ice);
  font-weight: 600
}

.tag {
  display: inline-block;
  font-family: var(--stencil);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--night);
  margin-bottom: 14px;
}

.tag.science {
  background: var(--science)
}

.tag.technical {
  background: var(--technical)
}


@media (max-width:900px) {
  .atlas {
    grid-template-columns: 1fr
  }

  /* Map first on a narrow screen: it is what the page is for. */
  #map {
    order: -1;
    min-height: 440px
  }
}

@media (max-width:640px) {
  #map {
    min-height: 380px
  }
}
