.btx-cycling-profile {
  --btx-cycle-blue: #2c3f92;
  --btx-cycle-blue-dark: #16265f;
  --btx-cycle-ink: #3a3a3a;
  --btx-cycle-muted: #626773;
  --btx-cycle-line: #d9dee8;
  --btx-cycle-stage: #f9fbff;
  --btx-cycle-grid: rgba(44, 63, 146, 0.16);
  width: 100%;
  color: var(--btx-cycle-ink);
  font-family: "Satoshi Regular", "Satoshi", Arial, sans-serif;
  font-synthesis: none;
}

.btx-cycling-profile,
.btx-cycling-profile * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.btx-cycling-profile button,
.btx-cycling-profile svg {
  font: inherit;
}

.btx-cycling-profile button:focus-visible,
.btx-cycling-profile svg:focus-visible {
  outline: 3px solid var(--btx-cycle-blue);
  outline-offset: 4px;
}

.btx-cycling-profile__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 640;
  border: 1px solid #dce2ef;
  border-radius: 8px;
  background: var(--btx-cycle-stage);
  box-shadow: 0 16px 44px rgba(35, 48, 102, 0.12);
  overflow: hidden;
  isolation: isolate;
}

.btx-cycling-profile__stage::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.btx-cycling-profile__plot-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.btx-cycling-profile__plot-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

.btx-cycling-profile__heading {
  position: absolute;
  top: 28px;
  right: 34px;
  left: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(520px, 2.2fr) minmax(210px, 1fr);
  gap: 24px;
  align-items: center;
  color: var(--btx-cycle-blue-dark);
  pointer-events: none;
}

.btx-cycling-profile__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.btx-cycling-profile__title > span,
.btx-cycling-profile__title > strong {
  display: block;
}

.btx-cycling-profile__title > span {
  margin-bottom: 4px;
  color: rgba(44, 63, 146, 0.64);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.btx-cycling-profile__title > strong {
  font-family: "Snippet", Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.1;
}

.btx-cycling-profile__brand {
  width: 185px;
  height: auto;
  justify-self: center;
  filter: drop-shadow(-1.5px 2px 1.5px rgba(44, 63, 146, 0.6));
}

.btx-cycling-profile__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  border: 1px solid rgba(44, 63, 146, 0.18);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.btx-cycling-profile__metrics > div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid rgba(44, 63, 146, 0.18);
}

.btx-cycling-profile__metrics > div:last-child {
  border-right: 0;
}

