.tl-profile-tracks-page {
  background: transparent;
}

/* Filter toolbar: bordered panel with a search field + selects (matches the mockup). */
.tl-tracks-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 11px 13px;
  margin-top: 1.25rem;
  background: var(--tl-panel);
  border: 1px solid var(--tl-hairline);
  border-radius: 12px;
  box-shadow: var(--tl-lift);
}
.tl-tracks-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.tl-tracks-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tl-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.tl-tracks-search .form-control {
  padding-left: 34px;
}
.tl-tracks-fld {
  flex: 1 1 150px;
  min-width: 130px;
}
.tl-tracks-fld .form-select {
  width: 100%;
}

.tl-profile-tracks-page .tl-form-select {
  border-color: var(--tl-hairline);
}

.tl-profile-tracks-page .tl-results-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.9rem;
}

.tl-profile-tracks-page .tl-results-copy {
  min-width: 0;
}

.tl-profile-tracks-page .tl-results-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: start;
}

.tl-profile-tracks-page .tl-bulk-edit-tracks {
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tl-profile-tracks-page .tl-bulk-edit-tracks i {
  margin: 0;
}

.tl-track-search-field {
  position: relative;
}

.tl-track-search-results {
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1080;
  max-height: min(18rem, 42vh);
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  background: var(--bs-body-bg);
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.16);
}

.tl-track-search-results .list-group-item {
  border-inline: 0;
  background: var(--bs-body-bg);
}

.tl-track-search-results .list-group-item:first-child {
  border-top: 0;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.tl-track-search-results .list-group-item:last-child {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

/* The feed is rows now, from .tl-feed-rows in tracks.css: the same list the
   Activities page draws, from the same renderer. This used to force a grid of
   stacked cards, which is what made one activity list look like two. */
@media (max-width: 767.98px) {
  .tl-profile-tracks-page .tl-results-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
  }

  .tl-profile-tracks-page .tl-bulk-edit-tracks {
    width: 2.6rem;
    min-width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
  }

  .tl-profile-tracks-page .tl-activity-action-btn {
    width: 2.1rem;
    min-width: 2.1rem;
    min-height: 2.1rem;
  }
}

@media (max-width: 575.98px) {
  .tl-profile-tracks-page .tl-activity-card-actions {
    gap: 0.3rem;
  }

  .tl-profile-tracks-page .tl-activity-action-btn {
    width: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 10px;
  }
}

/* Marker designer (tl-athlete-profile tab)

   The TerraLoc Personal Marker proposals' designer: "Your marker" beside
   "How others see you". The markers themselves are styled by
   sport-marker.css, which the live map loads too; what is here is the two
   panels, the rows and their controls. */
.tl-marker-designer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 760px) {
  .tl-marker-designer {
    grid-template-columns: 1fr;
  }
}
.tl-marker-panel {
  background: var(--tl-panel);
  border: 1px solid var(--tl-hairline);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 14px;
}
.tl-marker-panel-title {
  margin: 0;
  font-family: var(--tl-font-display);
  font-size: 19px;
  font-weight: 700;
}
.tl-marker-row {
  display: grid;
  gap: 8px;
}
.tl-marker-row[hidden] {
  display: none;
}
.tl-marker-row-label {
  font-family: var(--tl-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tl-dim);
  margin: 0;
}
.tl-marker-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tl-muted);
}

.tl-marker-seg {
  display: flex;
  border: 1px solid var(--tl-hairline);
  border-radius: 12px;
  overflow: hidden;
}
.tl-marker-seg-option {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 8px 4px;
  color: var(--tl-muted);
  cursor: pointer;
}
.tl-marker-seg-option + .tl-marker-seg-option {
  border-left: 1px solid var(--tl-hairline);
}
.tl-marker-seg-option.is-on {
  background: var(--tl-accent);
  color: var(--tl-paper);
  font-weight: 600;
}

