/* TrailLab v365 · coherencia tipográfica y dimensional.
   Última capa: convierte el kit de marca en una escala única y responsive. */
:root{
  --tl-font-display:'Bebas Neue','Saira Condensed',sans-serif;
  --tl-font-action:'Saira','Archivo',sans-serif;
  --tl-font-copy:'Archivo','Saira',sans-serif;
  --tl-type-hero:40px;
  --tl-type-view-title:var(--tl-type-section, 26px);
  --tl-type-section:26px;
  --tl-type-subsection:20px;
  --tl-type-card-title:16px;
  --tl-type-body:15px;
  --tl-type-button:var(--tl-type-body, 15px);
  --tl-type-subtitle:var(--tl-type-meta, 13px);
  --tl-type-meta:13px;
  --tl-type-stat:24px;
  --tl-type-kicker:12px;
  --tl-control-min:42px;
}

/* Jerarquía: un papel, una familia y un tamaño base. */
.view h1{
  font-family:var(--tl-font-display)!important;
  font-size:var(--tl-type-hero, 40px)!important;
  line-height:.96!important;
  letter-spacing:.035em!important;
}
.view h2{
  font-family:var(--tl-font-display)!important;
  font-size:var(--tl-type-section, 26px)!important;
  line-height:1.08!important;
  letter-spacing:.035em!important;
}
.view h3{
  font-family:var(--tl-font-display)!important;
  font-size:var(--tl-type-subsection, 20px)!important;
  line-height:1.15!important;
  letter-spacing:.025em!important;
}
.view h4,
.view [class*="card-title"],
.view [class*="card"]>header{
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-card-title, 16px)!important;
  line-height:1.25!important;
  font-weight:750!important;
}
.view p,
.view li,
.view dd,
.view blockquote{
  font-family:var(--tl-font-copy)!important;
  font-size:var(--tl-type-body, 15px)!important;
  line-height:1.5!important;
}
.view small,
.view label,
.view dt,
.view [class*="subtitle"],
.view [class*="subtitulo"]{
  font-family:var(--tl-font-copy)!important;
  font-size:var(--tl-type-subtitle)!important;
  line-height:1.4!important;
}
.view [class*="kicker"],
.view [class*="eyebrow"],
.view .agenda-kicker{
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-meta, 13px)!important;
  line-height:1.25!important;
  font-weight:850!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}

/* Titulares protagonistas conservan una escala mayor, pero siempre Bebas Neue. */
.view [class*="hero"] h1,
.view [class*="hero"] h2,
.hm-copy h2,
.pro313-copy h2,
.ach-main-copy h2{
  font-family:var(--tl-font-display)!important;
  font-size:var(--tl-type-hero, 40px)!important;
  line-height:.96!important;
}

/* Banderilla canónica: Logros, Historial, Calendario y el resto nacen idénticos. */
body :is(#view-resumen,#view-carreras,#view-logros,#view-agenda,#view-calendario,#view-atleta,#view-nutricion,#view-estado,#view-garmin,#view-coach,#view-rutas,#view-tienda,#view-pro,#view-historial,#view-tipos,#view-forma,#view-ayuda,#view-estadisticas,#view-perfil,#view-datos,#view-preferencias,#view-equipo,#view-amigos,#view-feed,#view-manada,#view-conexiones) .view-title,
#view-agenda .agenda-head-v233 h2,
#view-pro .pro313-title{
  display:inline-block!important;
  width:auto!important;
  min-width:min(270px,82vw)!important;
  min-height:50px!important;
  margin:0!important;
  padding:10px 46px 10px 18px!important;
  border:0!important;
  border-radius:0!important;
  clip-path:polygon(0 0,100% 0,calc(100% - 22px) 100%,0 100%)!important;
  background:var(--lime,#a6e82c)!important;
  color:#102007!important;
  font-family:var(--tl-font-display)!important;
  font-size:var(--tl-type-view-title)!important;
  font-weight:400!important;
  line-height:1!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  overflow-wrap:normal;
  box-sizing:border-box!important;
}
#view-pro .pro313-title{
  display:flex!important;
  align-items:center!important;
}
#view-pro .pro313-title i{
  margin-left:14px!important;
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-meta, 13px)!important;
  line-height:1.2!important;
  font-style:normal!important;
  font-weight:850!important;
}

