/*
  GritHQ Component Theme v1 — Alpha4.53
  -------------------------------------
  Visual only. No positioning/layout ownership.

  Semantic baseline:
    primary / overview / training = blue
    calisthenics                 = blue
    strength                     = cyan
    cardio / recovery            = green
    hybrid / coach               = purple
    equipment                    = amber
    goals                        = rose
    injury / limitations         = green

  The same semantic category keeps the same accent everywhere.
*/
:root {
  --gh-blue:#2f8cff;
  --gh-blue-rgb:47,140,255;
  --gh-cyan:#22d7ea;
  --gh-cyan-rgb:34,215,234;
  --gh-green:#72e941;
  --gh-green-rgb:114,233,65;
  --gh-purple:#a869ff;
  --gh-purple-rgb:168,105,255;
  --gh-amber:#f2ba38;
  --gh-amber-rgb:242,186,56;
  --gh-rose:#ff5e72;
  --gh-rose-rgb:255,94,114;
}

/* Shared "button family" baseline:
   dark card, crisp outline, icon tile, semantic accent. */
.gh-mode-card,
.progress-area-tab,
.gh-profile-row,
.gh-profile-quick {
  transition:border-color .16s ease, background .16s ease,
             box-shadow .16s ease, transform .12s ease!important;
}

/* HOME: restore category identity instead of all-blue icons. */
.gh-mode-card .gh-mode-icon {
  border:1px solid rgba(255,255,255,.08)!important;
}
.gh-mode-card.calisthenics .gh-mode-icon {
  color:var(--gh-blue)!important;
  background:rgba(var(--gh-blue-rgb),.10)!important;
  border-color:rgba(var(--gh-blue-rgb),.34)!important;
}
.gh-mode-card.strength .gh-mode-icon {
  color:var(--gh-cyan)!important;
  background:rgba(var(--gh-cyan-rgb),.09)!important;
  border-color:rgba(var(--gh-cyan-rgb),.32)!important;
}
.gh-mode-card.cardio .gh-mode-icon {
  color:var(--gh-green)!important;
  background:rgba(var(--gh-green-rgb),.09)!important;
  border-color:rgba(var(--gh-green-rgb),.31)!important;
}
.gh-mode-card.calisthenics { border-color:rgba(var(--gh-blue-rgb),.22)!important; }
.gh-mode-card.strength { border-color:rgba(var(--gh-cyan-rgb),.20)!important; }
.gh-mode-card.cardio { border-color:rgba(var(--gh-green-rgb),.19)!important; }

/* TRAIN lane selector: one canonical palette. */
.gh-lane-switch.calisthenics .gh-lane-switch-icon { color:var(--gh-blue)!important; }
.gh-lane-switch.strength .gh-lane-switch-icon { color:var(--gh-cyan)!important; }
.gh-lane-switch.cardio .gh-lane-switch-icon { color:var(--gh-green)!important; }
.gh-lane-switch.hybrid .gh-lane-switch-icon { color:var(--gh-purple)!important; }

/* PROGRESS: same component family as the training selectors.
   Inactive tabs keep their category accent; active tab receives a
   matching tinted selection instead of forcing every lane to blue. */
#view-history .progress-area-tabs {
  background:#07131e!important;
  border:1px solid var(--gh-card-border,rgba(80,115,148,.35))!important;
  border-radius:14px!important;
  padding:5px!important;
  gap:5px!important;
}
#view-history .progress-area-tab {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:46px!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  background:transparent!important;
  color:#a6b4c3!important;
  box-shadow:none!important;
}
#view-history .progress-area-tab-icon {
  display:grid!important;
  place-items:center!important;
  width:20px!important;
  height:20px!important;
}
#view-history .progress-area-tab-icon svg {
  width:17px!important;
  height:17px!important;
  stroke:currentColor!important;
}