/*
 * THE REMINDER SLIDER: Off, Lazy, Push, Loco.
 *
 * A range rather than a row of buttons, because the four positions are a
 * scale and buttons do not say so. Full width: it shares a form with the
 * marker designer, and a control boxed into half the column reads as an
 * afterthought beside one that is not.
 *
 * THE TRACK HEATS UP AS IT TRAVELS, green at Off through to the call to
 * action orange at Loco, revealed only as far as the thumb. That is the
 * whole idea of the setting in one glance: further right is more insistent.
 * Orange is allowed here because it is a control; amber stays live tracking's
 * and ochre stays ascent's, and neither appears.
 *
 * --at (per stop) and --pos (the slider) are 0 to 1 along the scale, and
 * every position on screen is that number put through one calc. It reads
 *   half a thumb  +  that fraction of what is left
 * because a range's thumb travels from half its own width to the width less
 * half: anything spread edge to edge lines up with nothing.
 *
 * --reminder-thumb is deliberately NOT --tl-reminder-thumb: in this project a
 * --tl- name is a theme token set on :root for every page, and cssvars_test
 * holds this sheet to that. This one is local to the control.
 */
.tl-reminder-slider {
  --reminder-thumb: 9px;
  --pos: 0;
  --reminder-fill: calc(var(--reminder-thumb) + var(--pos) * (100% - 2 * var(--reminder-thumb)));
  --reminder-heat: var(--tl-cta);
  --reminder-rail: rgba(var(--tl-ink-rgb, 35, 40, 31), 0.14);
  padding: 16px 18px 14px;
  border: 1px solid var(--tl-hairline);
  border-radius: 14px;
  background: var(--tl-paper-deep);
}

.tl-reminder-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
/* The reading, as an instrument gives one: the cadence in mono, then the
   name of the position in the weight of a headline. */
.tl-reminder-read {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.tl-reminder-every {
  font-family: var(--tl-font-mono, Menlo, Consolas, monospace);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tl-muted);
}
.tl-reminder-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--reminder-heat);
}

/* Off is not a setting anybody should feel shouted at by, so the heat drains
   out of the whole control there. */
.tl-reminder-slider.is-off {
  --reminder-heat: var(--tl-muted);
}
.tl-reminder-slider.is-lazy {
  --reminder-heat: var(--tl-accent);
}
/*
 * THE THUMB WEARS THE RAMP'S COLOUR AT ITS OWN POSITION, so the control is
 * one temperature rather than a green thumb sitting on an orange track. The
 * steps above stay as the fallback, and a browser with color-mix gets the
 * exact colour the gradient has under the thumb.
 */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .tl-reminder-slider:not(.is-off) {
    --reminder-heat: color-mix(in srgb, var(--tl-cta) calc(var(--pos) * 100%), var(--tl-accent));
  }
}

.tl-reminder-slider .form-range {
  margin: 0;
  width: 100%;
  background: transparent;
}
/* The rail, and the heat poured into it up to the thumb. The gradient is
   sized rather than clipped, so it is the same green-to-orange ramp at every
   position and simply shows less of it. */
/* The rail over the ramp, covering it from the right back to the thumb. The
   ramp underneath always runs the full width, so the colour at any position
   is the colour of that position and not of how far along the fill it is. */
.tl-reminder-slider .form-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 5px;
  background:
    linear-gradient(to right, var(--reminder-rail), var(--reminder-rail))
      right center / calc(100% - var(--reminder-fill)) 100% no-repeat,
    linear-gradient(to right, var(--tl-accent), var(--tl-cta));
}
.tl-reminder-slider .form-range::-moz-range-track {
  height: 8px;
  border-radius: 5px;
  background:
    linear-gradient(to right, var(--reminder-rail), var(--reminder-rail))
      right center / calc(100% - var(--reminder-fill)) 100% no-repeat,
    linear-gradient(to right, var(--tl-accent), var(--tl-cta));
}
.tl-reminder-slider.is-off .form-range::-webkit-slider-runnable-track,
.tl-reminder-slider.is-off .form-range::-moz-range-track {
  background: var(--reminder-rail);
}

/* The thumb rides the heat, with a paper ring so it stays visible on top of
   the fill it is the end of. */
