/* BPF 12.5.12.47.34.16.2.1 — Perpetual Trainer Final Desktop + Mobile Polish — STAGING ONLY
   Presentation only. Tightens spacing, mobile navigation, action hierarchy and bottom-nav clearance.
   No training authority, personal-insight thresholds, storage, continuity or recommendation logic changes. */

:root{
  --pt1821-line:rgba(126,184,229,.15);
  --pt1821-muted:#a9bbc8;
}

/* Slightly calmer global geometry without losing the Train-for-Today visual identity. */
.pt7-top,.pt-top{
  min-height:76px!important;
  padding-top:16px!important;
  padding-bottom:16px!important;
}
.pt7-brand,.pt-brand{gap:10px!important}
.pt7-nav,.pt-topnav{gap:7px!important}
.pt7-nav a,.pt-topnav a{min-width:84px!important}

/* Static summary pages: less empty height, same premium hierarchy. */
body.pt-hub .pt-hero{
  min-height:280px!important;
  padding:clamp(28px,4.5vw,44px)!important;
}
body.pt-hub .pt-hero p{max-width:62ch!important}
body.pt-hub .pt-hero-actions{margin-top:22px!important}
body.pt-hub .pt-section-head{padding:20px 22px!important}
body.pt-hub .pt-body{padding:22px!important}
.pt16-summary-card{min-height:138px!important;padding:16px!important}
.pt16-summary-card p{margin-top:8px!important}
.pt16-page-details{margin-top:14px!important}

/* Session gates: strong primary route, deliberately quiet escape hatch. */
.pt8-session-card.pt18-blocked,.pt8-session-card.pt18-ready{
  min-height:260px!important;
  padding-top:24px!important;
  padding-bottom:24px!important;
}
.pt8-session-card .pt8-actions{align-items:stretch!important}
.pt8-session-card .pt8-actions a:first-child,
.pt8-session-card .pt8-actions button:first-child{min-width:260px!important}
.pt8-session-card .pt8-actions a:nth-child(2),
.pt8-session-card .pt8-actions button:nth-child(2){
  background:rgba(255,255,255,.018)!important;
  border-color:rgba(126,184,229,.13)!important;
  color:#a9bbc8!important;
  box-shadow:none!important;
}

/* Fixed global bottom navigation should never cover the final useful content. */
html{scroll-padding-bottom:120px!important}
.pt7-main,
body.pt-hub .pt-shell,
body:not(.pt-hub) .pt-shell{
  padding-bottom:max(112px,calc(env(safe-area-inset-bottom,0px) + 96px))!important;
}

/* Small-screen cleanup: three destinations stay three equal destinations. */
@media(max-width:720px){
  .pt7-top,.pt-top{
    min-height:0!important;
    gap:10px!important;
    padding-top:max(13px,calc(env(safe-area-inset-top,0px) + 9px))!important;
    padding-bottom:12px!important;
  }
  .pt7-brand,.pt-brand{min-height:44px!important}
  .pt7-nav,.pt-topnav{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .pt7-nav a,.pt-topnav a{
    min-width:0!important;
    min-height:42px!important;
    padding:7px 4px!important;
    font-size:11px!important;
  }
  body.pt-hub .pt-hero{
    min-height:0!important;
    padding:24px 17px!important;
    margin-top:14px!important;
    border-radius:20px!important;
  }
  body.pt-hub .pt-hero h1,
  body:not(.pt-hub) .pt-hero h1{
    font-size:clamp(44px,13vw,60px)!important;
    line-height:.9!important;
  }
  body.pt-hub .pt-hero p,
  body:not(.pt-hub) .pt-hero p{font-size:15px!important;line-height:1.48!important}
  .pt-hero-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:18px!important;
  }
  .pt-hero-actions .pt-btn{width:100%!important;min-height:46px!important}
  body.pt-hub .pt-section{border-radius:18px!important;margin-top:14px!important}
  body.pt-hub .pt-section-head{padding:17px 16px!important;gap:8px!important}
  body.pt-hub .pt-section-head h2{font-size:30px!important}
  body.pt-hub .pt-section-head p{font-size:12px!important;max-width:58ch!important}
  body.pt-hub .pt-body{padding:16px!important}
  .pt16-summary-card{min-height:0!important;padding:15px!important}
  .pt16-summary-card strong{font-size:27px!important}
  .pt8-session-card.pt18-blocked,.pt8-session-card.pt18-ready{min-height:0!important}
  .pt8-session-card .pt8-actions a:first-child,
  .pt8-session-card .pt8-actions button:first-child{min-width:0!important}
  .pt16-page-details{margin-bottom:max(112px,calc(env(safe-area-inset-bottom,0px) + 96px))!important}
}

@media(max-width:460px){
  /* Keep the identity compact enough that navigation stays visible above the fold. */
  .pt-brand>span:last-child>span,
  .pt7-brand>.pt17-brand-copy small{display:none!important}
  .pt7-brand strong,.pt-brand strong{font-size:18px!important;line-height:1!important}
  .pt7-brand>span:first-child,.pt-mark{width:40px!important;height:40px!important;flex-basis:40px!important;border-radius:12px!important}
  .pt7-nav,.pt-topnav{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .pt7-nav a,.pt-topnav a{font-size:10.5px!important;letter-spacing:0!important}
  body.pt-hub .pt-hero h1,body:not(.pt-hub) .pt-hero h1{font-size:clamp(40px,12.5vw,54px)!important}
}