#view-history .progress-area-tab[data-progress-area="overview"] .progress-area-tab-icon {
  color:var(--gh-purple)!important;
}
#view-history .progress-area-tab[data-progress-area="calisthenics"] .progress-area-tab-icon {
  color:var(--gh-blue)!important;
}
#view-history .progress-area-tab[data-progress-area="strength"] .progress-area-tab-icon {
  color:var(--gh-cyan)!important;
}
#view-history .progress-area-tab[data-progress-area="cardio"] .progress-area-tab-icon {
  color:var(--gh-green)!important;
}

#view-history .progress-area-tab[data-progress-area="overview"].active {
  color:#fff!important;
  border-color:rgba(var(--gh-purple-rgb),.58)!important;
  background:linear-gradient(145deg,rgba(102,68,184,.96),rgba(143,82,226,.95))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 6px 18px rgba(var(--gh-purple-rgb),.14)!important;
}
#view-history .progress-area-tab[data-progress-area="calisthenics"].active {
  color:#fff!important;
  border-color:rgba(var(--gh-blue-rgb),.65)!important;
  background:linear-gradient(145deg,rgba(36,107,223,.96),rgba(15,140,255,.96))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 6px 18px rgba(var(--gh-blue-rgb),.15)!important;
}
#view-history .progress-area-tab[data-progress-area="strength"].active {
  color:#eaffff!important;
  border-color:rgba(var(--gh-cyan-rgb),.56)!important;
  background:linear-gradient(145deg,rgba(15,98,132,.95),rgba(14,157,181,.94))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07),0 6px 18px rgba(var(--gh-cyan-rgb),.12)!important;
}
#view-history .progress-area-tab[data-progress-area="cardio"].active {
  color:#f4fff0!important;
  border-color:rgba(var(--gh-green-rgb),.52)!important;
  background:linear-gradient(145deg,rgba(34,110,59,.96),rgba(54,151,70,.94))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07),0 6px 18px rgba(var(--gh-green-rgb),.11)!important;
}
#view-history .progress-area-tab.active .progress-area-tab-icon {
  color:currentColor!important;
}

/* PROFILE: restore the semantic colors that were lost in Alpha4.52,
   but keep one consistent card/tile construction. */
.gh-profile-row,
.gh-profile-quick {
  background:linear-gradient(145deg,var(--panel-2),var(--panel))!important;
  border-color:var(--line)!important;
}
.gh-profile-row-icon,
.gh-profile-quick>span {
  border:1px solid rgba(255,255,255,.07)!important;
}

.gh-profile-row-icon.training {
  color:var(--gh-blue)!important;
  background:rgba(var(--gh-blue-rgb),.10)!important;
  border-color:rgba(var(--gh-blue-rgb),.30)!important;
}
.gh-profile-row-icon.equipment {
  color:var(--gh-amber)!important;
  background:rgba(var(--gh-amber-rgb),.09)!important;
  border-color:rgba(var(--gh-amber-rgb),.28)!important;
}
.gh-profile-row-icon.goals {
  color:var(--gh-rose)!important;
  background:rgba(var(--gh-rose-rgb),.09)!important;
  border-color:rgba(var(--gh-rose-rgb),.27)!important;
}
.gh-profile-row-icon.injury {
  color:var(--gh-green)!important;
  background:rgba(var(--gh-green-rgb),.09)!important;
  border-color:rgba(var(--gh-green-rgb),.27)!important;
}

.gh-profile-quick.coach>span {
  color:var(--gh-purple)!important;
  background:rgba(var(--gh-purple-rgb),.10)!important;
  border-color:rgba(var(--gh-purple-rgb),.29)!important;
}
.gh-profile-quick.health>span {
  color:var(--gh-green)!important;
  background:rgba(var(--gh-green-rgb),.09)!important;
  border-color:rgba(var(--gh-green-rgb),.27)!important;
}
.gh-profile-quick.settings>span {
  color:var(--gh-cyan)!important;
  background:rgba(var(--gh-cyan-rgb),.09)!important;
  border-color:rgba(var(--gh-cyan-rgb),.27)!important;
}

