/* Machines › Work (work.js; docs/WORK-ROUTING.md §7, §10): the honest line, the reasons, credits, a capacity strip per
   machine, and every item with its sentence. Flat: hairline rows on the page, no boxed cards; theme tokens only; one
   column on a phone, the state and the action wrapping under the words. */
.wk-page { max-width: 980px; }
.wk-sec { margin: 0 0 22px; }
.wk-head { margin: 4px 0 8px; font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.wk-h { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.wk-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; }
.wk-list { border-top: 1px solid var(--line); }
.wk-r, .wk-mrow, .wk-irow { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); min-width: 0; }
.wk-c { flex: none; min-width: 84px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.wk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.wk-m b, .wk-t { color: var(--text); font-weight: 500; }
.wk-t { font-family: var(--mono); font-size: 12.5px; }
.wk-why { color: var(--text-2); }
.wk-sub { color: var(--text-3); font-size: 12.5px; }
.wk-n { flex: none; min-width: 24px; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
.wk-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ink-3); }
.wk-dot.ok { background: var(--ok); }
.wk-dot.warn { background: var(--warn); }
.wk-st { flex: none; min-width: 64px; text-align: center; }
.wk-act { flex: none; }
.wk-act:empty { display: none; }
.wk-page .bad-t { color: var(--bad-2); }
.wk-glance { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.wk-slots { margin: 0 0 0 20px; }
.wk-slots.flush { margin: 0; border-top: 1px solid var(--line); }
/* A slot: its state, its label and words, its actions — which wrap under the words when the column is narrow (a
   machine's side pane, a phone). */
.wk-srow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); min-width: 0; }
.wk-srow .wk-m { flex: 1 1 180px; }
.wk-srow .wk-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.wk-roles { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.wk-form .vf-row { flex-wrap: wrap; align-items: flex-end; }
.wk-form .wk-grow { flex: 2 1 260px; }
.wk-form .wk-mem { flex: 0 1 120px; }
@media (max-width: 640px) {
  .wk-irow, .wk-srow { flex-wrap: wrap; }
  .wk-slots { margin-left: 0; }
  .wk-srow .wk-m { flex: 1 1 0; min-width: 0; }
  .wk-srow .wk-act { flex-basis: 100%; margin-left: 76px; justify-content: flex-start; }
  .wk-irow .wk-m { flex-basis: calc(100% - 80px); }
  .wk-irow .wk-act { margin-left: 76px; }
  .wk-c { min-width: 64px; }
  .wk-form .wk-grow, .wk-form .wk-mem { flex-basis: 100%; }
}
/* Under a machine its guard holds back: what the owner can do (machine-flows.js guardHelp). */
.wk-help { display: block; margin-top: 2px; color: var(--text-2); }

/* Your accounts, in order (WORK-ROUTING §9): hairline rows, a number, up and down; drag on a desktop. */
.wk-order { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wk-orow { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 6px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); min-width: 0; }
.wk-orow[draggable="true"] { cursor: grab; }
.wk-on { color: var(--text-3); width: 1.4em; flex: none; font-variant-numeric: tabular-nums; padding-top: 1px; }
.wk-orow .wk-m { flex: 1 1 auto; min-width: 0; }
.wk-orow .wk-act .btn.sm { min-width: 36px; min-height: 32px; }
.wk-oacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mx-switch { color: var(--text-2); }
.wk-orow .wk-act { display: flex; gap: 6px; flex-wrap: nowrap; margin-left: auto; }
/* A slot row's buttons shrink and wrap inside the row on a phone, never past it. */
.wk-srow .wk-act { flex: 0 1 auto; min-width: 0; max-width: 100%; }

/* A plan's own usage (WORK-ROUTING §12a): one line per window — its name, a hairline meter, the share used and when it
   starts again. No boxes: a 4 px track in the line colour, filled in the state's tone. */
.wk-plan { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.wk-meters { display: grid; grid-template-columns: minmax(3em, max-content) minmax(60px, 160px) 3.2em auto; align-items: center; gap: 3px 10px; font-size: 12.5px; }
.wk-meter { display: contents; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wk-mn { color: var(--text-2); max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-bar { position: relative; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.wk-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--ok); }
.wk-bar i.warn { background: var(--warn); }
.wk-bar i.bad { background: var(--bad-2, var(--bad)); }
.wk-mp { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.wk-mr { color: var(--text-3); white-space: nowrap; }
.wk-meter.past .wk-mp, .wk-meter.past .wk-mn { color: var(--text-3); }
.wk-h a { color: inherit; text-decoration: none; }
.wk-h a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 640px) {
  /* A slot with meters gives them the row's width; its buttons go under it. */
  .wk-srow:has(.wk-plan) .wk-m { flex-basis: calc(100% - 88px); }
  .wk-srow:has(.wk-plan) .wk-act { flex-basis: calc(100% - 76px); margin-left: 76px; justify-content: flex-start; }
  .wk-meters { grid-template-columns: minmax(3em, max-content) minmax(40px, 1fr) 3em; }
  .wk-mn { max-width: 9em; }
  .wk-mr { grid-column: 2 / -1; white-space: normal; margin-bottom: 2px; }
}