.btx-cycling-profile__metrics dt {
  margin-bottom: 4px;
  color: rgba(22, 38, 95, 0.64);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.btx-cycling-profile__metrics dd {
  margin: 0;
  color: var(--btx-cycle-blue-dark);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.btx-cycling-profile__svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.btx-cycling-profile__background {
  fill: var(--btx-cycle-stage);
}

.btx-cycling-profile__terrain {
  opacity: 0.05;
}

.btx-cycling-profile__terrain image {
  filter: saturate(0.8) contrast(1.05);
}

.btx-cycling-profile__grid line {
  stroke: var(--btx-cycle-grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__grid text,
.btx-cycling-profile__axis text {
  fill: rgba(22, 38, 95, 0.68);
  font-family: "Satoshi Regular", "Satoshi", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.btx-cycling-profile__axis .btx-cycling-profile__axis-line {
  stroke: var(--btx-cycle-blue);
  stroke-width: 1.5;
  opacity: 1;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__contours path {
  fill: none;
  stroke: rgba(44, 63, 146, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__area {
  fill: rgba(44, 63, 146, 0.055);
}

.btx-cycling-profile__shadow,
.btx-cycling-profile__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__shadow {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 8;
}

.btx-cycling-profile__line {
  stroke: var(--btx-cycle-blue);
  stroke-width: 4;
  filter: drop-shadow(0 2px 3px rgba(44, 63, 146, 0.2));
}

.btx-cycling-profile__interaction {
  fill: transparent;
  pointer-events: all;
}

.btx-cycling-profile__markers {
  pointer-events: none;
}

.btx-cycling-profile__marker-stem {
  stroke: rgba(44, 63, 146, 0.5);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__marker-halo {
  fill: #fff;
  stroke: var(--btx-cycle-blue);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__marker-core {
  fill: var(--btx-cycle-blue);
}

.btx-cycling-profile__marker-label {
  fill: var(--btx-cycle-blue-dark);
  stroke: rgba(249, 251, 255, 0.96);
  stroke-width: 3px;
  paint-order: stroke fill;
  font-family: "Satoshi Medium", "Satoshi", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  opacity: 1;
  transition: opacity 220ms linear;
}

.btx-cycling-profile__stage.is-waiting .btx-cycling-profile__markers > g:not(.is-reached) .btx-cycling-profile__marker-label,
.btx-cycling-profile__stage.is-drawing .btx-cycling-profile__markers > g:not(.is-reached) .btx-cycling-profile__marker-label {
  opacity: 0;
}

.btx-cycling-profile__cursor {
  opacity: 1;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.btx-cycling-profile__cursor.is-hidden {
  opacity: 0;
}

.btx-cycling-profile__cursor.is-drawing,
.btx-cycling-profile__cursor.is-exiting {
  transition: none;
}

.btx-cycling-profile__cursor.is-drawing > line,
.btx-cycling-profile__cursor.is-exiting > line {
  opacity: 0;
}

.btx-cycling-profile__cursor line {
  stroke: rgba(44, 63, 146, 0.62);
  stroke-dasharray: 3 5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__cursor-marker {
  filter: drop-shadow(-1px 2px 2px rgba(22, 38, 95, 0.22));
}

.btx-cycling-profile__cursor-halo {
  fill: #fff;
}

.btx-cycling-profile__cursor-ring {
  fill: none;
  stroke: rgba(255, 18, 81, 0.42);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.btx-cycling-profile__cursor-symbol {
  overflow: hidden;
}

.btx-cycling-profile__readout {
  position: absolute;
  top: 120px;
  left: 50%;
  z-index: 4;
  min-width: 220px;
  max-width: 320px;
  padding: 13px 16px 14px;
  border-left: 3px solid var(--btx-cycle-blue);
  border-radius: 0 6px 6px 0;
  color: var(--btx-cycle-blue-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(28, 42, 98, 0.14);
  transform: translateX(-50%);
  transition: opacity 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.btx-cycling-profile__readout.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.btx-cycling-profile__readout > span,
.btx-cycling-profile__readout strong {
  display: block;
}

.btx-cycling-profile__readout > span {
  margin-bottom: 5px;
  color: rgba(22, 38, 95, 0.62);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.btx-cycling-profile__readout strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.btx-cycling-profile__readout i {
  margin: 0 4px;
  color: var(--btx-cycle-blue);
  font-style: normal;
}

.btx-cycling-profile .btx-cycling-profile__replay {
  position: static;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  color: var(--btx-cycle-blue);
  background: transparent;
  font-family: "Satoshi Medium", "Satoshi", Arial, sans-serif;
  font-weight: 500;
  line-height: 1;
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
}

.btx-cycling-profile__replay[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.btx-cycling-profile__replay:focus-visible {
  outline: none;
}

.btx-cycling-profile .btx-cycling-profile__replay:hover,
.btx-cycling-profile .btx-cycling-profile__replay:focus,
.btx-cycling-profile .btx-cycling-profile__replay:active {
  color: var(--btx-cycle-blue);
  background: transparent !important;
  box-shadow: none;
}

.btx-cycling-profile__replay-icon {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--btx-cycle-blue);
  background: #fff;
  filter: drop-shadow(0 3px 4px rgba(22, 38, 95, 0.26));
  place-items: center;
  transition: transform 160ms ease, filter 160ms ease;
}

.btx-cycling-profile__replay-icon svg {
  display: block;
  width: 13.75px;
  height: 13.75px;
  fill: currentColor;
}

.btx-cycling-profile__replay-label {
  color: var(--btx-cycle-blue-dark);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.btx-cycling-profile__replay:hover .btx-cycling-profile__replay-icon,
.btx-cycling-profile__replay:focus-visible .btx-cycling-profile__replay-icon {
  filter: drop-shadow(0 4px 6px rgba(22, 38, 95, 0.34));
  transform: translateY(-2px);
}

.btx-cycling-profile__replay:focus-visible .btx-cycling-profile__replay-icon {
  outline: 3px solid var(--btx-cycle-blue);
  outline-offset: 3px;
}

.btx-cycling-profile__footer {
  margin-top: 26px;
}

.btx-cycling-profile__footer-label {
  margin: 0 0 10px;
  color: var(--btx-cycle-blue);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}

.btx-cycling-profile__landmarks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.btx-cycling-profile__landmarks button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--btx-cycle-line);
  border-radius: 6px;
  color: var(--btx-cycle-blue-dark);
  background: transparent;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.btx-cycling-profile__landmarks button::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--btx-cycle-blue);
  content: "";
  flex: 0 0 auto;
}

.btx-cycling-profile__landmarks button:hover,
.btx-cycling-profile__landmarks button:focus-visible,
.btx-cycling-profile__landmarks button.is-head-nearest,
.btx-cycling-profile__landmarks button[aria-current="true"] {
  border-color: var(--btx-cycle-blue);
  color: var(--btx-cycle-blue-dark) !important;
  background: rgba(44, 63, 146, 0.08);
}

.btx-cycling-profile.is-animating .btx-cycling-profile__landmarks button:not(.is-head-nearest) {
  border-color: var(--btx-cycle-line);
  color: var(--btx-cycle-blue-dark) !important;
  background: transparent;
}

.btx-cycling-profile__error {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #b21d3b;
  color: #70152a;
  background: #fff2f4;
}

.btx-cycling-profile__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .btx-cycling-profile__heading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }

  .btx-cycling-profile__metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .btx-cycling-profile__brand {
    grid-column: 2;
    grid-row: 1;
  }

}

@media (max-width: 720px) {
  .btx-cycling-profile__stage {
    aspect-ratio: 720 / 760;
  }

  .btx-cycling-profile__heading {
    top: 16px;
    right: 14px;
    left: 14px;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    row-gap: 12px;
  }

  .btx-cycling-profile__plot-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .btx-cycling-profile__plot-viewport::-webkit-scrollbar {
    display: none;
  }

  .btx-cycling-profile__plot-canvas {
    width: 200%;
  }

  .btx-cycling-profile__svg {
    touch-action: auto;
    cursor: grab;
  }

  .btx-cycling-profile__plot-viewport:active .btx-cycling-profile__svg {
    cursor: grabbing;
  }

  .btx-cycling-profile__elevation-label {
    paint-order: stroke;
    stroke: var(--btx-cycle-stage);
    stroke-linejoin: round;
    stroke-width: 8px;
  }

  .btx-cycling-profile__title {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    justify-items: start;
    width: 100%;
    min-height: 90px;
    text-align: left;
  }

  .btx-cycling-profile__title > span {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .btx-cycling-profile__title strong {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    max-width: 100%;
    font-size: 21px;
  }

  .btx-cycling-profile .btx-cycling-profile__title .btx-cycling-profile__replay {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    margin-top: 0;
  }

  .btx-cycling-profile__brand {
    display: none;
  }

  .btx-cycling-profile__metrics {
    grid-column: 1;
    grid-row: 2;
  }

  .btx-cycling-profile__metrics > div {
    padding: 8px 5px;
  }

  .btx-cycling-profile__metrics dt {
    font-size: 10px;
  }

  .btx-cycling-profile__metrics dd {
    font-size: 13px;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .btx-cycling-profile__grid text,
  .btx-cycling-profile__axis text {
    font-size: 20px;
  }

  .btx-cycling-profile__marker-label,
  .btx-cycling-profile__marker-stem {
    display: none;
  }

  .btx-cycling-profile__readout {
    top: 92px;
    right: 16px;
    left: auto !important;
    min-width: 210px;
    max-width: calc(100% - 32px);
    transform: none !important;
  }

  .btx-cycling-profile__landmarks {
    flex-wrap: nowrap;
    width: calc(100% + 28px);
    max-width: calc(100% + 28px);
    margin-right: -14px;
    margin-left: -14px;
    padding: 2px 14px 8px;
    padding-inline-start: var(--btx-landmark-leading-space, 14px);
    padding-inline-end: var(--btx-landmark-trailing-space, 14px);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
  }

  .btx-cycling-profile__landmarks::-webkit-scrollbar {
    display: none;
  }

  .btx-cycling-profile__landmarks:active {
    cursor: grabbing;
  }

  .btx-cycling-profile__landmarks li,
  .btx-cycling-profile__landmarks button {
    flex: 0 0 auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .btx-cycling-profile,
  .btx-cycling-profile *,
  .btx-cycling-profile *::before,
  .btx-cycling-profile *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