/* Keep the colored identity visible in the card perimeter too, subtly. */
.gh-profile-row:has(.gh-profile-row-icon.training) { border-color:rgba(var(--gh-blue-rgb),.20)!important; }
.gh-profile-row:has(.gh-profile-row-icon.equipment) { border-color:rgba(var(--gh-amber-rgb),.18)!important; }
.gh-profile-row:has(.gh-profile-row-icon.goals) { border-color:rgba(var(--gh-rose-rgb),.17)!important; }
.gh-profile-row:has(.gh-profile-row-icon.injury) { border-color:rgba(var(--gh-green-rgb),.18)!important; }
.gh-profile-quick.coach { border-color:rgba(var(--gh-purple-rgb),.18)!important; }
.gh-profile-quick.health { border-color:rgba(var(--gh-green-rgb),.18)!important; }
.gh-profile-quick.settings { border-color:rgba(var(--gh-cyan-rgb),.18)!important; }

/* Search/section pages inherit semantic blue only as the neutral action color;
   their category identity remains on selected content. */
.profile-search-result>span:first-child,
.profile-choice-row>span svg {
  color:var(--gh-blue)!important;
  stroke:currentColor!important;
}

/* Alpha4.62 shared PrimaryDock polish.
   Color communicates destination identity without changing shell layout:
   Home = blue, Train = cyan, Progress = green, Profile = purple.
   Inactive states stay restrained; only the selected destination receives
   a tinted surface and stronger glow. */
.bottom-nav .nav-btn[data-view="home"] {
  --gh-dock-accent:var(--gh-blue);
  --gh-dock-accent-rgb:var(--gh-blue-rgb);
}
.bottom-nav .nav-btn[data-view="routines"] {
  --gh-dock-accent:var(--gh-cyan);
  --gh-dock-accent-rgb:var(--gh-cyan-rgb);
}
.bottom-nav .nav-btn[data-view="history"] {
  --gh-dock-accent:var(--gh-green);
  --gh-dock-accent-rgb:var(--gh-green-rgb);
}
.bottom-nav .nav-btn[data-view="profile"] {
  --gh-dock-accent:var(--gh-purple);
  --gh-dock-accent-rgb:var(--gh-purple-rgb);
}
.bottom-nav .nav-btn {
  color:rgba(var(--gh-dock-accent-rgb),.68)!important;
  background:linear-gradient(180deg,rgba(var(--gh-dock-accent-rgb),.025),rgba(var(--gh-dock-accent-rgb),.01))!important;
  box-shadow:none!important;
}
.bottom-nav .nav-btn svg {
  opacity:.94;
}
.bottom-nav .nav-btn small {
  color:currentColor!important;
}
.bottom-nav .nav-btn.active {
  color:var(--gh-dock-accent)!important;
  background:linear-gradient(160deg,rgba(var(--gh-dock-accent-rgb),.18),rgba(var(--gh-dock-accent-rgb),.075))!important;
  box-shadow:inset 0 0 0 1px rgba(var(--gh-dock-accent-rgb),.30),0 5px 15px rgba(var(--gh-dock-accent-rgb),.08)!important;
}
.bottom-nav .nav-btn.active svg {
  opacity:1;
  filter:drop-shadow(0 0 5px rgba(var(--gh-dock-accent-rgb),.18));
}


/* =====================================================================
   Alpha4.65 — Canonical Training Mode Control + Readability Guard
   One semantic control language across Home / Train / Progress.
   Selection is communicated by a blue perimeter/indicator, never by
   painting over the semantic icon/label color.
   ===================================================================== */
