/* Health suite — builds on shared.css + components.css; overrides accent to emerald. */
:root {
  --accent:       #10b981;
  --accent-h:     #059669;
  --accent-fg:    #047857;
  --accent-bg:    #ecfdf5;
  --accent-light: #6ee7b7;
}
/* Flex row: value input + unit <select> (see Global Constraints). */
.row { display: flex; gap: 10px; align-items: stretch; }
.row > .calc-input { flex: 1 1 auto; min-width: 0; }
.row > select { flex: 0 0 auto; width: auto; min-width: 5.5rem; }
/* Category banner tint tiers. */
.bf-cat { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.bf-cat.t-essential { background:#eef2ff; color:#4338ca; }
.bf-cat.t-athlete   { background:#ecfdf5; color:#047857; }
.bf-cat.t-fitness   { background:#f0fdf4; color:#15803d; }
.bf-cat.t-average   { background:#fefce8; color:#a16207; }
.bf-cat.t-obese     { background:#fef2f2; color:#b91c1c; }
/* Sleep results */
.results { display: grid; gap: 12px; margin-top: 8px; }
.opt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border: 1px solid var(--border, #e5e7eb); border-radius: 12px; background: #fff; }
.opt.opt-best { border-color: var(--accent); background: var(--accent-bg); }
.opt .opt-time { font-family: var(--font-display, inherit); font-size: 1.5rem; font-weight: 800; color: var(--text, #111); }
.opt .opt-meta { color: var(--muted, #666); font-size: .92rem; }
.opt .opt-rec { font-size: .72rem; font-weight: 700; color: var(--accent-fg); background: var(--accent-bg);
  border: 1px solid var(--accent); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.fmt-toggle { margin-top: 18px; }
.btn-secondary { background: var(--accent-bg); color: var(--accent-fg); border: 1px solid var(--accent); }
.btn-secondary:hover { background: var(--accent); color: #fff; }

/* Body Measurement Tracker */
.bmt-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.chart-wrap { margin: 8px 0 4px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-line { fill: none; stroke: var(--accent-h, #059669); stroke-width: 2.5; }
.chart-svg circle { fill: var(--accent-h, #059669); }
.chart-goal { stroke: #f59e0b; stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-axis { stroke: var(--border, #e5e7eb); stroke-width: 1; }
.chart-tick { fill: var(--muted, #666); font-size: 11px; font-family: var(--font-mono, monospace); }
.chart-empty, .hist-empty { color: var(--muted, #666); padding: 24px; text-align: center;
  background: var(--accent-bg, #ecfdf5); border-radius: 12px; margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stat-box { background: #fff; border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  padding: 12px 14px; text-align: center; }
.stat-box .s-label { display: block; font-size: .78rem; color: var(--muted, #666); margin-bottom: 4px; }
.stat-box .s-val { font-family: var(--font-display, inherit); font-size: 1.25rem; font-weight: 800; color: var(--text, #111); }
.goal-bar-track { height: 12px; background: var(--accent-bg, #ecfdf5); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.goal-bar-fill { height: 100%; width: 0; background: var(--accent, #10b981); transition: width .3s ease; }
.hist-scroll { overflow-x: auto; }
.hist-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hist-table th, .hist-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border, #e5e7eb); white-space: nowrap; }
.hist-table th:first-child, .hist-table td:first-child { text-align: left; }
.hist-del { background: none; border: none; color: #b91c1c; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; } }

/* Weight-loss Timeline */
.wl-caution { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: .9rem; }
.result-box .r-sub { display: block; font-size: .78rem; color: var(--muted, #666); margin-top: 2px; }
.chart-dot { fill: var(--accent-h, #059669); }
