/* System Health reference implementation — September 2026 */
body:has(.phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active),
.demo-stage:has(.phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active),
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-scroll-region,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-screen,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-scroll-region > .app-nav-spacer {
  background: #090a09 !important;
  background-color: #090a09 !important;
  background-image: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header {
  min-height: 128px !important;
  height: 128px !important;
  flex: 0 0 128px !important;
  padding: 30px 14px 0 !important;
  border: 0 !important;
  background: #090a09 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header h1 {
  margin: 0 !important;
  color: #f4f4f2 !important;
  font-size: 20px !important;
  font-weight: 650 !important;
  letter-spacing: -.025em !important;
  line-height: 1 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header .app-screen-header-side {
  width: 44px !important;
  min-width: 44px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header .app-screen-header-action.action-bell {
  width: 44px !important;
  height: 44px !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f0f0ed !important;
  box-shadow: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header .app-screen-header-action.action-bell svg {
  width: 27px !important;
  height: 27px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header .app-screen-header-badge {
  top: 5px !important;
  right: 4px !important;
  width: 8px !important;
  height: 8px !important;
  border: 0 !important;
  background: #b9f33d !important;
  box-shadow: 0 0 8px rgba(185,243,61,.18) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-screen {
  width: 100% !important;
  padding: 10px 14px 24px !important;
  color: #f3f3f0 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-hero {
  --health-accent: #b9f33d !important;
  width: 100% !important;
  height: 208px !important;
  margin: 0 0 14px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.105) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.025), transparent 42%),
    linear-gradient(145deg, #1b1c1a 0%, #171816 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-summary {
  min-height: 151px !important;
  height: 151px !important;
  padding: 24px 24px !important;
  grid-template-columns: minmax(0,1fr) 78px !important;
  gap: 18px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-summary h2 {
  margin: 0 !important;
  color: #f2f2ef !important;
  font-size: 22px !important;
  line-height: 1.12 !important;
  font-weight: 650 !important;
  letter-spacing: -.028em !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-summary p {
  margin: 11px 0 0 !important;
  color: #aaa9a7 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 420 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-shield {
  width: 72px !important;
  height: 72px !important;
  justify-self: end !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #b9f33d !important;
  box-shadow: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-shield svg {
  width: 68px !important;
  height: 68px !important;
  filter: drop-shadow(0 0 7px rgba(185,243,61,.08)) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-overall {
  min-height: 56px !important;
  height: 56px !important;
  padding: 0 18px !important;
  grid-template-columns: 8px auto auto 1fr !important;
  gap: 12px !important;
  border-top: 1px solid rgba(255,255,255,.075) !important;
  background: rgba(12,13,12,.18) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-overall-dot {
  width: 8px !important;
  height: 8px !important;
  background: #b9f33d !important;
  box-shadow: 0 0 8px rgba(185,243,61,.16) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-overall strong {
  color: #aaa9a7 !important;
  font-size: 9px !important;
  font-weight: 720 !important;
  letter-spacing: .22em !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-overall > b {
  padding-left: 14px !important;
  border-left: 1px solid rgba(255,255,255,.09) !important;
  color: #b9f33d !important;
  font-size: 9.5px !important;
  font-weight: 720 !important;
  letter-spacing: .18em !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-last-check {
  gap: 6px !important;
  color: #a3a2a0 !important;
  font-size: 9.8px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-last-check svg {
  width: 14px !important;
  height: 14px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-group,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-recommendation {
  width: 100% !important;
  margin: 10px 0 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.105) !important;
  border-radius: 17px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.025), transparent 42%),
    linear-gradient(145deg, #1b1c1a 0%, #171816 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-hero + .system-health-group {
  margin-top: 14px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-group-title {
  width: 100% !important;
  min-height: 45px !important;
  height: 45px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  color: #aaa9a7 !important;
  font-size: 10px !important;
  font-weight: 720 !important;
  letter-spacing: .24em !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-group-title[aria-expanded="true"] {
  border-bottom: 1px solid rgba(255,255,255,.075) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-section-chevron {
  width: 18px !important;
  height: 18px !important;
  flex-basis: 18px !important;
  color: #a2a2a0 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-group-title[aria-expanded="false"] .system-health-section-chevron {
  transform: rotate(-90deg) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-recommendation-body {
  min-height: 88px !important;
  height: 88px !important;
  padding: 17px 18px !important;
  grid-template-columns: 8px minmax(0,1fr) !important;
  align-items: start !important;
  gap: 15px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-recommendation-dot {
  width: 8px !important;
  height: 8px !important;
  margin-top: 4px !important;
  background: #b9f33d !important;
  box-shadow: 0 0 8px rgba(185,243,61,.14) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-recommendation-body p {
  margin: 0 !important;
  color: #a6a5a3 !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  font-weight: 420 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row {
  min-height: 67px !important;
  padding: 11px 16px !important;
  background: transparent !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row + .system-health-row {
  border-top-color: rgba(255,255,255,.075) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row-copy strong,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row-value b {
  color: #f2f2ef !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row-copy small {
  color: #999895 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-row.tone-good {
  --row-accent: #b9f33d !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav {
  position: absolute !important;
  left: 14px !important;
  right: 14px !important;
  bottom: 10px !important;
  width: calc(100% - 28px) !important;
  min-height: 74px !important;
  height: 74px !important;
  padding: 7px 8px 6px !important;
  border: 1px solid rgba(255,255,255,.105) !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.025), transparent 42%),
    linear-gradient(145deg, #1b1c1a 0%, #171816 100%) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.02) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button {
  min-height: 59px !important;
  gap: 4px !important;
  color: #aaa9a7 !important;
  font-size: 12px !important;
  font-weight: 430 !important;
  background: transparent !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button::before,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button.active::after {
  display: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav .bottom-nav-icon {
  width: 27px !important;
  height: 27px !important;
  flex-basis: 27px !important;
  color: currentColor !important;
  filter: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button.active,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button.active span,
body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button.active .bottom-nav-icon {
  color: #b9f33d !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-scroll-region > .app-nav-spacer {
  display: block !important;
  flex: 0 0 92px !important;
  min-height: 92px !important;
}

@media (max-width: 420px) {
  body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-screen-header {
    min-height: 128px !important;
    height: 128px !important;
    flex-basis: 128px !important;
  }

  body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active .system-health-screen {
    padding-top: 10px !important;
  }

  body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav {
    min-height: 74px !important;
    height: 74px !important;
    padding: 7px 8px 6px !important;
  }

  body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav button {
    min-height: 59px !important;
    gap: 4px !important;
    font-size: 12px !important;
  }

  body .phone-shell-wrap.persistent-bottom-nav-shell.health-shell-active > .app-primary-bottom-nav .bottom-nav-icon {
    width: 27px !important;
    height: 27px !important;
    flex-basis: 27px !important;
  }
}