.gh-training-mode-control.calisthenics{--gh-mode-accent:var(--gh-blue);--gh-mode-accent-rgb:var(--gh-blue-rgb)}
.gh-training-mode-control.strength{--gh-mode-accent:var(--gh-cyan);--gh-mode-accent-rgb:var(--gh-cyan-rgb)}
.gh-training-mode-control.cardio{--gh-mode-accent:var(--gh-green);--gh-mode-accent-rgb:var(--gh-green-rgb)}
.gh-training-mode-control.hybrid{--gh-mode-accent:var(--gh-purple);--gh-mode-accent-rgb:var(--gh-purple-rgb)}
.gh-training-mode-control.overview{--gh-mode-accent:#b892ff;--gh-mode-accent-rgb:184,146,255}

.gh-training-mode-control{
  position:relative!important;
  overflow:visible!important;
  border:1px solid rgba(var(--gh-mode-accent-rgb),.26)!important;
  background:linear-gradient(155deg,rgba(var(--gh-mode-accent-rgb),.045),#07121d 72%)!important;
  color:#eaf1f8!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.gh-training-mode-control .gh-training-mode-control-icon{
  display:grid!important;
  place-items:center!important;
  flex:0 0 auto!important;
  color:var(--gh-mode-accent)!important;
  background:rgba(var(--gh-mode-accent-rgb),.105)!important;
  border:1px solid rgba(var(--gh-mode-accent-rgb),.42)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
.gh-training-mode-control .gh-training-mode-control-icon svg{
  color:inherit!important;
  stroke:currentColor!important;
  opacity:1!important;
}
.gh-training-mode-control .gh-training-mode-control-copy{
  min-width:0!important;
}
.gh-training-mode-control .gh-training-mode-control-label{
  color:var(--gh-mode-accent)!important;
  font-weight:850!important;
  text-overflow:clip!important;
  overflow:visible!important;
}
.gh-training-mode-control .gh-training-mode-control-meta{
  color:#aebccb!important;
  opacity:1!important;
}
.gh-training-mode-control.active{
  border-color:rgba(var(--gh-blue-rgb),.88)!important;
  background:linear-gradient(155deg,rgba(var(--gh-blue-rgb),.16),rgba(7,18,29,.98) 66%)!important;
  box-shadow:inset 0 0 0 1px rgba(var(--gh-blue-rgb),.30),0 0 0 2px rgba(var(--gh-blue-rgb),.09),0 7px 20px rgba(0,0,0,.15)!important;
}
.gh-training-mode-control.active::after{
  content:"";
  position:absolute;
  left:24%;right:24%;bottom:3px;
  height:2px;
  border-radius:99px;
  background:var(--gh-blue);
  box-shadow:0 0 8px rgba(var(--gh-blue-rgb),.58);
  pointer-events:none;
}
/* Keep semantic content vivid even while selected. */
.gh-training-mode-control.active .gh-training-mode-control-icon,
.gh-training-mode-control.active .gh-training-mode-control-label{
  color:var(--gh-mode-accent)!important;
  opacity:1!important;
  filter:none!important;
}

/* Train: retain the useful count on larger screens without shrinking labels. */
#view-routines .gh-lane-switch.gh-training-mode-control{
  min-height:68px!important;
}
#view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-label{
  font-size:12.5px!important;
  line-height:1.08!important;
  white-space:normal!important;
}
#view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-meta{
  font-size:10.5px!important;
  line-height:1.18!important;
  white-space:normal!important;
}

/* Progress: same icon tile + semantic label; Overview is aggregate lavender. */
#view-history .progress-area-tabs{
  gap:6px!important;
  padding:5px!important;
}
#view-history .progress-area-tab.gh-training-mode-control{
  min-height:60px!important;
  padding:7px 6px!important;
  gap:6px!important;
  border-radius:12px!important;
}
#view-history .progress-area-tab.gh-training-mode-control .progress-area-tab-icon{
  width:28px!important;height:28px!important;border-radius:9px!important;
}
#view-history .progress-area-tab.gh-training-mode-control .progress-area-tab-icon svg{
  width:16px!important;height:16px!important;
}
#view-history .progress-area-tab.gh-training-mode-control .gh-training-mode-control-label{
  display:block!important;
  font-size:12px!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
}

