/* hitch-table.css — the shared table's look (window.HitchTable, /assets/js/hitch-table.js) and THE stage pill.
   Every colour is a page token (hitch-tokens.css + appearance.js), so it follows Light / Dark. A page that
   keeps its own table look (the pipeline board's .pb-tablewrap in opps.css) passes its own class names to
   HitchTable.create and uses only the stage bar from here. Text fills its box: no ch caps, no balance. */

/* THE STAGE BAR (HitchTable.stageBar): one pill that fills light orange through the working stages, its name
   and "n/N" in bold (the thin face on orange read faint: 12.3:1 light, 7.1:1 dark, measured 2026-12-01).
   Closed stages are not progress: won green, lost red, No bid dashed, Cancelled struck through. */
.h-sbar { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 132px; height: 20px; padding: 0 9px; box-sizing: border-box; border-radius: 100px; overflow: hidden;
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink-dim); border: 1px solid var(--line); vertical-align: middle; }
.h-sbar .f { position: absolute; inset: 0 auto 0 0; width: calc(var(--fill, 0) * 100%); }
.h-sbar .w, .h-sbar .n { position: relative; }
.h-sbar .n { letter-spacing: 0; }
.h-sbar.work { color: var(--ink); font-weight: 600; border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.h-sbar.work .f { background: color-mix(in srgb, var(--accent) 55%, transparent); }
body:not(.light) .h-sbar.work .f { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.h-sbar.won { color: var(--green, var(--good)); border-color: var(--green, var(--good)); }
.h-sbar.won .f { width: 100%; background: color-mix(in srgb, var(--green, var(--good)) 16%, transparent); }
.h-sbar.lost { color: var(--pb-hot, var(--bad)); border-color: var(--pb-hot, var(--bad)); }
.h-sbar.lost .f { width: 100%; background: var(--pb-hot-dim, color-mix(in srgb, var(--bad) 12%, transparent)); }
.h-sbar.nobid { color: var(--ink-faint); border-style: dashed; }
.h-sbar.cancelled { color: var(--ink-faint); text-decoration: line-through; }

/* THE TABLE (default class names, HitchTable.create with no `cls`): hairline rows, mono headings that sort */
.ht-wrap { overflow-x: auto; margin-top: 14px; }
.ht-wrap table { border-collapse: collapse; width: 100%; }
.ht-wrap thead th { padding: 0 16px 0 0; text-align: left; vertical-align: bottom; font-weight: 400; white-space: nowrap;
  border-bottom: 1px solid var(--line-soft); }
.ht-wrap thead th:last-child, .ht-wrap tbody td:last-child { padding-right: 0; }
.ht-wrap thead th button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 0; background: none; border: 0;
  cursor: pointer; text-align: left; font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); }
.ht-wrap thead th.num button { justify-content: flex-end; text-align: right; }
.ht-wrap thead th button:hover, .ht-wrap thead th.on button { color: var(--ink); }
.ht-wrap thead th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ht-arr { font-size: .8em; color: var(--accent-ink,var(--accent)); min-width: 1em; }
.ht-yours { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--accent-ink,var(--accent)); }
.ht-wrap tbody td { padding: 15px 16px 15px 0; border-top: 1px solid var(--line-soft); vertical-align: baseline; color: var(--ink-dim); }
.ht-wrap tbody tr:first-child td { border-top: 0; }
.ht-wrap tbody td.num { text-align: right; white-space: nowrap; }
.ht-wrap tbody td.t { min-width: 260px; color: var(--ink); }
.ht-empty { color: var(--ink-faint); padding: 22px 0; }

/* the Columns menu (HitchTable popHtml), drawn as a panel under the list's bar */
.ht-pop { margin-top: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft, var(--panel));
  display: grid; gap: 2px; width: 360px; max-width: 100%; }
.ht-pop .cap { font-family: var(--mono); font-size: .6875rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 6px; }
.ht-pop .foot { padding: 6px 10px 4px; font-size: .78rem; color: var(--ink-faint); }
.ht-pop .sep { height: 1px; background: var(--line-soft); margin: 6px 8px; }
.ht-colrow { display: flex; align-items: center; gap: 4px; }
.ht-coltoggle { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 7px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink-dim); font-size: .88rem; text-align: left; cursor: pointer; }
.ht-coltoggle:hover { background: var(--panel); color: var(--ink); }
.ht-coltoggle[disabled] { opacity: .7; cursor: default; }
.ht-coltoggle .tag { font-family: var(--mono); font-size: .6875rem; color: var(--ink-faint); }
.ht-coltoggle .sw { width: 26px; height: 15px; border-radius: 100px; background: var(--panel2, var(--line-soft)); border: 1px solid var(--line);
  position: relative; flex: none; }
.ht-coltoggle .sw::after { content: ""; position: absolute; top: 1px; left: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink-faint); }
.ht-coltoggle.on .sw { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ht-coltoggle.on .sw::after { left: 12px; background: var(--accent); }
.ht-colmove { width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--ink-faint); cursor: pointer; font-size: .7rem; }
.ht-colmove:hover:not([disabled]) { background: var(--panel); color: var(--ink); }
.ht-colmove[disabled] { opacity: .35; cursor: default; }
.ht-menurow { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 9px; background: none;
  color: var(--ink-dim); font-size: .86rem; cursor: pointer; }
.ht-menurow:hover { background: var(--panel); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ht-coltoggle .sw::after { transition: none; } }