.tl-reminder-slider .form-range::-webkit-slider-thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 3px solid var(--tl-paper-deep);
  border-radius: 50%;
  background: var(--reminder-heat);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}
.tl-reminder-slider .form-range::-moz-range-thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 3px solid var(--tl-paper-deep);
  border-radius: 50%;
  background: var(--reminder-heat);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

/* The stops: positioned on the scale rather than spaced along it, so each
   name and its tick sit exactly where the thumb comes to rest. */
.tl-reminder-scale {
  position: relative;
  height: 32px;
  margin-top: 10px;
}
.tl-reminder-stop {
  position: absolute;
  top: 0;
  left: calc(var(--reminder-thumb) + var(--at) * (100% - 2 * var(--reminder-thumb)));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: var(--tl-muted);
  cursor: pointer;
  white-space: nowrap;
}
/* The ends stay inside the control rather than hanging off it. */
.tl-reminder-stop:first-child {
  left: 0;
  transform: none;
  align-items: flex-start;
  padding-left: 0;
}
.tl-reminder-stop:last-child {
  left: 100%;
  transform: translateX(-100%);
  align-items: flex-end;
  padding-right: 0;
}
.tl-reminder-tick {
  width: 1px;
  height: 6px;
  background: var(--tl-hairline-strong);
}
.tl-reminder-stop:first-child .tl-reminder-tick {
  margin-left: var(--reminder-thumb);
}
.tl-reminder-stop:last-child .tl-reminder-tick {
  margin-right: var(--reminder-thumb);
}
.tl-reminder-stop.is-on {
  color: var(--tl-ink);
  font-weight: 600;
}
.tl-reminder-stop.is-on .tl-reminder-tick {
  height: 8px;
  width: 2px;
  background: var(--reminder-heat);
}
.tl-reminder-stop:hover .tl-reminder-stop-name {
  color: var(--tl-ink);
}
.tl-reminder-stop:focus-visible {
  outline: 2px solid var(--tl-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.tl-reminder-say {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tl-muted);
}

/* Four short names fit across a phone at this size; the sentence under the
   slider carries the meaning either way. */
@media (max-width: 560px) {
  .tl-reminder-stop {
    font-size: 11.5px;
    padding: 0 2px;
  }
}

.tl-marker-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-marker-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0;
  cursor: pointer;
}
.tl-marker-swatch.is-on {
  border-color: var(--tl-ink);
}
.tl-marker-seg-option:focus-visible,
.tl-marker-swatch:focus-visible {
  outline: 2px solid var(--tl-accent);
  outline-offset: 2px;
}
.tl-marker-letters {
  max-width: 6rem;
  text-transform: uppercase;
}

.tl-marker-preview {
  display: grid;
  place-items: center;
  background: var(--tl-paper);
  border-radius: 14px;
  padding: 16px;
  min-height: 152px;
}
/* The marker close in, twice its map size: the tag grows to the right of
   the disc, so the preview shifts left by what the tag adds. */
.tl-marker-preview .tl-athlete-marker {
  transform: scale(2);
  transform-origin: 30px 30px;
}
.tl-marker-preview .tl-athlete-marker--tag {
  margin-right: 120px;
}
.tl-marker-map {
  position: relative;
  width: 100%;
  aspect-ratio: 22 / 13;
  border-radius: 14px;
  overflow: hidden;
  outline: 1px solid rgba(35, 40, 31, 0.08);
}
.tl-marker-map > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tl-marker-map .tl-athlete-marker {
  pointer-events: none;
}

/* ---------------------------------------------------------------
   My Tracks summary: the stat cards render as the inline mono stat
   line inside the shared .tl-tab-summary (kicker + title come from
   the shared .tl-tab-* header).
   --------------------------------------------------------------- */
.tl-tracks-summary .tl-activities-stats { display: contents; }
.tl-tracks-summary .tl-stat-card {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-tracks-summary .tl-stat-icon {
  display: none;
}
.tl-tracks-summary .tl-stat-body {
  min-width: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-tracks-summary .tl-stat-label {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--bs-secondary-color);
}
.tl-tracks-summary .tl-stat-value {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}