/* TSL Phase 18 - driver duties + social links */
#tracks.tracks-modern .tsl-driver-socials{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
#tracks.tracks-modern .tsl-driver-social{
  display:inline-flex;
  min-height:34px;
  align-items:center;
  gap:7px;
  padding:6px 10px 6px 7px;
  border:1px solid #e1e5ea;
  border-radius:999px;
  background:#fff;
  color:#353b44;
  font-size:.7rem;
  font-weight:850;
  text-decoration:none;
  transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
#tracks.tracks-modern .tsl-driver-social:hover{
  border-color:#ff2c54;
  color:#171a1f;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(20,26,34,.08);
  text-decoration:none;
}
#tracks.tracks-modern .tsl-driver-social__mark{
  display:inline-flex;
  width:21px;
  height:21px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#181c22;
  color:#fff;
  font-size:.62rem;
  font-weight:950;
}
#tracks.tracks-modern .tsl-driver-social--youtube .tsl-driver-social__mark{background:#e10600;}
#tracks.tracks-modern .tsl-driver-social--twitch .tsl-driver-social__mark{background:#6441a5;}
#tracks.tracks-modern .tsl-driver-social--instagram .tsl-driver-social__mark{background:#2e3138;}

#tracks.tracks-modern .tsl-driver-duties{
  margin:0 0 30px;
}
#tracks.tracks-modern .tsl-driver-duties__card{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:16px;
  align-items:start;
  padding:20px 22px;
  border:1px solid #e1e5ea;
  border-left:4px solid #ff2c54;
  border-radius:14px;
  background:#fff;
  box-shadow:0 7px 22px rgba(18,24,32,.045);
}
#tracks.tracks-modern .tsl-driver-duties__icon{
  display:flex;
  width:42px;
  height:42px;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#181c22;
  color:#ff4768;
  font-size:1.35rem;
  font-weight:950;
}
#tracks.tracks-modern .tsl-driver-duties__content{
  min-width:0;
  color:#414852;
  font-size:.88rem;
  line-height:1.65;
}
#tracks.tracks-modern .tsl-driver-duties__content > :first-child{margin-top:0;}
#tracks.tracks-modern .tsl-driver-duties__content > :last-child{margin-bottom:0;}
#tracks.tracks-modern .tsl-driver-duties__content img{
  max-width:100%!important;
  height:auto!important;
  margin:10px 0;
  border:1px solid #e1e5ea;
  border-radius:10px;
  box-shadow:0 6px 18px rgba(20,26,34,.07);
}
#tracks.tracks-modern .tsl-driver-duties__content table{
  width:100%;
  max-width:100%;
  border-collapse:collapse;
}
#tracks.tracks-modern .tsl-driver-duties__content th,
#tracks.tracks-modern .tsl-driver-duties__content td{
  padding:8px 10px;
  border:1px solid #e5e8ec;
}
@media (max-width:600px){
  #tracks.tracks-modern .tsl-driver-duties__card{grid-template-columns:1fr;padding:17px 16px;}
  #tracks.tracks-modern .tsl-driver-duties__icon{width:38px;height:38px;}
}

/* TSL Phase 20 v0.9 - Overall directly below Safety Rating.
   Colour bands match Career Statistics. */
#tracks.tracks-individual .tsl-profile-overall-rating{
  position:absolute;
  top:122px;
  right:24px;
  z-index:2;
  display:grid;
  grid-template-columns:minmax(105px,1fr) 58px;
  grid-template-areas:
    "label value"
    "meta value";
  align-items:center;
  column-gap:15px;
  width:205px;
  min-width:205px;
  min-height:86px;
  padding:14px 15px;
  box-sizing:border-box;
  border:1px solid #dfe3e8;
  border-radius:12px;
  background:#fff;
  box-shadow:0 7px 20px rgba(31,38,46,.055);
}

#tracks.tracks-individual .tsl-profile-overall-rating>span{
  grid-area:label;
  color:#6f7985;
  font-size:10px;
  line-height:1.2;
  font-weight:950;
  letter-spacing:.095em;
}

#tracks.tracks-individual .tsl-profile-overall-rating>strong{
  grid-area:value;
  display:flex;
  width:58px;
  height:58px;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border:1px solid #dfe3e8;
  border-radius:14px;
  background:#f3f5f7;
  color:#171a1f;
  font-size:31px;
  line-height:1;
  font-weight:950;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.045em;
}

#tracks.tracks-individual .tsl-profile-overall-rating>small{
  grid-area:meta;
  margin-top:4px;
  color:#717b86;
  font-size:9px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.025em;
}

/* 90–100: red/pink – same family as Statistics. */
#tracks.tracks-individual .tsl-profile-overall-rating--100,
#tracks.tracks-individual .tsl-profile-overall-rating--90{
  border-color:#efc7d0;
}
#tracks.tracks-individual .tsl-profile-overall-rating--100>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--90>strong{
  border-color:#efc7d0;
  background:#fff1f4;
  color:#df2148;
}

/* 80–89: purple. */
#tracks.tracks-individual .tsl-profile-overall-rating--80{
  border-color:#d9d0f5;
}
#tracks.tracks-individual .tsl-profile-overall-rating--80>strong{
  border-color:#d9d0f5;
  background:#f6f2ff;
  color:#6247c6;
}

/* 70–79: blue. */
#tracks.tracks-individual .tsl-profile-overall-rating--70{
  border-color:#c9d9f1;
}
#tracks.tracks-individual .tsl-profile-overall-rating--70>strong{
  border-color:#c9d9f1;
  background:#f0f6ff;
  color:#315f9e;
}

/* 60–69: green. */
#tracks.tracks-individual .tsl-profile-overall-rating--60{
  border-color:#cce6dc;
}
#tracks.tracks-individual .tsl-profile-overall-rating--60>strong{
  border-color:#cce6dc;
  background:#effaf6;
  color:#257458;
}

/* Below 60 keeps the neutral Statistics base appearance. */
#tracks.tracks-individual .tsl-profile-overall-rating--50>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--40>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--30>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--20>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--10>strong,
#tracks.tracks-individual .tsl-profile-overall-rating--0>strong{
  border-color:#dfe3e8;
  background:#f3f5f7;
  color:#171a1f;
}

#tracks.tracks-individual .tsl-profile-overall-rating--tba>strong,
#tracks.tracks-individual .tsl-profile-overall-rating.is-unrated>strong{
  border-color:#e2e5e9;
  background:#f5f6f8;
  color:#8a929d;
  font-size:17px;
  letter-spacing:.02em;
}

/* Two stacked right-side rating cards need a little extra breathing room. */
@media (min-width:901px){
  #tracks.tracks-individual .tsl-profile-hero__content{
    min-height:222px;
  }
}

@media (max-width:900px){
  #tracks.tracks-individual .tsl-profile-overall-rating{
    position:static;
    width:205px;
    max-width:100%;
    margin:-7px 0 16px auto;
  }
}
