/* Client Usage (plans/platform-usage-plan.md Wave 2, CON-MTR-015..019).
   Linked from inside <main id="view-clientusage">; every rule is scoped to it.
   Since the 2026-11-07 review (A5) it is the stylesheet of all the usage and
   health pages (Company usage, Usage & cost, Company dashboard, Platform
   dashboard, Audit, Where the time goes): each links it from its own view, and
   their rules are at the end, scoped to their views.
   Tokens only (UI.md §2); no inline styles are set by platformusage.js — the
   sparkline's geometry is SVG attributes, not style.

   THE MONTH FIGURE IS TINTED ON PURPOSE. Widget spend is the one figure on the
   screen that is not for the week (it is month to date, because the widget's
   ceiling is monthly). A different period in an identical-looking line is a
   number somebody adds to the week's spend, so its name and value on the Details
   line carry the amber tint and a dashed left edge. It is the only
   tint on the screen, which is what lets it be noticed. */

#view-clientusage .puhead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;
  gap:var(--s-3)}
#view-clientusage .puhead p{max-width:80ch;margin:var(--s-1) 0 0}
#view-clientusage .puactions{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--s-3);
  font-size:var(--text-sm)}
#view-clientusage .puactions label{display:flex;flex-direction:column;gap:var(--s-1)}
#view-clientusage select{font:inherit;font-size:var(--text-sm);padding:var(--s-1) var(--s-2);
  border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink)}
#view-clientusage select:focus-visible{
  outline:var(--focus-width) solid var(--accent);outline-offset:var(--focus-offset)}

#view-clientusage .puexportnote{max-width:80ch;margin:var(--s-2) 0 0}
#view-clientusage .pubad{color:var(--stop);border-left:3px solid var(--stop);padding:var(--s-1) var(--s-3);
  max-width:80ch}
#view-clientusage .puperiod{margin:var(--s-4) 0 var(--s-2);max-width:90ch}

#view-clientusage .puscroll{overflow-x:auto;max-width:100%}
#view-clientusage table{min-width:48rem}
#view-clientusage th,#view-clientusage td{vertical-align:top}
#view-clientusage .num{text-align:right;font-variant-numeric:tabular-nums}
#view-clientusage .pusub{display:block;font-size:var(--text-xs);color:var(--ink-2);
  font-weight:400;text-transform:none;letter-spacing:normal}
#view-clientusage .pulist{list-style:none;margin:0;padding:0}
#view-clientusage .pulist li{white-space:nowrap}
#view-clientusage .pucomplete{min-width:16rem}
#view-clientusage td.pumonth{min-width:12rem}
#view-clientusage .pucomplete .pulist li{white-space:normal}
#view-clientusage .puwarn{color:var(--wait)}
#view-clientusage .pubadtext{display:block;color:var(--stop);font-size:var(--text-xs)}
#view-clientusage .puunknown{color:var(--ink-2);font-style:italic}
#view-clientusage .pufloor{color:var(--wait)}

/* The client is a control that asks for borrowed access, and nothing else. */
#view-clientusage .puclient{font-size:var(--text-sm);font-weight:600}
#view-clientusage .puclientcell{text-transform:none;letter-spacing:normal;color:var(--ink);
  font-size:var(--text-sm);min-width:10rem}
#view-clientusage .pustate{display:inline-block;margin-top:var(--s-1);font-size:var(--text-xs);
  padding:0 var(--s-2);border:1px solid var(--wait);border-radius:var(--radius);color:var(--wait);background:var(--wait-soft)}
#view-clientusage tr.pusupplied td{color:var(--ink-2)}

#view-clientusage .pumonth{background:var(--wait-soft);border-left:1px dashed var(--wait)}
#view-clientusage .pumonthtag{color:var(--wait);font-weight:600;text-transform:uppercase;
  font-size:var(--text-xs);letter-spacing:.05em;display:block}

/* Six columns in sight; the row's Details line holds the other seven figures as
   name and value, two pairs to a line where there is room. */
#view-clientusage .puact{text-align:right;white-space:nowrap}
#view-clientusage tr.pumore td{background:var(--surface-2)}
#view-clientusage .pudl{display:grid;grid-template-columns:repeat(2,max-content minmax(10rem,1fr));
  gap:var(--s-2) var(--s-4);margin:0;font-size:var(--text-sm)}
#view-clientusage .pudl dt{font-weight:600}
#view-clientusage .pudl dd{margin:0}

