/* Health report full page — mobile-first responsive */

.health-report-page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-4));
  overflow-x: hidden;
  box-sizing: border-box;
}

.health-report-page__header {
  text-align: center;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-1);
}

.health-report-page__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  margin: 0 0 var(--space-2);
}

.health-report-page__title {
  font-size: clamp(1.375rem, 5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}

.health-report-page__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  word-break: break-word;
  line-height: 1.45;
}

.health-report-page__hero {
  text-align: center;
  padding: var(--space-5) var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-card);
}

.health-report-page__ring {
  margin: 0 auto;
}

.health-ring--lg {
  width: 96px;
  height: 96px;
}

.health-ring--lg .health-ring__svg {
  width: 96px;
  height: 96px;
}

.health-ring__fill--page {
  stroke: #10b981;
  stroke-width: 5;
}

.health-ring__value--lg {
  font-size: 1.5rem;
}

.health-report-page__hero-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: var(--space-3) 0 0;
}

.health-report-page__scores {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.health-report-page__score {
  padding: var(--space-3) var(--space-4);
  min-width: 0;
}

.health-report-page__score-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.health-report-page__score-label {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.health-report-page__score-val {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.health-report-page__section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--space-3);
}

.health-report-page__conditions {
  margin-top: var(--space-4);
}

.health-report-page__conditions .condition-report {
  margin: 0;
}

.health-report-page__conditions .condition-report__group {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.health-report-page__conditions .condition-report__group-title {
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.health-report-page__conditions .condition-report__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.health-report-page__conditions .condition-report__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-primary);
  min-width: 0;
}

.health-report-page__conditions .condition-report__item-label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  line-height: 1.35;
}

.health-report-page__conditions .condition-report__item-value {
  flex-shrink: 0;
  text-align: right;
  font-weight: 600;
  max-width: 45%;
  word-break: break-word;
}

.health-report-page__conditions .condition-report__item--ok {
  border-left: 3px solid #10b981;
}

.health-report-page__conditions .condition-report__item--bad {
  border-left: 3px solid #f59e0b;
}

.health-report-page__conditions .condition-report__item-status {
  flex-shrink: 0;
  font-weight: 700;
}

.health-report-page__diagnostics {
  margin-top: var(--space-4);
}

.health-report-page__diag {
  padding: var(--space-2) var(--space-3);
  overflow: hidden;
}

.health-report-page__diag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  min-width: 0;
}

.health-report-page__diag-row:last-child {
  border-bottom: none;
}

.health-report-page__diag-key {
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
  word-break: break-word;
  line-height: 1.35;
}

.health-report-page__diag-row .badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.health-report-page__back {
  margin-top: var(--space-5);
  text-align: center;
}

.health-report-page__back .btn {
  max-width: 100%;
}

/* Tablet: 2-column score grid */
@media (min-width: 480px) {
  .health-report-page__scores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-report-page__conditions .condition-report__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Small phones — tighter padding */
@media (max-width: 360px) {
  .health-report-page__hero {
    padding: var(--space-4) var(--space-3);
  }

  .health-report-page__score {
    padding: var(--space-2) var(--space-3);
  }

  .health-ring--lg {
    width: 80px;
    height: 80px;
  }

  .health-ring--lg .health-ring__svg {
    width: 80px;
    height: 80px;
  }

  .health-ring__value--lg {
    font-size: 1.25rem;
  }
}

.page-health-report .app-main {
  padding-left: clamp(12px, 3vw, var(--space-4));
  padding-right: clamp(12px, 3vw, var(--space-4));
}
