/* Tourmometer chart modern module v1 — stage 17A3. */

.tm-chart-module--modern {
  --tm-chart-navy: #173b58;
  --tm-chart-muted: #829aaf;
  --tm-chart-green: #22aa7b;
  --tm-chart-orange: #ffa719;
  --tm-chart-blue: #239bd1;
  --tm-chart-red: #f04f62;
  width: 100%;
  min-width: 0;
  margin: 40px 0;
  color: var(--tm-chart-navy);
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-margin-top: 108px;
}

.tm-chart-module--modern,
.tm-chart-module--modern * {
  box-sizing: border-box;
}

.tm-chart-module__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin: 0 0 20px;
}

.tm-chart-module__heading {
  min-width: 0;
}

.tm-chart-module__kicker {
  margin: 0 0 10px;
  color: #6f8ca4;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.tm-chart-module__title {
  margin: 0;
  color: var(--tm-chart-navy);
  font-size: clamp(26px, 2.35vw, 32px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.7px;
}

.tm-chart-module__note {
  max-width: 330px;
  padding-bottom: 3px;
  color: var(--tm-chart-muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.45;
  text-align: right;
}

.tm-chart-module--modern .tmchart-wrap {
  position: relative !important;
  padding-top: 24px !important;
  overflow: hidden !important;
}

.tm-chart-module--modern .tmchart-wrap::before {
  position: absolute !important;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  display: block !important;
  width: auto !important;
  height: 5px !important;
  margin: 0 !important;
  background: linear-gradient(
    90deg,
    var(--tm-chart-green) 0 25%,
    var(--tm-chart-orange) 25% 50%,
    var(--tm-chart-blue) 50% 75%,
    var(--tm-chart-red) 75%
  ) !important;
  content: "" !important;
}

.tm-chart-module--modern .tmchart-title {
  display: none !important;
}

.tm-chart-module--modern .tmchart-head {
  justify-content: flex-end !important;
}

@media (max-width: 720px) {
  .tm-chart-module--modern {
    margin: 28px 0;
    scroll-margin-top: 88px;
  }

  .tm-chart-module__header {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }

  .tm-chart-module__kicker {
    margin-bottom: 8px;
    letter-spacing: 1.9px;
  }

  .tm-chart-module__title {
    font-size: 25px;
  }

  .tm-chart-module__note {
    max-width: none;
    padding: 0;
    text-align: left;
  }

  .tm-chart-module--modern .tmchart-wrap {
    padding-top: 20px !important;
  }

  .tm-chart-module--modern .tmchart-head {
    align-items: stretch !important;
    flex-direction: column !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tm-chart-module--modern *,
  .tm-chart-module--modern *::before,
  .tm-chart-module--modern *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Tourmometer chart header page-grid alignment — stage 17A5. */
.tm-chart-module--modern > .tm-chart-module__header {
  padding-right: 20px;
  padding-left: 20px;
}

@media (max-width: 720px) {
  .tm-chart-module--modern > .tm-chart-module__header {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* Tourmometer unified modern module heading — stage 17A6. */
.tm-chart-module--modern .tm-chart-module__kicker {
  color:#7694ab;
  font-family:Arial,sans-serif;
  font-size:9px;
  font-weight:800;
  line-height:1.55;
  letter-spacing:2.5px;
  text-transform:uppercase;
}
.tm-chart-module--modern .tm-chart-module__title {
  color:#173954;
  font-family:Arial,sans-serif;
  font-size:30px;
  font-weight:700;
  line-height:1.1;
  letter-spacing:-.6px;
}
@media(max-width:760px){
  .tm-chart-module--modern .tm-chart-module__title {font-size:25px;}
}

/* Tourmometer chart top legend layout — stage 17A9. */
@media (min-width: 721px) {
  .tm-chart-module--modern .tmchart-wrap {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    column-gap: 24px !important;
    align-items: center !important;
  }

  .tm-chart-module--modern .tmchart-legend {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 0 16px !important;
    flex-wrap: wrap !important;
  }

  .tm-chart-module--modern .tmchart-head {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: end !important;
    width: auto !important;
    margin: 0 0 16px !important;
  }

  .tm-chart-module--modern .tmchart-controls {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }

  .tm-chart-module--modern .tmchart-canvas-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 720px) {
  .tm-chart-module--modern .tmchart-wrap {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 0 !important;
    align-items: stretch !important;
  }

  .tm-chart-module--modern .tmchart-legend {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 10px !important;
    flex-wrap: wrap !important;
  }

  .tm-chart-module--modern .tmchart-head {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    align-items: center !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
  }

  .tm-chart-module--modern .tmchart-controls {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 100% !important;
  }

  .tm-chart-module--modern .tmchart-canvas-wrap {
    grid-column: 1 !important;
    grid-row: 4 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }
}