#view-clientusage tfoot th,#view-clientusage tfoot td{border-top:2px solid var(--line);
  font-weight:600;text-transform:none;letter-spacing:normal;color:var(--ink);
  font-size:var(--text-sm)}

/* One series, one hue: the accent. A zero week is a hairline, not a gap, so
   "nothing" and "not shown" do not look alike. */
#view-clientusage .puspark rect{fill:var(--accent)}
#view-clientusage .puspark rect.zero{fill:var(--line)}

#view-clientusage .pulegend{display:grid;grid-template-columns:max-content 1fr;gap:var(--s-1) var(--s-4);
  margin:var(--s-4) 0;max-width:90ch;font-size:var(--text-sm)}
#view-clientusage .pulegend dt{font-weight:600}
#view-clientusage .pulegend dd{margin:0;color:var(--ink-2)}
#view-clientusage .pulegend dd b{color:var(--ink)}

#view-clientusage #putrend{min-width:0;width:auto}
#view-clientusage .putrendtotal th,#view-clientusage .putrendtotal td{font-weight:600;
  border-top:2px solid var(--line)}

/* WHAT THEY USE — its own table rather than four more columns on a twelve-column
   one (index.html says why, CON-MTR-023). Narrower than the table above, because
   it carries no money and no month, so nothing here needs the month tint. */
#view-clientusage #puusetable{min-width:64rem}

/* A screen this console has no words for renders AS THE TOKEN metering sent
   (CON-MTR-023). Monospaced and muted so it reads as an id rather than as a
   clumsy translation: the reader can see at a glance which names are ours and
   which are a screen we have no word for yet. */
#view-clientusage .putoken{font-family:var(--mono);font-size:var(--text-xs);color:var(--ink)}

/* WENT QUIET (CON-MTR-024). No tint and no badge: it is a fact on a screen, not
   an alarm, and nothing here is emailed or alerted on. */
#view-clientusage #puquiet{min-width:38rem}
#view-clientusage #puquiet td,#view-clientusage #puquiet th{white-space:normal}
#view-clientusage .puqgap{display:block;font-size:var(--text-xs);max-width:40ch}
#view-clientusage #puquietempty,#view-clientusage #puquietnever{max-width:80ch}

/* ── The other usage and health pages (A5, 2026-11-07) ─────────────────────── */

/* app.css gives `.note` a bar and padding for the pages not yet moved; on these
   pages a note is the Front Office's: one grey line that folds behind its ?. */
#view-clientusage .note, #view-usage .note, #view-audit .note, #view-dashboard .note,
#view-health .note, #view-timespent .note { border-left: 0; padding: 0; margin: 0 0 var(--s-3); line-height: inherit; }

/* The legend boxes sit under what they explain. */
#view-clientusage .pulegendbox, #view-dashboard > .callout, #view-health > .callout { margin-top: var(--s-4); }
#view-clientusage .pulegendbox .pulegend { margin: var(--s-2) 0 0; }

/* Company dashboard: name, state chip, why. The member's own dot and colour are
   the chip's now, so the row is three columns, not four. */
#view-dashboard .tdrow { grid-template-columns: 9.5rem max-content 1fr; align-items: center; }
#view-dashboard .tdrow .why { grid-column: auto; }
#view-dashboard .hsum, #view-health .hsum { gap: var(--s-2); }
@media (max-width: 34rem) {
  #view-dashboard .tdrow { grid-template-columns: 1fr max-content; }
  #view-dashboard .tdrow .why { grid-column: 1 / -1; padding-left: 0; }
}

/* Platform dashboard: the audit spool's lines carry a chip in the middle column. */
#view-health .spool .srow { align-items: center; }

/* Audit: the Details link at the row's end, and the ids it opens. */
#view-audit .audit-act { text-align: right; white-space: nowrap; }
#view-audit tr.audit-more td { background: var(--surface-2); }
#view-audit .audit-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-3); margin: 0;
  font-size: var(--text-sm); }
#view-audit .audit-dl dt { color: var(--ink-2); }
#view-audit .audit-dl dd { margin: 0; overflow-wrap: anywhere; }
#view-audit #acomplete { margin: var(--s-2) 0; }
#view-audit #aregistry { margin-top: var(--s-4); }

/* Usage & cost: the meter list's fold under the figures. */
#view-usage #umeters { margin-top: var(--s-4); }

/* Where the time goes: a step's recorded name folds behind a ? inside its cell. */
#view-timespent td .note { margin: 0; }
/* Where the time goes: the ribbon takes the line, Refresh sits at its end. */
#view-timespent .tstools > .ribbon { flex: 1 1 auto; }
