/*==============================================*\
|| TerraLoc – Explore: every activity on a map   ||
|| css/explore.css                               ||
\*==============================================*/

/* Explore replaced Places. Places was a list page with a small map on it;
   Explore is a map page with a filter bar on it, so the layout is the live
   map's (a fixed-height stage the map fills) rather than the activity list's
   (a hero over a scrolling feed). The colour and radius vocabulary is the
   activity list's, because the two pages are siblings and an athlete moves
   between them. */

:root {
  /* How much chrome sits above the map. The live page declares its own twin
     and nothing sets either yet; both exist so a sticky header can be paid
     for in one place rather than by guessing a pixel count in a calc(). */
  --tl-explore-top-offset: 0px;

  /* THE ONE COLOUR EVERY FLOATING PANEL USES.
     The first version hand-mixed rgba(255,255,255,.94) with a bluish grey
     under [data-bs-theme="dark"], which meant two lists to keep in step and a
     dark panel in a hue the theme does not use. Mixing the theme's own body
     background keeps the slight translucency a panel over a map wants and
     makes the dark face free. */
  --tl-explore-panel: color-mix(in srgb, var(--bs-body-bg, #fff) 94%, transparent);
}

.tl-explore-page {
  --tl-ink: var(--bs-heading-color);
  --tl-muted: var(--bs-secondary-color);
  --tl-line: var(--bs-border-color);
  --tl-surface: var(--bs-body-bg, #fff);
  --tl-surface-soft: var(--bs-tertiary-bg);
  --tl-radius-lg: 22px;
  --tl-radius-md: 14px;
  --tl-shadow: var(--bs-box-shadow);
  --tl-shadow-soft: var(--bs-box-shadow-sm);

  margin: 0;
  padding: 0;
  color: var(--tl-ink);
}

.tl-explore-shell {
  display: flex;
  flex-direction: column;
  /* svh so the bar is not pushed off by a mobile browser's collapsing
     toolbar, with vh first for anything that does not know svh. */
  height: calc(100vh - var(--tl-explore-top-offset, 0px));
  height: calc(100svh - var(--tl-explore-top-offset, 0px));
  min-height: 0;
  overflow: hidden;
}

/* ------------------------------------------------------------------
   The filter bar
   ------------------------------------------------------------------ */

.tl-explore-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  padding: clamp(0.85rem, 1.5vw, 1.25rem) clamp(1rem, 2.5vw, 2rem);
  background: var(--tl-surface);
  border-bottom: 1px solid var(--tl-line);
  box-shadow: var(--tl-shadow-soft);
  position: relative;
  z-index: 2;
}

.tl-explore-headline {
  flex: 1 1 14rem;
  min-width: 0;
}

.tl-explore-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tl-muted);
}

.tl-explore-title {
  margin: 0.1rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
}

.tl-explore-scope {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--tl-muted);
}

.tl-explore-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.tl-explore-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8.5rem;
}

.tl-explore-field .form-select {
  border-radius: var(--tl-radius-md);
  font-size: 0.9rem;
}

.tl-explore-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tl-muted);
  margin: 0;
}

