/* The gauge card. Shared by the Forecast page's month-to-date meter and the portal
   home's week-to-date meter (js/meter.js). Every colour here is a measured token;
   nothing invents a new grey. */

.meter-card {
  padding: 14px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.meter-head { margin-bottom: 4px; }
.meter-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--text); }
.meter-subtitle { margin: 2px 0 0; font-size: 14px; color: var(--text-muted); }

.meter-gauge { position: relative; }
.meter-svg { display: block; width: 100%; height: auto; }

.meter-track { fill: none; stroke: var(--border); stroke-width: 14; stroke-linecap: round; }

/* The arc's own FILL, not text -- --brand-solid is safe here even though it is not
   safe as text on dark (see CLAUDE.md's "--brand is NOT safe as a fill" trap, which is
   about the opposite case, white text on a --brand fill; a plain stroke has no text
   sitting on it). Month uses --ok, week uses --brand-solid, so the two gauges are
   never mistaken for each other. */
.meter-month .meter-fill { fill: none; stroke: var(--ok); stroke-width: 14; stroke-linecap: round; }
.meter-week .meter-fill { fill: none; stroke: var(--brand-solid); stroke-width: 14; stroke-linecap: round; }

.meter-goal-tick { stroke: var(--text); stroke-width: 2; }

/* Chart annotations, not body text -- the dollar figures they repeat are restated at
   full size and full contrast in the title, the big figure and the footer below, which
   is what satisfies "every figure is also in words" for anyone who cannot read these.
   `color` is set alongside `fill` only so a contrast sweep that reads computed
   `color` (rather than SVG `fill`) still measures the right value. */
.meter-goal-label {
  font-size: 14px;
  font-weight: 700;
  fill: var(--text-muted);
  color: var(--text-muted);
}
.meter-end-label {
  font-size: 14px;
  font-weight: 600;
  fill: var(--text-muted);
  color: var(--text-muted);
}

/* Under the gauge, not inside it: a five-figure amount is wider than the bowl and sat
   on top of the arc's ends. */
.meter-figure {
  margin-top: 2px;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
}
.meter-month .meter-figure { color: var(--ok); }
[data-theme="dark"] .meter-month .meter-figure { color: #6ED89B; }   /* 9.82:1 on --surface */
.meter-week .meter-figure { color: var(--brand); }   /* text-safe in both themes */

.meter-pct {
  margin: 2px 0 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.meter-footer {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

/* --- the portal home's editable weekly goal ------------------------------- */

.meter-goal-edit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meter-goal-edit-row input[type="number"] {
  font: inherit;
  font-size: 15px;
  width: 110px;
  min-height: 34px;
  padding: 4px 8px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.meter-goal-edit-link {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}
.meter-goal-edit-link:hover { color: var(--brand-hover); }
.meter-goal-note { font-size: 13px; color: var(--text-muted); margin-left: 4px; }