/* Home personalized selector: same component language, compact geometry. */
body.home-mode .gh-home-mode-switch{
  min-height:0!important;
  align-items:stretch!important;
}
body.home-mode .gh-home-mode-switch .suggestion-mode-btn.gh-training-mode-control{
  min-height:58px!important;
  height:auto!important;
  padding:6px 3px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  border-radius:10px!important;
  white-space:normal!important;
}
body.home-mode .gh-home-mode-switch .gh-training-mode-control-icon{
  width:24px!important;height:24px!important;border-radius:8px!important;
}
body.home-mode .gh-home-mode-switch .gh-training-mode-control-icon svg{
  width:14px!important;height:14px!important;
}
body.home-mode .gh-home-mode-switch .gh-training-mode-control-label{
  font-size:11px!important;
  line-height:1.02!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Home training cards: same semantic tile and label treatment, larger format. */
body.home-mode .gh-mode-card.gh-training-mode-control .gh-training-mode-control-label{
  color:var(--gh-mode-accent)!important;
  font-size:14px!important;
  line-height:1.08!important;
}
body.home-mode .gh-mode-card.gh-training-mode-control .gh-training-mode-control-meta{
  color:#aebccb!important;
  font-size:11px!important;
  line-height:1.28!important;
  white-space:normal!important;
}

/* Readability floor for common user-facing secondary copy. Avoid ellipsis for
   explanatory text; let cards grow or text wrap instead. */
@media (max-width:959px){
  body.home-mode .gh-personalized-copy p,
  body.home-mode .gh-home-health-card p,
  body.home-mode .gh-quick-title p,
  #view-routines .training-mode-intro .subtle,
  #view-routines .exercise-library-heading .subtle,
  #view-history .exercise-progress-name small,
  #view-history .exercise-progress-current small,
  #view-profile .gh-profile-row small,
  .equipment-option-copy small,
  .selected-injury-copy small,
  .coach-time-choice small,
  #view-workout .workout-active-label{
    font-size:11px!important;
    line-height:1.32!important;
  }

  body.home-mode .gh-personalized-copy h3,
  body.home-mode .gh-personalized-copy p,
  body.home-mode .gh-home-health-card h3,
  body.home-mode .gh-home-health-card p,
  #view-profile .gh-profile-row small,
  .equipment-option-copy strong,
  .equipment-option-copy small,
  .selected-injury-copy strong{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    -webkit-line-clamp:unset!important;
  }

  body.home-mode .gh-personalized-compact,
  body.home-mode .gh-home-health-card{
    height:auto!important;
    min-height:78px!important;
  }

  /* 4 across on phone: stack icon over label so readable type fits without shrink. */
  #view-routines .gh-lane-switch.gh-training-mode-control,
  #view-history .progress-area-tab.gh-training-mode-control{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    gap:4px!important;
    padding:6px 3px!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-lane-switch-icon,
  #view-history .progress-area-tab.gh-training-mode-control .progress-area-tab-icon{
    width:26px!important;height:26px!important;border-radius:8px!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-lane-switch-icon svg,
  #view-history .progress-area-tab.gh-training-mode-control .progress-area-tab-icon svg{
    width:15px!important;height:15px!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-lane-switch-copy,
  #view-history .progress-area-tab.gh-training-mode-control .gh-training-mode-control-copy{
    width:100%!important;
    align-items:center!important;
    text-align:center!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-label,
  #view-history .progress-area-tab.gh-training-mode-control .gh-training-mode-control-label{
    width:100%!important;
    font-size:11.25px!important;
    line-height:1.05!important;
    letter-spacing:-.025em!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-meta{
    font-size:10.5px!important;
    line-height:1.1!important;
  }
}

@media(max-width:390px){
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-meta{
    display:none!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control,
  #view-history .progress-area-tab.gh-training-mode-control{
    min-height:62px!important;
  }
  #view-routines .gh-lane-switch.gh-training-mode-control .gh-training-mode-control-label,
  #view-history .progress-area-tab.gh-training-mode-control .gh-training-mode-control-label,
  body.home-mode .gh-home-mode-switch .gh-training-mode-control-label{
    font-size:11px!important;
  }
}

/* Alpha4.65 readability closeout: stop squeezing utility copy to 6–10px on
   phone. Reflow compact Home controls before shrinking their labels. */