.tl-explore-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--tl-line);
  color: var(--tl-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.tl-explore-reset:hover,
.tl-explore-reset:focus-visible {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

/* ------------------------------------------------------------------
   The map
   ------------------------------------------------------------------ */

.tl-explore-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.tl-explore-map {
  position: absolute;
  inset: 0;
  background: var(--tl-surface-soft, #d7e3ef);
}

.tl-explore-map.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bs-body-bg, #fff) 35%, transparent);
  pointer-events: none;
}

/* How many activities are on the map right now. Bottom left: the shared map
   factory puts the style picker top-left, zoom, 3D and weather top-right and
   the attribution bottom-right, which leaves this corner free. No scale bar,
   because no other map in the product shows one. */
.tl-explore-count {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--tl-explore-panel);
  border: 1px solid var(--tl-line);
  box-shadow: var(--tl-shadow-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tl-ink);
}

/* An empty result, a cap, or a failed load. One slot, because only one of
   them is ever true at a time. */
.tl-explore-note {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 3;
  max-width: min(32rem, calc(100% - 2rem));
  padding: 0.55rem 1rem;
  border-radius: var(--tl-radius-md);
  background: var(--tl-explore-panel);
  border: 1px solid var(--tl-line);
  box-shadow: var(--tl-shadow);
  font-size: 0.85rem;
  text-align: center;
  color: var(--tl-ink);
}

.tl-explore-note.is-error {
  border-color: rgba(var(--bs-danger-rgb), 0.4);
  color: var(--bs-danger-text-emphasis, var(--bs-danger));
}

/* Bottom centre, over the map, appearing only after the athlete has moved it.
   The one control on the page that asks for something rather than reporting
   it, so it is the one that gets the CTA colour. */
.tl-explore-search-here {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--tl-cta, #C86B3F);
  background: var(--tl-cta, #C86B3F);
  color: var(--tl-cta-ink, #fff);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.16);
  animation: tl-explore-rise 0.18s ease-out;
}

.tl-explore-search-here:hover,
.tl-explore-search-here:focus-visible {
  background: var(--tl-cta-hover, #A8512E);
  border-color: var(--tl-cta-hover, #A8512E);
  outline: none;
}

@keyframes tl-explore-rise {
  from { opacity: 0; transform: translate(-50%, 0.4rem); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .tl-explore-search-here { animation: none; }
}

/* ------------------------------------------------------------------
   The sport legend
   ------------------------------------------------------------------ */

/* Top left, under the style picker.
   It sat top right at a hand-measured 12.5rem, clearing the zoom, 3D and
   weather stack by eye, and read as an afterthought parked in a corner. The
   left column has one control above it and nothing below, so the legend reads
   as belonging with the map's own furniture instead of floating loose. */
.tl-explore-legend {
  position: absolute;
  left: 0.75rem;
  top: 3.4rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.tl-explore-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--tl-line);
  background: var(--tl-explore-panel);
  box-shadow: var(--tl-shadow-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tl-ink);
  cursor: pointer;
}

.tl-explore-legend-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--tl-radius-md);
  background: var(--tl-explore-panel);
  border: 1px solid var(--tl-line);
  box-shadow: var(--tl-shadow);
  max-height: 60vh;
  overflow-y: auto;
}

.tl-explore-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.tl-explore-legend-swatch {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bs-body-bg, #fff);
}

.tl-explore-legend-swatch svg {
  width: 0.85rem;
  height: 0.85rem;
}

.tl-explore-legend-count {
  margin-left: auto;
  padding-left: 0.6rem;
  color: var(--tl-muted);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   The card rail

   The results as cards over the bottom of the map, the open one in the
   middle and its neighbours showing at the sides. It replaced a MapLibre
   popup that could show one activity and offered no way to reach the next.

   The page moves the track by transform and places each card by its own
   index; everything here is how the pieces are painted. modules/card-rail.js
   owns the numbers.
   ------------------------------------------------------------------ */

.tl-explore-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding-bottom: 0.85rem;
  /* The rail is a strip across the whole map. Only the cards and the two
     chevrons take the pointer, so the map can still be dragged beside them. */
  pointer-events: none;
}

.tl-explore-rail-window {
  overflow: hidden;
  padding: 0.6rem 0 0.35rem;
}

/*
 * ONE HEIGHT FOR THE CARD AND THE TRACK IT SITS IN.
 *
 * The cards are placed absolutely, by index, so the track has no height of
 * its own to take from them, and the window it sits in clips. Both read the
 * same token, and the cover is a fixed share of it, the way the app's card is
 * 258 over a 140 cover.
 */
.tl-explore-rail {
  --tl-card-h: 15.4rem;
  --tl-cover-h: 8.75rem;
}

.tl-explore-rail-track {
  position: relative;
  height: var(--tl-card-h);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
}

.tl-explore-rail-track.is-dragging,
.tl-explore-rail-track.is-dragging .tl-explore-card {
  transition: none;
}

/* ---- one card ---- */

.tl-explore-card {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: var(--tl-card-h);
  overflow: hidden;
  border-radius: var(--tl-radius-md);
  background: var(--tl-surface);
  border: 1px solid var(--tl-line);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.18);
  /* Scaled about its own bottom edge, so the row of cards shares a baseline
     and only the open one stands up out of it. */
  transform-origin: bottom center;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: auto;
  /* Sideways is the rail's; up and down is the page's. Without this the
     browser waits to find out and the first swipe of every session lags. */
  touch-action: pan-y;
}

.tl-explore-card-open {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tl-explore-card-open:hover {
  color: inherit;
}

.tl-explore-card-cover {
  position: relative;
  display: block;
  height: var(--tl-cover-h);
  background: var(--tl-surface-soft);
}

.tl-explore-cover-photo,
.tl-explore-cover-line {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tl-explore-card-sport,
.tl-explore-card-photos,
.tl-explore-card-legs {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* The sport in its own colour, the way the sport is drawn everywhere here. */
.tl-explore-card-sport {
  left: 0.5rem;
  top: 0.5rem;
  background: color-mix(in srgb, var(--tl-surface) 92%, transparent);
  box-shadow: var(--tl-shadow-soft);
}

.tl-explore-card-sport svg {
  width: 0.85rem;
  height: 0.85rem;
}

.tl-explore-card-sport span {
  color: var(--tl-ink);
}

/* Bottom right, because the close cross has the top right corner. */
.tl-explore-card-photos {
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(20, 24, 15, 0.7);
  color: #fff;
}

.tl-explore-card-legs {
  left: 0.5rem;
  bottom: 0.5rem;
  background: rgba(20, 24, 15, 0.7);
  color: #fff;
}

.tl-explore-card-close {
  position: absolute;
  right: 0.4rem;
  top: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tl-surface) 92%, transparent);
  color: var(--tl-ink);
  box-shadow: var(--tl-shadow-soft);
  cursor: pointer;
}

.tl-explore-card-close:hover,
.tl-explore-card-close:focus-visible {
  background: var(--tl-surface);
  outline: none;
}

.tl-explore-card-body {
  display: block;
  height: calc(var(--tl-card-h) - var(--tl-cover-h));
  padding: 0.6rem 0.75rem 0.7rem;
  overflow: hidden;
}

.tl-explore-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tl-explore-card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tl-ink);
}

.tl-explore-card-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tl-muted);
}

