/* FRÍ Hlauparar v1.20.29 — Product surface system.
 * Deliberately isolated after fri-finish.css so the visual refresh can be
 * reverted without changing history, scores, API work or WordPress routing.
 * Four decisions: off-white canvas; white elevated content; calm grouping;
 * responsive type with no clipping. No imported fonts, images or JS effects.
 */

:where(.fri-tp-product-shell){
  --fri-surface-canvas:#f8faff;
  --fri-surface-panel:#f4f7fc;
  --fri-surface-card:#fff;
  --fri-surface-line:#dfe7f2;
  --fri-surface-ink:#17253c;
  --fri-surface-muted:#5d6b80;
  --fri-surface-shadow:0 5px 18px rgba(23,42,80,.045),0 1px 2px rgba(23,42,80,.025);
  --fri-surface-shadow-raised:0 15px 36px rgba(23,42,80,.085),0 2px 7px rgba(23,42,80,.035);
  --fri-surface-radius:21px;
}

/* The whole page should not be white-on-white. Keep the background almost
 * neutral and let individual content surfaces define the visual hierarchy. */
body.fri-tp-standalone{
  background:linear-gradient(180deg,#fbfcff 0%,#f6f8fc 480px,#f8faff 100%)!important;
}
body.fri-tp-standalone :is(.fri-tp-shell-main,.fri-tp-product-shell){
  background:transparent!important;
}

/* ----- Athlete hero: photo overlaps the card but never crowds the name. ----- */
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-head.fri-tp-profile-hero-card{
  border-color:var(--fri-surface-line)!important;
  border-radius:27px!important;
  background:linear-gradient(165deg,#fff 0%,#fff 56%,#fbfcff 100%)!important;
  box-shadow:0 13px 36px rgba(23,42,80,.065),0 2px 7px rgba(23,42,80,.025)!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-avatar{
  z-index:7!important;
  border:5px solid #fff!important;
  border-radius:50%!important;
  background:#f6f8fc!important;
  box-shadow:0 0 0 1px #dce5f1,0 10px 26px rgba(22,43,83,.13)!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-avatar-image{
  border-radius:50%!important;
  object-fit:cover!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-image-request{
  z-index:9!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-avatar-upload-popover > summary,
.fri-tp-app.fri-tp-product-shell .fri-tp-avatar-upload-trigger{
  min-width:40px!important;width:40px!important;height:40px!important;
  min-height:40px!important;
  border:3px solid #fff!important;
  box-shadow:0 5px 16px rgba(0,59,203,.23)!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-identity{
  min-width:0!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card [data-fri-tp-athlete-name]{
  margin:0 auto .7rem!important;
  max-width:100%!important;
  font-size:clamp(1.75rem,4vw,2.8rem)!important;
  line-height:1.10!important;
  letter-spacing:-.045em!important;
  overflow-wrap:break-word!important;
  text-wrap:balance;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-subline{
  margin-block:.15rem .2rem!important;
  row-gap:.22rem!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:.45rem;
  min-height:0;
  margin:.45rem 0 .4rem;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges:empty{display:none!important}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges .fri-tp-record-profile-meta-link{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:40px!important;
  margin:0!important;padding:.34rem .75rem!important;
  border:1px solid #dce6fa!important;border-radius:999px!important;
  background:#f0f5ff!important;color:#0041c3!important;
  font-size:.75rem!important;line-height:1.25!important;font-weight:700!important;
  text-decoration:none!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges .fri-tp-record-profile-meta-link:hover{
  border-color:#b8cdf4!important;background:#e8f0ff!important;
}
@media(min-width:1040px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-head.fri-tp-profile-hero-card .fri-tp-profile-identity{
    padding-top:4.65rem!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card [data-fri-tp-athlete-name]{
    font-size:clamp(2rem,3vw,2.85rem)!important;
  }
}
@media(min-width:761px) and (max-width:1039px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-identity{
    padding-top:1.75rem!important;
  }
}
@media(max-width:760px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-head.fri-tp-profile-hero-card{
    padding:4.8rem clamp(.85rem,4vw,1.2rem) 1.15rem!important;
    border-top-color:transparent!important;
    border-radius:25px!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-avatar{
    width:104px!important;height:104px!important;
    top:0!important;left:50%!important;
    transform:translate(-50%,-50%)!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-image-request{
    top:31px!important;left:calc(50% + 37px)!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card [data-fri-tp-athlete-name]{
    font-size:clamp(1.73rem,7vw,2.45rem)!important;
    line-height:1.11!important;
    margin-bottom:.62rem!important;
    max-width:100%!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:auto;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-subline{
    margin:.25rem auto .3rem!important;
    gap:.2rem .32rem!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges{margin:.42rem 0 .35rem}
}
@media(max-width:350px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card [data-fri-tp-athlete-name]{
    font-size:clamp(1.6rem,7.3vw,1.88rem)!important;
  }
}

/* ----- The metric panel uses icons once, not scattered throughout results. ----- */
.fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-summary-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  box-sizing:border-box!important;
  width:100%!important;
  overflow:hidden!important;
  border:1px solid var(--fri-surface-line)!important;
  border-radius:21px!important;
  background:linear-gradient(160deg,#fff,#fbfcff)!important;
  box-shadow:var(--fri-surface-shadow)!important;
  padding:0!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-summary-grid .fri-tp-summary-card{
  min-width:0!important;
  min-height:88px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:clamp(.45rem,1.25vw,.85rem)!important;
  padding:clamp(.65rem,1.3vw,1.05rem)!important;
  border:0!important;
  border-right:1px solid #e6ebf4!important;
  background:transparent!important;
  box-shadow:none!important;
  text-align:left!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-grid .fri-tp-summary-card:last-child{border-right:0!important}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-icon{
  flex:0 0 39px!important;
  width:39px!important;height:39px!important;
  display:inline-grid!important;place-items:center!important;
  padding:0!important;
  border:1px solid #e5ecfc!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#f0f5ff,#eaf0fd)!important;
  color:#3159a9!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-icon svg{
  display:block;width:21px;height:21px;stroke:currentColor;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-content{
  display:flex;flex-direction:column;gap:.2rem;min-width:0;flex:1;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-content strong{
  min-width:0!important;
  max-width:100%!important;
  font-size:clamp(.94rem,1.4vw,1.3rem)!important;
  line-height:1.25!important;
  letter-spacing:-.035em!important;
  color:var(--fri-surface-ink)!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-summary-content span{
  margin:0!important;
  line-height:1.35!important;
  font-size:.72rem!important;
  color:var(--fri-surface-muted)!important;
}
@media(max-width:900px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-grid .fri-tp-summary-card:nth-child(2n){border-right:0!important}
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-grid .fri-tp-summary-card:nth-child(n+3){border-top:1px solid #e6ebf4!important}
}
@media(max-width:420px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-summary-grid .fri-tp-summary-card{
    gap:.45rem!important;padding:.7rem .52rem!important;min-height:87px!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-icon{
    width:33px!important;height:33px!important;flex-basis:33px!important;
    border-radius:10px!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-icon svg{width:18px;height:18px}
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-content strong{font-size:clamp(.81rem,3.5vw,1rem)!important}
  .fri-tp-app.fri-tp-product-shell .fri-tp-summary-content span{font-size:.66rem!important}
}

/* ----- Give the overview sections a common edge and vertical spacing. ----- */
.fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-section{
  border:0!important;
  padding:0!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-section .fri-tp-section-head{
  margin-bottom:clamp(.75rem,1.2vw,1rem)!important;
}
.fri-tp-product-shell :is(.fri-tp-section-head h2,.fri-tp-section-head h3,.fri-tp-hub-section h2,.fri-tp-history-panel h3){
  max-width:100%;
  font-size:clamp(1.45rem,2.6vw,2rem)!important;
  line-height:1.12!important;
  letter-spacing:-.045em!important;
  overflow-wrap:break-word;
  text-wrap:balance;
}
.fri-tp-product-shell :is(.fri-tp-section-head,.fri-tp-profile-records-head){min-width:0!important}
.fri-tp-product-shell :is(.fri-tp-section-head,.fri-tp-hub-section-head) > div{min-width:0!important}
.fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] > .fri-tp-section + .fri-tp-section{
  margin-top:clamp(1.25rem,3vw,2rem)!important;
}
@media(max-width:760px){
  .fri-tp-product-shell :is(.fri-tp-section-head h2,.fri-tp-section-head h3,.fri-tp-hub-section h2,.fri-tp-history-panel h3){
    font-size:clamp(1.47rem,6vw,2rem)!important;
  }
  .fri-tp-product-shell .fri-tp-section-head{
    gap:.5rem!important;flex-wrap:wrap!important;
  }
  .fri-tp-product-shell .fri-tp-section-head :is(a,button){max-width:100%!important}
}

/* ----- A single surface elevation scale across the existing card families. ----- */
.fri-tp-product-shell :is(
  .fri-tp-recent-result,
  .fri-tp-pb,
  .fri-tp-trail-result-card,
  .fri-tp-hub-race-card,
  .fri-tp-featured-race,
  .fri-tp-directory-card,
  .fri-tp-hub-record-card,
  .fri-tp-search-card,
  .fri-tp-race-highlight-card,
  .fri-tp-race-page-head,
  .fri-tp-community-card
){
  border-color:#dce5f1!important;
  border-radius:var(--fri-surface-radius)!important;
  background-color:#fff!important;
  box-shadow:var(--fri-surface-shadow)!important;
  min-width:0!important;
}
/* Keep the curved blue/red/green category accent from v1.20.28 intact. */
.fri-tp-product-shell :is(.fri-tp-recent-result,.fri-tp-pb,.fri-tp-trail-result-card){
  background-image:linear-gradient(155deg,#fff,#fdfdff)!important;
}
.fri-tp-product-shell :is(
  .fri-tp-recent-result-time,.fri-tp-pb-time,.fri-tp-trail-result-time,
  .fri-tp-hub-record-card > strong,
  .fri-tp-race-highlight-card strong
){
  font-variant-numeric:tabular-nums!important;
  letter-spacing:-.045em!important;
  line-height:1.1!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
.fri-tp-product-shell :is(.fri-tp-hub-record-card > strong,.fri-tp-profile-record-mark strong){
  font-size:clamp(1.17rem,2.7vw,1.9rem)!important;
  line-height:1.14!important;
  letter-spacing:-.035em!important;
  font-variant-numeric:tabular-nums!important;
  overflow-wrap:anywhere!important;
}
/* The profile records are a contiguous list, not independent rounded cards. */
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-record-row{
  min-width:0!important;
  gap:.55rem!important;
}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-record-event{min-width:0!important}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-record-event strong{overflow-wrap:anywhere!important}
.fri-tp-app.fri-tp-product-shell .fri-tp-profile-record-mark{min-width:0!important;text-align:right!important}
.fri-tp-product-shell :is(.fri-tp-hub-record-card,.fri-tp-profile-record-row) sup{
  font-size:.53em!important;vertical-align:super!important;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  .fri-tp-product-shell :is(.fri-tp-recent-result,.fri-tp-pb,.fri-tp-trail-result-card,.fri-tp-hub-race-card,.fri-tp-directory-card,.fri-tp-search-card,.fri-tp-featured-race):hover{
    border-color:#bdcde6!important;
    box-shadow:var(--fri-surface-shadow-raised)!important;
    transform:translateY(-2px);
  }
}
@media(max-width:760px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] :is(.fri-tp-recent-result,.fri-tp-pb,.fri-tp-trail-result-card){
    border-radius:19px!important;
    min-height:188px!important;
    height:auto!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-tab-panel[data-fri-tp-panel="overview"] :is(.fri-tp-recent-result-time,.fri-tp-pb-time,.fri-tp-trail-result-time){
    font-size:clamp(1.38rem,5.9vw,1.65rem)!important;
  }
}

/* Filters are controls, with just enough contrast to distinguish selection. */
.fri-tp-product-shell :is(.fri-tp-best-performance-tabs,.fri-tp-profile-record-segmented,.fri-tp-tabs){
  border-color:#e0e7f1!important;
  background-color:#f0f4f9!important;
}
.fri-tp-product-shell :is(.fri-tp-best-performance-tabs button.is-active,.fri-tp-profile-record-segmented button.is-active,.fri-tp-tabs button.is-active){
  background:#fff!important;
  box-shadow:0 2px 8px rgba(30,51,89,.065)!important;
}
.fri-tp-product-shell :is(.fri-tp-running-groups-invite,.fri-tp-race-participation-strip){
  border-color:#e0e9f7!important;
  background:#f2f6fc!important;
}

/* Larger text and short viewports are allowed to reflow rather than clip. */
@media(max-width:350px){
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-hero-card .fri-tp-profile-subline{
    flex-wrap:wrap!important;
  }
  .fri-tp-app.fri-tp-product-shell .fri-tp-profile-badges .fri-tp-record-profile-meta-link{
    font-size:.7rem!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .fri-tp-product-shell :is(.fri-tp-recent-result,.fri-tp-pb,.fri-tp-trail-result-card,.fri-tp-hub-race-card,.fri-tp-directory-card,.fri-tp-search-card,.fri-tp-featured-race){
    transition:none!important;transform:none!important;
  }
}
@media(forced-colors:active){
  .fri-tp-product-shell :is(.fri-tp-recent-result,.fri-tp-pb,.fri-tp-trail-result-card,.fri-tp-hub-record-card,.fri-tp-summary-grid){
    border:1px solid CanvasText!important;
  }
}