@media(max-width:959px){
  #view-home .eyebrow,
  #view-routines .eyebrow,
  #view-history .eyebrow,
  #view-profile .eyebrow{
    font-size:11px!important;
    line-height:1.15!important;
    letter-spacing:.12em!important;
  }
  body.home-mode .gh-today-copy .eyebrow,
  body.home-mode .gh-home-section-kicker,
  body.home-mode .gh-home-section-kicker > span{
    font-size:11px!important;
    line-height:1.12!important;
  }
  body.home-mode .gh-home-section-kicker{
    letter-spacing:.12em!important;
  }
  body.home-mode .gh-personalized-cta,
  body.home-mode .gh-personalized-mini-actions button,
  body.home-mode .gh-quick-more,
  body.home-mode .quick-start-btn,
  body.home-mode .gh-health-cta{
    font-size:11.5px!important;
    line-height:1.12!important;
  }
  body.home-mode .gh-quick-more{
    min-height:28px!important;
    padding:0 7px!important;
  }
  body.home-mode .home-quick-card .quick-input-wrap small,
  body.home-mode .home-quick-card .quick-timer-grid .field>span{
    font-size:11px!important;
    line-height:1.1!important;
  }
  body.home-mode .gh-quick-title p{
    font-size:11px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  #view-history .bar-label,
  #view-history .progress-filter-chip{
    font-size:11px!important;
    line-height:1.15!important;
  }

  body.home-mode .home-quick-card{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:11px!important;
  }
  body.home-mode .gh-quick-compact{
    display:grid!important;
    grid-template-columns:32px minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    gap:8px 9px!important;
    height:auto!important;
    min-height:0!important;
    padding-right:0!important;
    align-items:center!important;
  }
  body.home-mode .gh-quick-timer-icon{
    grid-column:1!important;
    grid-row:1!important;
  }
  body.home-mode .gh-quick-title{
    grid-column:2!important;
    grid-row:1!important;
  }
  body.home-mode .home-quick-card .quick-timer-grid{
    grid-column:1 / -1!important;
    grid-row:2!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.home-mode .home-quick-card .quick-input-wrap{
    min-height:38px!important;
    padding:2px 5px!important;
  }
  body.home-mode .home-quick-card .quick-start-btn{
    grid-column:1 / -1!important;
    grid-row:3!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    min-height:40px!important;
    overflow:visible!important;
    padding:0 12px!important;
  }
  body.home-mode .home-quick-card .quick-start-btn span{
    font-size:inherit!important;
  }

  body.home-mode .gh-health-cta{
    min-height:42px!important;
    font-size:11.5px!important;
  }
}
@media(max-width:959px){
  body.home-mode .home-quick-card .quick-start-btn,
  body.home-mode .home-quick-card .quick-start-btn span{
    font-size:11.5px!important;
    line-height:1.12!important;
  }
  #view-routines #newRoutineBtn,
  #view-routines #newRoutineBtn span,
  #view-routines .status-chip{
    font-size:11px!important;
    line-height:1.15!important;
  }
}

/* Keep the personalized mode row a full-width sibling on every breakpoint.
   Desktop previously auto-placed this 4-button selector into one narrow grid cell. */
body.home-mode .gh-personalized-mode-row{
  grid-column:1 / -1!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}

@media(min-width:960px){
  #view-home .eyebrow,
  #view-routines .eyebrow,
  #view-history .eyebrow,
  #view-profile .eyebrow,
  body.home-mode .gh-home-section-kicker,
  body.home-mode .gh-home-section-kicker > span,
  body.home-mode .gh-week-metrics span,
  body.home-mode .gh-mode-card b{
    font-size:11px!important;
    line-height:1.2!important;
  }
  body.home-mode .gh-home-mode-switch .suggestion-mode-btn.gh-training-mode-control{
    min-height:58px!important;
    padding:6px 8px!important;
  }
  body.home-mode .gh-home-mode-switch .gh-training-mode-control-label{
    font-size:12px!important;
  }
}

/* Desktop readability parity. Compact dashboard copy may reflow, but it may
   not fall back to micro-type just to preserve an old fixed footprint. */