.tl-explore-card-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.tl-explore-fig {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.tl-explore-fig-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tl-muted);
}

.tl-explore-fig-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tl-ink);
}

/* Ochre is for ascent figures and nothing else on this site. */
.tl-explore-fig.is-ascent .tl-explore-fig-value {
  color: var(--tl-terra, #A9743E);
}

.tl-explore-fig-unit {
  margin-left: 0.15rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tl-muted);
}

/* ---- where in the results the open card is ---- */

.tl-explore-rail-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 1rem;
  margin-top: 0.35rem;
  pointer-events: none;
}

.tl-explore-rail-pos i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tl-ink) 30%, transparent);
  transition: width 0.18s ease-out;
}

.tl-explore-rail-pos i.is-on {
  width: 14px;
  background: var(--tl-ink);
}

/* Past seven results the dots say nothing, so it is "3 / 38" instead. */
.tl-explore-rail-pos.is-count {
  padding: 0.1rem 0.5rem;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  border-radius: 999px;
  background: var(--tl-explore-panel);
  border: 1px solid var(--tl-line);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tl-ink);
}

/* ---- the two chevrons ---- */

/* A phone swipes. These are for the desktop, where there is nothing to swipe
   with and the mouse would otherwise have to drag a card every time. */
.tl-explore-rail-step {
  position: absolute;
  /* On the cover's middle: 0.6rem of window padding plus half a cover. */
  top: calc(0.6rem + var(--tl-cover-h) / 2);
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--tl-line);
  border-radius: 50%;
  background: var(--tl-explore-panel);
  color: var(--tl-ink);
  box-shadow: var(--tl-shadow-soft);
  cursor: pointer;
  pointer-events: auto;
}

.tl-explore-rail-step.is-prev { left: 0.75rem; }
.tl-explore-rail-step.is-next { right: 0.75rem; }

.tl-explore-rail-step:hover:not(:disabled),
.tl-explore-rail-step:focus-visible:not(:disabled) {
  background: var(--tl-surface);
  outline: none;
}

.tl-explore-rail-step:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---- the map, while the cards are up ---- */

/* The cards are the answer while they are open, so the count and the offer to
   search this area would be reading over the top of them. The offer comes
   back the moment they are put away, and taking it would throw them away. */
.tl-explore-shell.has-cards .tl-explore-count,
.tl-explore-shell.has-cards .tl-explore-search-here {
  display: none;
}

