:root {
  --cw-positive: #247250;
  --cw-positive-bg: #e9f4ed;
  --cw-negative: #a4403f;
  --cw-negative-bg: #f8e9e7;
  --cw-caution: #8a6120;
  --cw-caution-bg: #f8efdb;
}

[data-tone] { --cw-tone: #686868; --cw-tone-bg: #ececec; }
[data-tone="positive"] { --cw-tone: var(--cw-positive); --cw-tone-bg: var(--cw-positive-bg); }
[data-tone="negative"] { --cw-tone: var(--cw-negative); --cw-tone-bg: var(--cw-negative-bg); }
[data-tone="caution"] { --cw-tone: var(--cw-caution); --cw-tone-bg: var(--cw-caution-bg); }

.cw-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--cw-tone-bg);
  color: var(--cw-tone);
  font-size: 11px;
  font-weight: 650;
}

.cw-performance .chart [data-trend-segment],
.ath-home-chart [data-trend-segment] { fill: none; stroke: var(--cw-tone); stroke-width: 2.7; }
.cw-performance .ath-trend-point[aria-pressed="true"] .ath-trend-dot {
  border-color: var(--cw-tone);
  background: var(--cw-tone);
  box-shadow: 0 0 0 4px var(--cw-tone-bg);
}
.cw-performance .ath-trend-point:focus-visible { outline: none; }
.cw-performance .ath-trend-point:focus-visible .ath-trend-dot { outline: 2px solid var(--ink); outline-offset: 4px; }
.ath-home-chart [data-trend-current] { stroke: var(--cw-tone); fill: var(--cw-tone); }

.cw-wellness-grid .cw-wellness-metric { min-width: 0; padding: 12px; }
.cw-wellness-metric > p { display: flex; align-items: center; gap: 6px; }
.cw-wellness-metric > p svg { width: 15px; height: 15px; color: var(--ink); }
.cw-wellness-meter { display: flex; align-items: end; gap: 5px; margin-top: 7px; min-height: 23px; }
.cw-wellness-meter:empty { display: none; }
.cw-wellness-meter .spark { flex: 1; height: 22px; min-width: 0; margin: 0; }
.cw-wellness-meter .spark span[data-tone] { background: var(--cw-metric-color,var(--cw-tone)); opacity: .55; }
.cw-wellness-meter .spark span[data-tone]:last-child { opacity: 1; }
.cw-wellness-meter .spark [data-empty] { visibility: hidden; }
.cw-wellness-delta { margin-left: auto; color: var(--cw-tone); font-size: 10px; font-weight: 650; white-space: nowrap; }
.cw-coach-observation { margin: 6px 0 0 auto; }
.ath-status-item .ath-status-meter span { background: var(--cw-metric-color,var(--cw-tone)); }
.ath-status-item:not([data-tone="neutral"]) .ath-status-meter span { min-width: 3px; }

.cw-sleep-scale {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 5px 3px;
  margin: 9px 0 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 10px;
  color: var(--muted);
}
.cw-sleep-scale p, .cw-sleep-scale div { grid-column: 1 / -1; }
.cw-sleep-scale p { color: var(--ink); font-weight: 600; }
.cw-sleep-scale div { height: 6px; border-radius: 999px; background: linear-gradient(90deg,#c26c67,#e5c27e 50%,#71a88a); }
.cw-sleep-scale span:first-of-type { color: var(--cw-negative); }
.cw-sleep-scale span:nth-of-type(2) { color: var(--cw-caution); text-align: center; }
.cw-sleep-scale span:last-of-type { color: var(--cw-positive); text-align: right; }
