/*
  GritHQ Finalization — HOME PAGE AUTHORITY
  -----------------------------------------
  During the page-by-page finalization pass, Home-specific corrective rules
  live here. Do not add new Home fixes to legacy styles.css. Shared primitives
  stay in styles.css until the final whole-app cleanup removes obsolete history.
*/

/* Home-specific portion formerly mixed into Alpha4.42. Scoped to Home only. */
@media (max-width:959px){
  body.home-mode .gh-personalized-copy{min-width:0!important;}
  body.home-mode .gh-personalized-copy h3{font-size:18px!important;line-height:1.06!important;}
  body.home-mode .gh-home-mode-switch{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:4px!important;
    padding:4px!important;
    min-width:0!important;
    background:linear-gradient(180deg,rgba(4,10,18,.98),rgba(6,14,24,.98))!important;
    border:1px solid rgba(70,112,165,.32)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 8px 24px rgba(0,0,0,.12)!important;
  }
  body.home-mode .gh-home-mode-switch .suggestion-mode-btn{
    min-width:0!important;
    min-height:30px!important;
    padding:0 4px!important;
    font-size:11px!important;
    line-height:1.06!important;
    letter-spacing:-.012em!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:keep-all!important;
    text-align:center!important;
    justify-content:center!important;
    border-radius:8px!important;
    border:1px solid transparent!important;
    color:#d8e3ef!important;
  }
  body.home-mode .gh-home-mode-switch .suggestion-mode-btn.active{
    background:linear-gradient(145deg,rgba(29,85,196,.92),rgba(20,109,255,.84))!important;
    border-color:rgba(84,158,255,.45)!important;
    box-shadow:0 8px 18px rgba(19,76,183,.22),inset 0 1px 0 rgba(255,255,255,.16)!important;
    color:#fff!important;
  }
  body.home-mode .gh-personalized-cta{
    min-height:50px!important;
    min-width:132px!important;
    padding:0 10px!important;
    font-size:13px!important;
    line-height:1.08!important;
    text-align:center!important;
    justify-content:center!important;
    box-shadow:0 12px 28px rgba(117,64,198,.16),inset 0 1px 0 rgba(255,255,255,.12)!important;
  }
}
@media (max-width:430px){
  body.home-mode .gh-home-mode-switch .suggestion-mode-btn{font-size:10.5px!important;padding:0 3px!important;}
  body.home-mode .gh-personalized-cta{min-width:124px!important;font-size:12.5px!important;padding:0 8px!important;}
}

/* ==============================================================
   GritHQ alpha4.44 — Home regression repair + UX cleanup
   BASE: Alpha4.42 (last good Home fit)
   Fix only the two crowded Home areas without increasing their footprint.
   ============================================================== */
@media (max-width:959px) and (orientation:portrait){
  body.home-mode .personalized-plan-card{padding:9px 11px!important;gap:6px!important;}
  body.home-mode .gh-personalized-compact{
    display:grid!important;grid-template-columns:34px minmax(0,1fr) 112px!important;
    grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:6px!important;
    align-items:center!important;min-height:0!important;height:auto!important;padding-right:0!important;
  }
  body.home-mode .gh-personalized-target{grid-column:1!important;grid-row:1!important;width:31px!important;height:31px!important;font-size:21px!important;align-self:center!important;}
  body.home-mode .gh-personalized-copy{grid-column:2!important;grid-row:1!important;min-width:0!important;align-self:center!important;}
  body.home-mode .gh-personalized-copy h3{font-size:12px!important;line-height:1.08!important;margin:0 0 2px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  body.home-mode .gh-personalized-copy p{font-size:7.5px!important;line-height:1.16!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;}
  body.home-mode .gh-personalized-cta{
    grid-column:3!important;grid-row:1!important;position:static!important;inset:auto!important;transform:none!important;
    width:112px!important;max-width:112px!important;min-width:112px!important;min-height:42px!important;height:42px!important;
    padding:0 8px!important;font-size:10px!important;line-height:1.05!important;white-space:normal!important;text-align:center!important;
    justify-content:center!important;align-self:center!important;border-radius:10px!important;
  }
  body.home-mode .gh-personalized-mode-row{
    grid-column:1 / -1!important;grid-row:2!important;width:100%!important;margin:0!important;padding:2px!important;
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;border-radius:9px!important;
  }
  body.home-mode .gh-personalized-mode-row .suggestion-mode-btn{
    min-width:0!important;min-height:27px!important;height:27px!important;padding:0 4px!important;font-size:8.5px!important;
    line-height:1!important;font-weight:800!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;border-radius:7px!important;
  }
  body.home-mode .gh-personalized-mini-actions{gap:6px!important;margin-top:0!important;}
  body.home-mode .gh-personalized-mini-actions button{min-height:36px!important;height:36px!important;font-size:10px!important;padding:0 6px!important;}

  body.home-mode .gh-home-health{gap:5px!important;}
  body.home-mode .gh-home-health-card{
    min-height:72px!important;height:72px!important;padding:9px 10px!important;display:grid!important;
    grid-template-columns:34px minmax(0,1fr) 108px!important;align-items:center!important;gap:8px!important;position:relative!important;
  }
  body.home-mode .gh-apple-health-icon{grid-column:1!important;width:31px!important;height:31px!important;font-size:18px!important;align-self:center!important;}
  body.home-mode .gh-health-copy{grid-column:2!important;min-width:0!important;align-self:center!important;}
  body.home-mode .gh-home-health-card h3{
    font-size:10.5px!important;line-height:1.08!important;margin:0 0 3px!important;white-space:normal!important;overflow:visible!important;
    text-overflow:clip!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
  }
  body.home-mode .gh-home-health-card p{font-size:7.2px!important;line-height:1.14!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;}
  body.home-mode .gh-health-cta{
    grid-column:3!important;position:static!important;inset:auto!important;transform:none!important;
    width:108px!important;max-width:108px!important;min-width:108px!important;min-height:40px!important;height:40px!important;margin:0!important;
    padding:0 8px!important;font-size:9.6px!important;line-height:1!important;font-weight:820!important;white-space:nowrap!important;
    align-self:center!important;justify-self:end!important;justify-content:center!important;border-radius:10px!important;
  }
  body.home-mode .gh-health-cta span{display:none!important;}
}
@media (min-width:400px) and (max-width:959px) and (orientation:portrait){
  body.home-mode .gh-personalized-compact{grid-template-columns:36px minmax(0,1fr) 118px!important;}
  body.home-mode .gh-personalized-cta{width:118px!important;max-width:118px!important;min-width:118px!important;font-size:10.4px!important;}
  body.home-mode .gh-personalized-mode-row .suggestion-mode-btn{font-size:9px!important;}
  body.home-mode .gh-home-health-card{grid-template-columns:36px minmax(0,1fr) 112px!important;}
  body.home-mode .gh-health-cta{width:112px!important;max-width:112px!important;min-width:112px!important;font-size:10px!important;}
}