/* Controles y navegación: Saira, legibles y con área táctil estable. */
button:not(.tbn-top),
input[type="button"],
input[type="submit"],
select,
.sync-btn,
.nav-item,
.nav-grp{
  font-family:var(--tl-font-action)!important;
}
button:not(.tbn-top):not([aria-label]),
input[type="button"],
input[type="submit"],
.sync-btn{
  min-height:var(--tl-control-min);
  font-size:var(--tl-type-button)!important;
  line-height:1.25!important;
  font-weight:750!important;
}
.left .nav-item,
.left .nav-grp{
  min-height:44px;
  font-size:var(--tl-type-button)!important;
  line-height:1.25!important;
}
.left .submenu .nav-item,
.left .nav-sub .nav-item,
.tbn-drop .nav-item{
  min-height:42px;
  font-size:var(--tl-type-subtitle)!important;
  line-height:1.3!important;
}
.tb-nav .tbn.has-sub>.tbn-top,
.tb-nav .tbn>.tbn-top[data-view="logros"],
.tb-nav .tbn>.tbn-top[data-view="agenda"]{
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-meta, 13px)!important;
  line-height:1.2!important;
}

/* Evita que una excepción histórica vuelva a encoger estas tres pantallas. */
#view-logros .view-title,
#view-historial .view-title,
#view-agenda .agenda-head-v233 h2{
  font-size:var(--tl-type-view-title)!important;
}

/* Texto destacado: un solo escalón sobre el cuerpo, no tamaños arbitrarios. */
.view .lead,
.view [class*="highlight"],
.view [class*="destacad"]{
  font-size:var(--tl-type-card-title, 16px)!important;
  line-height:1.45!important;
}

@media(max-width:760px){
  :root{
    --tl-type-hero:30px;
    --tl-type-view-title:var(--tl-type-section, 26px);
    --tl-type-section:22px;
    --tl-type-subsection:18px;
    --tl-type-stat:22px;
    --tl-type-card-title:15px;
    --tl-type-kicker:12px;
    --tl-type-body:15px;
    --tl-type-button:var(--tl-type-body, 15px);
    --tl-type-subtitle:var(--tl-type-meta, 13px);
    --tl-type-meta:13px;
    --tl-control-min:44px;
  }
  body :is(#view-resumen,#view-carreras,#view-logros,#view-agenda,#view-calendario,#view-atleta,#view-nutricion,#view-estado,#view-garmin,#view-coach,#view-rutas,#view-tienda,#view-pro,#view-historial,#view-tipos,#view-forma,#view-ayuda,#view-estadisticas,#view-perfil,#view-datos,#view-preferencias,#view-equipo,#view-amigos,#view-feed,#view-manada,#view-conexiones) .view-title,
  #view-agenda .agenda-head-v233 h2,
  #view-pro .pro313-title{
    min-width:min(250px,100%)!important;
    max-width:100%!important;
    min-height:46px!important;
    padding:10px 32px 10px 14px!important;
  }
  .left .nav-item,
  .left .nav-grp,
  .left .submenu .nav-item,
  .left .nav-sub .nav-item{
    min-height:46px;
  }
}