body.home-mode .gh-personalized-copy p,
body.home-mode .gh-quick-title p,
body.home-mode .gh-home-health-card p,
body.home-mode .gh-personalized-mini-actions button,
body.home-mode .gh-quick-more,
body.home-mode .home-quick-card .quick-input-wrap small,
body.home-mode .home-quick-card .quick-timer-grid .field>span,
#view-routines .status-chip,
#view-history .bar-label{
  font-size:11px!important;
  line-height:1.25!important;
}

/* Final Alpha4.65 active-state authority. These selectors intentionally beat
   legacy Home/Progress per-mode active fills. Selection is always the same
   restrained blue perimeter/indicator; semantic content stays untouched. */
body.home-mode .gh-home-mode-switch .suggestion-mode-btn.gh-training-mode-control.active,
#view-routines .gh-lane-switch.gh-training-mode-control.active,
#view-history .progress-area-tab.gh-training-mode-control.active{
  border-color:rgba(var(--gh-blue-rgb),.88)!important;
  background:linear-gradient(155deg,rgba(var(--gh-blue-rgb),.16),rgba(7,18,29,.98) 66%)!important;
  box-shadow:inset 0 0 0 1px rgba(var(--gh-blue-rgb),.30),0 0 0 2px rgba(var(--gh-blue-rgb),.09),0 7px 20px rgba(0,0,0,.15)!important;
  color:#eaf1f8!important;
}
body.home-mode .gh-home-mode-switch .suggestion-mode-btn.gh-training-mode-control.active .gh-training-mode-control-icon,
body.home-mode .gh-home-mode-switch .suggestion-mode-btn.gh-training-mode-control.active .gh-training-mode-control-label,
#view-routines .gh-lane-switch.gh-training-mode-control.active .gh-training-mode-control-icon,
#view-routines .gh-lane-switch.gh-training-mode-control.active .gh-training-mode-control-label,
#view-history .progress-area-tab.gh-training-mode-control.active .gh-training-mode-control-icon,
#view-history .progress-area-tab.gh-training-mode-control.active .gh-training-mode-control-label{
  color:var(--gh-mode-accent)!important;
  opacity:1!important;
  filter:none!important;
}


/* =====================================================================
   Alpha4.66 — Home density + Train support lanes + Profile compact nav
   Preserve scrolling. Reduce duplication and micro-copy instead of forcing
   the app into a fixed-height screen.
   ===================================================================== */