/* The pin of the open day, told apart from the rest of them. */
.tl-explore-pin-open .tl-sport-marker-inner {
  box-shadow: 0 0 0 3px var(--tl-surface), 0 0 0 5px currentColor, 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------------
   The disc, and the flower it opens into

   Activities whose markers would overlap become one disc carrying the count
   and a ring of the sports inside it. A disc whose members share a doorstep
   fans them out rather than sending the athlete after it with the zoom.

   modules/map-cluster.js owns every number in the geometry and explains why;
   what is here is only how the pieces are painted.
   ------------------------------------------------------------------ */

.tl-explore-cluster {
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: pointer;
}

.tl-explore-cluster-disc {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* The marker disc's own colour, from sport-marker.css: pale on the three
     pale basemaps, near-black on the dark one. A disc that disagreed with the
     markers around it would read as a different kind of thing. */
  background: var(--tl-marker-disc, rgba(255, 255, 255, 0.94));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  /* The zoom ramp the markers follow, with a floor: at half size a disc takes
     its count down with it and stops being readable, which is the one thing
     it exists to be. */
  transform: scale(max(0.82, var(--tl-athlete-marker-scale, 1)));
  transform-origin: center center;
}

[data-tl-basemap="dark"] .tl-explore-cluster-disc {
  --tl-marker-disc: rgba(20, 24, 15, 0.94);
}

/* The sport ring. Drawn on the disc's own edge, so it grows with it. */
.tl-explore-cluster-disc svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.tl-explore-cluster-count {
  position: relative;
  font-family: var(--tl-font-display, inherit);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--tl-ink);
}

.tl-explore-cluster[data-size="42"] .tl-explore-cluster-count {
  font-size: 0.92rem;
}

.tl-explore-cluster[data-size="50"] .tl-explore-cluster-count {
  font-size: 1.04rem;
}

/* ---- the flower ---- */

/*
 * MAPLIBRE OWNS THE MARKER ELEMENT'S transform: it is where the position
 * goes, rewritten on every frame of a pan. So a leaf arrives by fading, and
 * the scale happens on the inner element the marker builder already owns,
 * where the zoom ramp lives too and has to be carried through the keyframes.
 */
.tl-explore-leaf {
  animation: tl-explore-fade 0.16s ease-out var(--tl-leaf-delay, 0ms) both;
}

.tl-explore-leaf .tl-sport-marker-inner {
  animation: tl-explore-pop 0.16s ease-out var(--tl-leaf-delay, 0ms) both;
}

@keyframes tl-explore-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tl-explore-pop {
  from { transform: scale(calc(var(--tl-athlete-marker-scale, 1) * 0.5)); }
  to   { transform: scale(var(--tl-athlete-marker-scale, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  .tl-explore-leaf,
  .tl-explore-leaf .tl-sport-marker-inner {
    animation: none;
  }
}

/* The last slot, when there are more than eighteen: how many are not on this
   page, and a click brings the next seventeen round. */
.tl-explore-leaf-more {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tl-accent, #46603c);
  color: var(--tl-accent-ink, #f3f2ec);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  font-family: var(--tl-font-display, inherit);
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

/* The true coordinate, still on the map under the fan, with the count beside
   it. Clicking it closes the flower: it is the one thing the hand is already
   near, the disc having turned into it. */
.tl-explore-anchor {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  white-space: nowrap;
  cursor: pointer;
}

.tl-explore-anchor-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--tl-accent, #46603c);
  border: 2px solid var(--tl-marker-disc, rgba(255, 255, 255, 0.94));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-tl-basemap="dark"] .tl-explore-anchor-dot {
  --tl-marker-disc: rgba(20, 24, 15, 0.94);
}

.tl-explore-anchor-count {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--tl-explore-panel);
  border: 1px solid var(--tl-line);
  box-shadow: var(--tl-shadow-soft);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tl-ink);
}

/* ------------------------------------------------------------------
   Narrow screens: the filter bar stacks and the map keeps the rest
   ------------------------------------------------------------------ */

@media (max-width: 767.98px) {
  .tl-explore-bar {
    gap: 0.7rem;
  }

  .tl-explore-filters {
    width: 100%;
  }

  .tl-explore-field {
    flex: 1 1 8rem;
    min-width: 7rem;
  }

  .tl-explore-legend {
    top: auto;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .tl-explore-legend-body {
    max-height: 40vh;
  }

  /* Down here the legend shares the corner the cards take, and a phone has
     a thumb: the chevrons are what a mouse needs and it has none. */
  .tl-explore-shell.has-cards .tl-explore-legend {
    display: none;
  }

  .tl-explore-rail-step {
    display: none;
  }
}