/* v367 · palabras separadas, navegación de una sola fila y tarjetas sin solapes. */
html body :is(#view-resumen,#view-carreras,#view-logros,#view-agenda,#view-calendario,#view-atleta,#view-nutricion,#view-estado,#view-garmin,#view-coach,#view-rutas,#view-tienda,#view-historial,#view-tipos,#view-forma,#view-ayuda,#view-estadisticas,#view-perfil,#view-datos,#view-preferencias,#view-equipo,#view-amigos,#view-feed,#view-manada,#view-conexiones) .view-title,
html body #view-agenda .agenda-head-v233 h2{
  display:inline-block!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
}
html body #view-pro .pro313-title{
  display:flex!important;
  align-items:center!important;
}

.tb-nav{
  min-width:0!important;
  flex-wrap:nowrap!important;
}
.tb-nav>.tbn{
  min-width:0!important;
  flex:0 1 auto!important;
}
.tb-nav .tbn-top{
  min-width:0!important;
  min-height:36px!important;
  padding:8px 4px!important;
  gap:4px!important;
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-kicker, 12px)!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.tb-nav .tbn-top>.ic{
  flex:0 0 14px!important;
  width:14px!important;
  height:14px!important;
  font-size:var(--tl-type-meta, 13px)!important;
}
.tb-nav .tbn-top>.tbn-car{
  margin:0!important;
  font-size:var(--tl-type-kicker, 12px)!important;
}
.tb-nav .tbn-top>span:not(.ic):not(.tbn-car){
  display:inline!important;
  font:inherit!important;
  white-space:nowrap!important;
}
.left .nav-item,
.left .nav-grp,
.left .nav-grp-body .nav-item,
.left .submenu .nav-item,
.left .nav-sub .nav-item{
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-button)!important;
  line-height:1.25!important;
  font-weight:750!important;
  white-space:nowrap!important;
}
.am279-sin .fifa-front{
  padding-top:42px!important;
}
.am279-sin .am279-tag{
  top:10px!important;
  max-width:calc(100% - 20px)!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

@media (min-width:761px) and (max-width:1500px){
  .topbar{
    gap:8px!important;
    padding-inline:12px!important;
  }
  .tb-idx{
    display:none!important;
  }
  .tb-nav{
    justify-content:space-between!important;
  }
}
@media (min-width:761px) and (max-width:1180px){
  .tb-logo .tl-stack{
    display:none!important;
  }
  .tb-logo{
    flex:0 0 44px!important;
    width:44px!important;
  }
  .tb-nav .tbn-top{
    padding-inline:3px!important;
    gap:3px!important;
    font-size:var(--tl-type-kicker, 12px)!important;
  }
  .tb-nav .tbn-top>.ic{
    flex-basis:13px!important;
    width:13px!important;
    height:13px!important;
    font-size:var(--tl-type-meta, 13px)!important;
  }
}

/* v367 · especificidad final frente a excepciones históricas del encabezado. */
html body main section.view:is(#view-resumen,#view-carreras,#view-logros,#view-agenda,#view-calendario,#view-atleta,#view-nutricion,#view-estado,#view-garmin,#view-coach,#view-rutas,#view-tienda,#view-historial,#view-tipos,#view-forma,#view-ayuda,#view-estadisticas,#view-perfil,#view-datos,#view-preferencias,#view-equipo,#view-amigos,#view-feed,#view-manada,#view-conexiones) .view-title,
html body main section.view#view-agenda .agenda-head-v233 h2{
  display:inline-block!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
}
html body main section.view#view-pro .pro313-title{
  display:flex!important;
  align-items:center!important;
}
html body .topbar nav#tbNav{
  min-width:0!important;
  flex-wrap:nowrap!important;
}
html body .topbar nav#tbNav>.tbn{
  min-width:0!important;
  flex:0 1 auto!important;
}
html body .topbar nav#tbNav>.tbn>button.tbn-top{
  min-width:0!important;
  min-height:36px!important;
  padding:8px 4px!important;
  gap:4px!important;
  font-family:var(--tl-font-action)!important;
  font-size:var(--tl-type-kicker, 12px)!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
