/* Task Helper — the matrix grid (job-intake.md §33; slices MX-1 BRIEF-986 + pan BRIEF-990). Copyright Rapid Surveys Pty Ltd.
 * App tokens only (--bg --card --ink --muted --line --accent --err --hover). Namespaced .mx-. At most 3 value columns show; the
 * rest are panned to (‹ › + "Lists 1–3 of 6" + dots), with a soft fade on an edge that has more. The page never scrolls sideways. */
.mx-wrap { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
/* the fades: only over the table (not the pager). The right one has its own gutter, so it never covers a value. */
.mx-body { position: relative; }
.mx-body.mx-fade-r { padding-right: 28px; }
.mx-body.mx-fade-r::after, .mx-body.mx-fade-l::before { content: ''; position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 3; }
.mx-body.mx-fade-r::after { right: 0; width: 40px; background: linear-gradient(to right, transparent, var(--line) 100%); opacity: .9; }
.mx-body.mx-fade-l::before { left: calc(var(--mx-first, 220px) + 1px); width: 28px; background: linear-gradient(to left, transparent, var(--line) 100%); opacity: .9; }
.mx-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mx-pan { width: auto; margin: 0; min-width: 40px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font-size: 20px; line-height: 1; font-weight: 700; cursor: pointer; }
.mx-pan:disabled { opacity: .35; cursor: default; }
.mx-pan:not(:disabled):hover { background: var(--hover, var(--bg)); }
.mx-pos { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-dots { display: inline-flex; gap: 5px; align-items: center; }
.mx-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; cursor: pointer; }
.mx-dot-on { background: var(--accent); border-color: var(--accent); }
.mx-dot-def { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--accent); }
.mx-grid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: 14px; }
.mx-grid th, .mx-grid td { padding: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.mx-grid thead th { padding: 8px 12px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.mx-grid thead th:not(:first-child) { text-align: right; }
.mx-grid tr > :first-child { background: var(--card); border-right: 1px solid var(--line); }
.mx-grid thead tr > :first-child { background: var(--bg); }
.mx-grid tbody th { padding: 10px 12px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mx-grid tbody tr:last-child > * { border-bottom: 0; }
.mx-head { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.mx-colname { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mx-default { flex: none; color: var(--accent); }
.mx-more { flex: none; width: auto; margin: 0; min-width: 32px; min-height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1; font-weight: 700; cursor: pointer; text-transform: none; letter-spacing: 0; }
.mx-more:hover, .mx-more[aria-expanded="true"] { border-color: var(--line); background: var(--card); color: var(--ink); }
.mx-menu { position: fixed; z-index: 60; min-width: 180px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  box-shadow: 0 8px 24px rgba(20, 28, 40, .18); display: flex; flex-direction: column; }
.mx-menu [role="menuitem"] { width: 100%; margin: 0; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.mx-menu [role="menuitem"]:hover, .mx-menu [role="menuitem"]:focus-visible { background: var(--hover, var(--bg)); outline: 2px solid var(--accent); outline-offset: -2px; }
.mx-menu .mx-danger { color: var(--err); }
.mx-unit { font-size: 12px; font-weight: 400; color: var(--muted); }
.mx-pill { flex: none; display: inline-block; padding: 0 7px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--bg); text-transform: none; letter-spacing: 0; vertical-align: middle; }
.mx-retired { opacity: .65; }
.mx-td { text-align: right; }
.mx-cell { display: block; width: 100%; margin: 0; min-height: 40px; padding: 10px 12px; border: 0; border-radius: 0; background: transparent;
  color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; text-align: right; cursor: pointer; box-sizing: border-box; }
button.mx-cell:hover { background: var(--hover, var(--bg)); }
.mx-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mx-ro { cursor: default; }
.mx-none { color: var(--muted); }
.mx-input { display: block; width: 100%; box-sizing: border-box; margin: 0; min-height: 40px; padding: 8px 12px; border: 2px solid var(--accent);
  border-radius: 0; font: inherit; font-variant-numeric: tabular-nums; text-align: right; background: var(--card); color: var(--ink); }
.mx-msg { margin: 10px 0 0; }
.mx-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: var(--card); }
.mx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .mx-cell, .mx-pan { transition: none; } }

/* look-only extras (BRIEF-1009): a row name that opens something, a second line under it, a marked value + its explanation */
.mx-rowlink { width: auto; margin: 0; padding: 0; min-height: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600;
  text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.mx-rowsub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.mx-mark { margin-left: 3px; color: var(--accent); font-weight: 700; }
.mx-info { cursor: help; }
.mx-info[aria-pressed="true"] { background: var(--hover, var(--bg)); }
.mx-infoline { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; color: var(--ink); }
