.health-page { width: min(100% - 48px, 720px); margin-inline: auto; padding-block: 56px 48px; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; font-size: 1rem; color: var(--muted); }
.health-header { margin-block: 38px 40px; }
.health-header h1 { margin-bottom: 16px; }
button { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.source-row { display: flex; justify-content: space-between; gap: 16px; font-size: .9375rem; border-top: 1px solid var(--rule); padding-top: 18px; }
.source-row p { margin: 0; }
.source-row p:last-child { color: var(--muted); }
h2 { font-size: 1.375rem; font-weight: 400; margin: 0; line-height: 1.4; }
.trend { margin-top: 12px; }
.trend-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.metric-options, .range-options { display: flex; gap: 4px; }
.metric-options button, .range-options button { background: none; border: 1px solid transparent; padding: 8px 11px; min-height: 44px; font-size: .9375rem; color: var(--muted); }
.metric-options button[aria-pressed="true"], .range-options button[aria-pressed="true"] { color: var(--ink); border-color: var(--rule); border-radius: 3px; }
.metric-options button:hover, .range-options button:hover { color: var(--ink); }
.chart-wrap { position: relative; }
#trend-chart { display: block; width: 100%; height: auto; overflow: visible; color: var(--chart-color); }
#trend-chart text { font-family: Georgia, serif; font-size: 14px; fill: var(--muted); }
#trend-chart .gridline { stroke: var(--rule); stroke-width: 1; }
#trend-chart .trace { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#trend-chart .point { fill: currentColor; }
#chart-empty { position: absolute; top: 30%; left: 15%; right: 10%; text-align: center; color: var(--muted); background: var(--paper); padding: 12px; line-height: 1.5; }
.chart-dates { display: flex; justify-content: space-between; color: var(--muted); font-size: .875rem; margin: 8px 0 20px 42px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  .health-page { padding-top: 24px; }
  .health-header { margin-top: 24px; margin-bottom: 32px; }
  .source-row { flex-direction: column; gap: 8px; }
  .trend-header { gap: 8px; }
  .metric-options button, .range-options button { padding-inline: 12px; }
  #trend-chart { min-height: 170px; }
}

#connection-status { color: var(--muted); font-size: .9375rem; line-height: 1.5; }
#connection-status:empty { display: none; }

#trend-chart .baseline { stroke: var(--muted); stroke-dasharray: 3 4; }

.metric-options button { font-size: 1.125rem; }
.metric-options button[aria-pressed="true"] { color: var(--metric-color); }
.metric-options button:disabled { color: var(--muted); opacity: .6; cursor: default; }

.health-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-bottom: 40px; }
.health-notes h2 { font-size: 1.125rem; }
.health-notes ul { margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.health-notes li + li { margin-top: 5px; }
.chart-wrap { margin-top: 22px; }
@media (max-width: 520px) {
  .health-notes { grid-template-columns: 1fr; gap: 24px; }
}
