/* GritHQ Finalization — Health & Recovery page
   Authoritative user-facing layout for #view-health.
   Developer bridge export stays in code for later Settings / advanced tooling,
   but is intentionally not exposed on the primary Health surface. */

#view-health{
  --health-accent:#ff5578;
  --health-green:#64df8a;
  --health-blue:#47a2ff;
  --health-line:rgba(92,132,174,.28);
  --health-surface:linear-gradient(155deg,#0a1724,#07111b);
  --health-surface-strong:linear-gradient(150deg,#0d1d2c,#08131f);
}

#view-health .health-page-head{
  margin-bottom:14px;
}

#view-health .health-page-head h2{
  margin-top:4px;
  letter-spacing:-.045em;
}

#view-health .health-page-head .subtle{
  max-width:760px;
}

#view-health .health-status-card{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) auto;
  align-items:start;
  gap:14px;
  padding:18px;
  border:1px solid var(--health-line);
  background:
    radial-gradient(circle at 9% 12%,rgba(255,75,112,.11),transparent 28%),
    radial-gradient(circle at 88% 15%,rgba(57,144,255,.08),transparent 30%),
    var(--health-surface-strong);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 16px 34px rgba(0,0,0,.12);
}

#view-health .health-icon{
  width:50px;
  height:50px;
  border-radius:15px;
  display:grid;
  place-items:center;
  font-size:24px;
  color:#ff426c;
  background:#fff;
  border:0;
  box-shadow:0 8px 22px rgba(0,0,0,.24);
}

#view-health .health-status-copy{
  min-width:0;
}

#view-health .health-status-copy h3{
  margin:3px 0 6px;
  font-size:19px;
  line-height:1.15;
  letter-spacing:-.025em;
}

#view-health .health-status-copy .subtle{
  margin:0;
  max-width:720px;
}

#view-health .health-status-card > .status-chip{
  align-self:start;
  white-space:nowrap;
}

#view-health .health-section-head{
  margin-top:20px;
  margin-bottom:10px;
}

#view-health .health-section-head h3{
  font-size:18px;
  margin-bottom:3px;
}

#view-health .health-data-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

#view-health .health-data-card{
  min-width:0;
  min-height:112px;
  display:grid;
  align-content:start;
  gap:5px;
  padding:15px;
  border:1px solid var(--health-line)!important;
  border-radius:15px;
  background:
    linear-gradient(180deg,rgba(22,40,58,.22),rgba(7,17,27,.06)),
    var(--health-surface)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}

#view-health .health-data-card > span{
  color:#8fa4b8;
  font-size:11px;
  font-weight:760;
  line-height:1.25;
}

#view-health .health-data-card > strong{
  font-size:21px;
  line-height:1.1;
  letter-spacing:-.03em;
  overflow-wrap:anywhere;
}

#view-health .health-data-card > small{
  color:#7f92a5;
  font-size:11px;
  line-height:1.35;
}

#view-health .health-plan-list{
  display:grid;
  gap:0;
  padding:5px 14px;
  border:1px solid var(--health-line);
  background:var(--health-surface);
}

#view-health .health-plan-row{
  min-width:0;
  min-height:66px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:11px 2px;
  border-bottom:1px solid rgba(92,132,174,.18);
}

#view-health .health-plan-row:last-child{
  border-bottom:0;
}

#view-health .health-plan-row > span:first-child{
  min-width:0;
  display:grid;
  gap:3px;
}

#view-health .health-plan-row > span:first-child strong{
  color:var(--text);
  font-size:14px;
  line-height:1.25;
}

#view-health .health-plan-row > span:first-child small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

#view-health .health-native-note{
  margin-top:16px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border:1px solid rgba(74,154,232,.24);
  background:
    radial-gradient(circle at 5% 50%,rgba(45,139,255,.08),transparent 27%),
    linear-gradient(155deg,#091725,#07111b);
}

#view-health .health-native-note-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:#80beff;
  background:rgba(42,128,221,.10);
  border:1px solid rgba(74,154,232,.25);
  font-size:20px;
}

#view-health .health-native-note strong{
  display:block;
  margin-bottom:3px;
  font-size:14px;
}

#view-health .health-native-note .subtle{
  margin:0;
}

@media (max-width:959px){
  #view-health{
    padding-bottom:2px;
  }

  #view-health .health-page-head h2{
    font-size:29px;
  }

  #view-health .health-status-card{
    grid-template-columns:46px minmax(0,1fr) auto;
    gap:11px;
    padding:14px;
    border-radius:16px;
  }

  #view-health .health-icon{
    width:44px;
    height:44px;
    border-radius:13px;
    font-size:22px;
  }

  #view-health .health-status-copy h3{
    font-size:17px;
  }

  #view-health .health-data-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }

  #view-health .health-data-card{
    min-height:108px;
    padding:13px;
  }

  #view-health .health-data-card > strong{
    font-size:20px;
  }

  #view-health .health-plan-list{
    padding:4px 12px;
  }

  #view-health .health-plan-row{
    min-height:68px;
    gap:10px;
  }
}

@media (max-width:430px){
  #view-health .health-page-head{
    margin-bottom:12px;
  }

  #view-health .health-page-head .subtle{
    max-width:none;
  }

  #view-health .health-section-head{
    margin-top:18px;
  }
}

@media (max-width:390px){
  #view-health .health-status-card{
    grid-template-columns:42px minmax(0,1fr);
  }

  #view-health .health-status-card > .status-chip{
    grid-column:2;
    margin-top:1px;
    justify-self:start;
  }

  #view-health .health-icon{
    width:40px;
    height:40px;
    font-size:20px;
  }

  #view-health .health-data-card{
    min-height:104px;
    padding:12px;
  }

  #view-health .health-plan-row > span:first-child strong{
    font-size:13px;
  }
}

@media (max-width:360px){
  #view-health .health-page-head h2{
    font-size:27px;
  }

  #view-health .health-data-grid{
    grid-template-columns:1fr;
  }

  #view-health .health-data-card{
    min-height:0;
  }

  #view-health .health-plan-row{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }

  #view-health .health-plan-row > .status-chip{
    justify-self:start;
  }
}
