/* Pinned and movable table columns (colorder.js). Pinned cells are opaque so rows scroll under them; phone card layouts are not touched (colorder.js only
   sets data-co-l / data-co-r on tables that are shown as tables). Hover, selected and expanded states of app.css still win over the pinned background. */
:root{ --co-sh:rgba(0,0,0,.45); --co-drop:var(--acc); }
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){ --co-sh:rgba(20,30,50,.28); }}
:root[data-theme="light"]{ --co-sh:rgba(20,30,50,.28); }

/* ---------- pinned columns ---------- */
table.rz[data-co-l="1"] :is(th,td:not([colspan])):nth-child(1),
table.rz[data-co-l="2"] :is(th,td:not([colspan])):nth-child(-n+2),
table.rz[data-co-r="1"] :is(th,td:not([colspan])):last-child{position:sticky;z-index:2}
table.rz[data-co-l="1"] :is(th,td:not([colspan])):nth-child(1),
table.rz[data-co-l="2"] :is(th,td:not([colspan])):nth-child(1){left:0}
table.rz[data-co-l="2"] :is(th,td:not([colspan])):nth-child(2){left:var(--co-l1w,44px)}
table.rz[data-co-r="1"] :is(th,td:not([colspan])):last-child{right:0}
/* headers float above the pinned body cells (and above the page-sticky header row, which is z-index 3) */
table.rz[data-co-l="1"] th:nth-child(1),
table.rz[data-co-l="2"] th:nth-child(-n+2),
table.rz[data-co-r="1"] th:last-child{z-index:5}
/* opaque backgrounds, at a low specificity so hover / selected / expanded row rules in app.css still win */
:where(table.rz[data-co-l="1"]) td:nth-child(1):not([colspan]),
:where(table.rz[data-co-l="2"]) td:nth-child(-n+2):not([colspan]),
:where(table.rz[data-co-r="1"]) td:last-child:not([colspan]){background-color:var(--bg);opacity:1}
:where(table.rz[data-co-l="1"]) tr.site td:nth-child(1),
:where(table.rz[data-co-l="2"]) tr.site td:nth-child(-n+2),
:where(table.rz[data-co-r="1"]) tr.site td:last-child{background-image:linear-gradient(color-mix(in srgb,var(--crit) 6%,transparent),color-mix(in srgb,var(--crit) 6%,transparent))}
/* a dimmed (hidden) row dims what is in the pinned cells, not the opaque cell itself */
table.rz[data-co-r="1"] tr.hid td:last-child > *,table.rz[data-co-l] tr.hid td:nth-child(-n+2) > *{opacity:.65}
/* a floating hint: a soft shadow beside a pinned edge while the table is scrolled sideways */
.tw.co-sl table.rz[data-co-l="1"] :is(th,td:not([colspan])):nth-child(1),
.tw.co-sl table.rz[data-co-l="2"] :is(th,td:not([colspan])):nth-child(2){box-shadow:7px 0 8px -5px var(--co-sh)}
.tw.co-sr table.rz[data-co-r="1"] :is(th,td:not([colspan])):last-child{box-shadow:-7px 0 8px -5px var(--co-sh)}
.tw.co-sl table.rz[data-co-l] tr.dv.cur td:nth-child(1){box-shadow:inset 3px 0 var(--acc),inset 0 -1px color-mix(in srgb,var(--acc) 30%,transparent),7px 0 8px -5px var(--co-sh)}
/* the sticky page header row (rz-fit tables) keeps its hairline */
.tw.rz-fit table.rz[data-co-l] th,.tw.rz-fit table.rz[data-co-r] th{box-shadow:inset 0 -1px var(--bd2)}

/* ---------- moving columns ---------- */
table.rz th.co-mv{padding-left:20px}
.co-g{position:absolute;left:0;top:0;bottom:0;width:18px;cursor:grab;touch-action:none;z-index:4;-webkit-tap-highlight-color:transparent}
.co-g::before{content:"";position:absolute;left:5px;top:50%;width:8px;height:14px;margin-top:-7px;opacity:0;transition:opacity .12s;
  background:radial-gradient(circle,var(--ink3) 1.1px,transparent 1.6px) 0 0/4px 5px}
th:hover .co-g::before,th:focus-within .co-g::before,.co-g:hover::before{opacity:1}
.co-g:hover::before{background-image:radial-gradient(circle,var(--acc) 1.2px,transparent 1.7px)}
@media (pointer:coarse){.co-g{width:26px}.co-g::before{opacity:.7}table.rz th.co-mv{padding-left:28px}}
th.co-mv:focus-visible{outline:2px solid var(--acc);outline-offset:-2px}
th.co-src{opacity:.45}
body.co-dragging,body.co-dragging *{cursor:grabbing!important;user-select:none!important}
.co-ghost{position:fixed;z-index:95;pointer-events:none;max-width:240px;padding:6px 12px;border:1px solid var(--acc);border-radius:var(--r);background:var(--sf);color:var(--ink);
  font:600 11px var(--font);letter-spacing:.06em;text-transform:uppercase;box-shadow:0 8px 22px rgba(0,0,0,.35);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.co-drop{position:fixed;z-index:94;width:3px;pointer-events:none;background:var(--co-drop);border-radius:2px;box-shadow:0 0 0 1px color-mix(in srgb,var(--bg) 70%,transparent)}
.co-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