html body .topbar nav#tbNav>.tbn>button.tbn-top>.ic{
  display:grid!important;
  flex:0 0 14px!important;
  width:14px!important;
  height:14px!important;
  font-size:var(--tl-type-meta, 13px)!important;
}
html body .topbar nav#tbNav>.tbn>button.tbn-top>.tbn-car{
  display:block!important;
  margin:0!important;
  font-size:var(--tl-type-kicker, 12px)!important;
}
html body .topbar nav#tbNav>.tbn>button.tbn-top>span:not(.ic):not(.tbn-car){
  display:inline!important;
  font:inherit!important;
  white-space:nowrap!important;
}
@media (min-width:761px) and (max-width:1180px){
  html body .topbar nav#tbNav>.tbn>button.tbn-top{
    padding-inline:3px!important;
    gap:3px!important;
    font-size:var(--tl-type-kicker, 12px)!important;
  }
  html body .topbar nav#tbNav>.tbn>button.tbn-top>.ic{
    flex-basis:13px!important;
    width:13px!important;
    height:13px!important;
    font-size:var(--tl-type-meta, 13px)!important;
  }
}

html body .topbar nav#tbNav>.tbn.tl-primary-v335{
  width:auto!important;
  flex-basis:auto!important;
}
html body .topbar nav#tbNav>.tbn.tl-primary-v335>button.tbn-top{
  width:auto!important;
  flex-basis:auto!important;
}

/* v424 · Paso 1: ocho tamaños, sin alterar colores ni navegación. */
.view [class*="kicker"],.view [class*="eyebrow"],.view .agenda-kicker{font-size:var(--tl-type-kicker, 12px)!important}

/* Runtime feed note is injected later: keep its metadata on the shared scale. */
body .feed-v280 .fd-follow-note{font-size:var(--tl-type-meta, 13px)!important}

/* Graph families render at their measured container width (v257/v258).
   CSS overrides legacy presentation attributes without changing samples or geometry. */
html body svg.chart-svg text,html body svg.st-svg text{font-size:var(--tl-type-meta, 13px)!important}

/* v433 · Mobile sizing only; retain desktop rules and structural breakpoints. */
@layer tl-mobile-sizing {
 @media(max-width:760px){
  /* Both faces contribute their content height; retain the existing flip. */
  #view-carreras .race-flip-card{height:auto!important;min-height:0!important;}
  #view-carreras .race-flip-inner{display:grid!important;height:auto!important;min-height:0!important;}
  #view-carreras .race-face{position:relative!important;grid-area:1/1!important;height:auto!important;min-height:0!important;}
  #view-carreras :is(.tl-race-intel-note-v334>*,.race-back-note,.race-track-official-v331 span,.race-track-official-v331 a,.tl-race-profile-head-v332 em){font-size:var(--tl-type-kicker)!important;}
  /* Grid items must be allowed to shrink below their intrinsic text width. */
  #view-carreras :is(.race-hub,.race-hub>*,.race-summary>*,.race-registry>*,.race-hub-copy,.race-card-title,.race-back-grid>*){min-width:0!important;max-width:100%!important;overflow-wrap:anywhere;}
  #view-carreras :is(.race-face,.race-hub-hero){padding:14px!important;box-sizing:border-box!important;}
  #view-carreras :is(.race-card-date,.race-card-metrics>*,.race-card-actions>a){min-width:0;max-width:100%;overflow-wrap:anywhere;}
  #view-carreras .race-summary-card{padding:12px 4px!important;}
  #view-carreras .race-summary-card small{letter-spacing:normal!important;text-transform:none!important;}
  :is(.gate-card,.hs-card,.ts-type-card,.mn-comp-v295){padding:14px!important;}
  :is(.save-btn,.btn-prim,.btn-ghost,[data-tl-action],.race-card-actions a,.race-card-actions button,.race-subnav button){box-sizing:border-box!important;min-height:44px!important;padding:4px 12px!important;}
 }
}

html[data-theme="light"]{--amber-ink:#8a6a00;}