.gh-training-mode-control.mobility{--gh-mode-accent:var(--gh-amber);--gh-mode-accent-rgb:var(--gh-amber-rgb)}
.gh-training-mode-control.recovery{--gh-mode-accent:var(--gh-green);--gh-mode-accent-rgb:var(--gh-green-rgb)}
body.home-mode .gh-home-training-bundle{margin-top:8px!important;padding:10px!important;border-radius:15px!important;background:linear-gradient(155deg,#0a1724,#07111b 72%)!important;border-color:rgba(68,104,139,.38)!important}
body.home-mode .gh-training-head-inline{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin:0 2px 6px!important}
body.home-mode .gh-training-open{min-height:32px!important;padding:0 9px!important;border:0!important;background:transparent!important;color:#9eb2c5!important;font-size:11.5px!important;font-weight:800!important}
body.home-mode .gh-home-training-mode-row{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;width:100%!important;margin:0!important;padding:0!important}
body.home-mode .gh-home-training-mode-row .gh-training-mode-control{min-height:54px!important;padding:5px 3px!important}
body.home-mode .gh-home-personalized.embedded{margin:8px 0 0!important;padding:9px 10px 8px!important;border:1px solid rgba(var(--gh-purple-rgb),.20)!important;border-radius:12px!important;background:linear-gradient(150deg,rgba(var(--gh-purple-rgb),.07),rgba(6,16,26,.88))!important}
body.home-mode .gh-home-personalized.embedded .gh-home-section-kicker{margin:0 0 6px!important}
body.home-mode .gh-home-personalized.embedded .gh-personalized-compact{min-height:0!important;height:auto!important}
body.home-mode .gh-home-personalized.embedded .gh-personalized-copy h3,body.home-mode .gh-home-personalized.embedded .gh-personalized-copy p{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
body.home-mode .gh-home-personalized.embedded .gh-personalized-mini-actions{margin-top:7px!important}
body.home-mode .gh-home-health{margin-top:8px!important}
body.home-mode .gh-home-health-card{min-height:70px!important;padding:9px 10px!important}
body.home-mode .gh-home-health-card .gh-apple-health-icon{width:34px!important;height:34px!important}
body.home-mode .gh-home-health-card h3{font-size:14px!important}
body.home-mode .gh-home-health-card p{font-size:11px!important;line-height:1.24!important}
body.home-mode .gh-home-health-card .gh-health-cta{min-height:36px!important;padding:0 10px!important;font-size:11.5px!important}
body.home-mode .gh-home-utility-grid{margin-top:8px!important}
#view-routines .gh-lane-switcher{gap:6px!important}
#view-routines .gh-lane-switch.gh-training-mode-control{min-height:58px!important}
#view-routines .gh-lane-switch-copy{justify-content:center!important}
#view-routines .gh-support-lanes{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:7px!important}
#view-routines .gh-support-lane.gh-training-mode-control{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;min-height:54px!important;padding:8px 10px!important;border-radius:12px!important;text-align:left!important}
#view-routines .gh-support-lane-icon{width:30px!important;height:30px!important;border-radius:9px!important}
#view-routines .gh-support-lane-icon svg{width:17px!important;height:17px!important}
#view-routines .gh-support-lane .gh-training-mode-control-label{font-size:12px!important;line-height:1.12!important;white-space:normal!important}
#view-routines .training-mode-intro.mobility:before{background:radial-gradient(circle at 65% 38%,rgba(var(--gh-amber-rgb),.30),transparent 30%),linear-gradient(145deg,#161508,#07111a)!important}
#view-routines .training-mode-intro.recovery:before{background:radial-gradient(circle at 68% 38%,rgba(var(--gh-green-rgb),.26),transparent 32%),linear-gradient(145deg,#08170d,#07111a)!important}
#view-routines .training-mode-intro.mobility:after,#view-routines .training-mode-intro.recovery:after{background:linear-gradient(90deg,#07131e 0%,rgba(7,19,30,.95) 52%,rgba(7,19,30,.30) 100%)!important}
@media(max-width:959px){
  #view-profile .gh-profile-head{margin-bottom:6px!important}
  #view-profile .gh-profile-grid{gap:6px!important;margin:7px 0!important}
  #view-profile .gh-profile-row{min-height:56px!important;grid-template-columns:36px minmax(0,1fr) auto!important;gap:9px!important;padding:7px 10px!important}
  #view-profile .gh-profile-row-icon{width:34px!important;height:34px!important;border-radius:9px!important}
  #view-profile .gh-profile-row-icon svg{width:19px!important;height:19px!important}
  #view-profile .gh-profile-row strong{font-size:13px!important}
  #view-profile .gh-profile-quick-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:7px!important}
  #view-profile .gh-profile-quick{min-height:76px!important;padding:9px 10px!important;display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;align-items:center!important;align-content:center!important;gap:8px!important}
  #view-profile .gh-profile-quick>span{width:30px!important;height:30px!important;border-radius:8px!important}
  #view-profile .gh-profile-quick svg{width:18px!important;height:18px!important}
  #view-profile .gh-profile-quick strong{font-size:12px!important;line-height:1.12!important;white-space:normal!important}
  #view-profile .gh-profile-quick small{display:none!important}
  #view-profile .gh-profile-quick-grid > .gh-profile-quick.coach{grid-column:auto!important;min-height:76px!important}
}
@media(max-width:430px){
  #view-profile .gh-profile-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #view-profile .gh-profile-row small{display:none!important}
  #view-profile .gh-profile-row{min-height:52px!important}
  #view-profile .profile-page-head h2{font-size:22px!important}
  #view-profile .profile-page-head .subtle{font-size:11px!important;line-height:1.2!important}
  #view-profile .gh-profile-quick,#view-profile .gh-profile-quick-grid > .gh-profile-quick.coach{min-height:70px!important}
}
