/* ==========================================================================
   ROW LIST (.verser-row-list) and ROW (.verser-row-card). CSS only.

   Default look = the app's grouped list .glist + .glist-row (about 100 uses), not the newer ui-kit .row-card
   (1 use): one glass card, 22px radius, 4px 16px inside; rows at least 66px tall with no fill of their own, a
   hairline between them; a 44px icon square, the title 14/600, one JetBrains Mono line at 12, a quiet 20px chevron.

   .verser-row-list            the glass card. data-variant="plain": no glass (a sheet's action list)
   .verser-row-card            a row (div, a or button). A button/a row presses and lightens on hover.
                               --verser-row-card-row-padding-block (default 12px) sets its top and bottom room (Tasks: 4px)
     data-tone="danger"        a destructive row (the title and icon in rose)
     data-size="sm"            a 52px row with a 36px icon (the action list rows)
     data-size="line"          one line at the tap height (44px, Home's brief): a bare 18px glyph in the icon slot (no
                               square), the title, then the sub on the same line cut with an ellipsis, an optional pill,
                               a 16px chevron. The title keeps its words and gives way only once the sub has no room
                               left. Put the whole text in the row's aria-label.
   Parts, in order:
     .verser-row-card-icon     44px rounded square (or put a .verser-avatar there); --verser-row-card-icon-glyph-size
                               (default 22px) sizes the icon inside it (the Toolbox: 24px)
     .verser-row-card-text     > .verser-row-card-title + .verser-row-card-sub
     .verser-row-card-meta     trailing mono meta (a time, a count) or a pill
     .verser-row-card-chev     trailing chevron; it mirrors under dir="rtl"
     .verser-row-card-order    trailing Move up / Move down (.verser-icon-btn data-size="sm", each named for its row with
                               aria-label; the first row's up and the last row's down disabled): a list put in order by
                               hand (a project's sections), with a keyboard or a screen reader as well as a tap
   ========================================================================== */

.verser-row-list{
  /* One column that never grows past the card: a row's one-line sub (nowrap) would otherwise widen it. */
  box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);margin:0;
  padding-block:var(--verser-row-card-padding-block,var(--space-1));
  padding-inline:var(--verser-row-card-padding-inline,var(--space-4));
  border:1px solid var(--verser-row-card-border,var(--vx-hair));border-radius:var(--verser-row-card-radius,var(--vx-r-lg));
  background:var(--verser-row-card-gloss,var(--surface-gloss)),var(--surface-fog),var(--verser-row-card-fill,var(--surface-panel));
  background-origin:border-box;box-shadow:var(--verser-row-card-shadow,var(--vx-shadow));
  -webkit-backdrop-filter:var(--verser-row-card-blur,var(--blur));backdrop-filter:var(--verser-row-card-blur,var(--blur));
  list-style:none
}
/* Two row lists one after the other (the Toolbox's Special tools: Credit Underwriting, then the Studio tools) keep a
   gap between their cards instead of touching. */
.verser-row-list:not([hidden]):not(.hidden)+.verser-row-list{margin-block-start:var(--verser-row-card-stack-gap,var(--space-3))}
.verser-row-list[data-variant="plain"]{padding-block:0;padding-inline:var(--space-1);border:0;background:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
.verser-row-list>:not([hidden]):not(.hidden)~:not([hidden]):not(.hidden){border-block-start:1px solid var(--verser-row-card-divider,var(--border-row))}

.verser-row-card{
  box-sizing:border-box;display:flex;align-items:center;
  gap:var(--verser-row-card-gap,calc(var(--space-3) + 2px));inline-size:100%;
  min-block-size:var(--verser-row-card-row-height,max(var(--tap-min),calc(66px * var(--density))));margin:0;
  padding-block:var(--verser-row-card-row-padding-block,var(--space-3));padding-inline:0;border:0;border-radius:0;
  background:var(--verser-row-card-row-fill,var(--surface-row));color:var(--text);
  font:inherit;font-family:var(--font-ui);font-size:var(--font-size-small);text-align:start;text-decoration:none
}

.verser-row-card-icon{
  display:grid;place-items:center;flex:none;
  inline-size:var(--verser-row-card-icon-size,44px);block-size:var(--verser-row-card-icon-size,44px);
  border-radius:var(--radius-sm);background:var(--vx-off);box-shadow:inset 0 0 0 1px var(--vx-hair);color:var(--text)
}
.verser-row-card-icon>svg,.verser-row-card-icon .icon{inline-size:var(--verser-row-card-icon-glyph-size,22px);block-size:var(--verser-row-card-icon-glyph-size,22px)}
.verser-row-card-text{display:block;flex:1 1 auto;min-inline-size:0}
.verser-row-card-title{display:block;margin:0;font-size:var(--verser-row-card-title-size,var(--font-size-small));font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.verser-row-card-sub{display:block;margin:2px 0 0;font-family:var(--font-mono);font-size:var(--verser-row-card-sub-size,var(--font-size-meta));line-height:1.45;color:var(--text-secondary);overflow-wrap:anywhere;text-wrap:pretty}
.verser-row-card-sub:is(:lang(ar),:dir(rtl)){font-family:var(--font-mono-rtl);letter-spacing:0;text-transform:none}   /* JetBrains Mono has no Arabic: Plex Arabic first */
/* A sub that is a sentence (2 Nov, the lead's B1): data-voice="sentence" on the sub, or on the list for all its rows
   ("Leave, letters and HR documents" in the Toolbox), sets it in the UI face at the small size. The default sub stays
   mono: it is meta (a name, a status, a time). */
:is(.verser-row-card-sub[data-voice="sentence"],.verser-row-list[data-voice="sentence"] .verser-row-card-sub){font-family:var(--font-sentence,var(--font-ui));font-size:var(--font-size-small);font-weight:var(--vx-fw-regular);letter-spacing:0}
/* One line (2 Nov, the live review C16), opt-in: data-lines="1" on the sub keeps it on one line with an ellipsis. Put the
   whole text in the row's accessible name (aria-label or a title) so nothing is lost. */
.verser-row-card-sub[data-lines="1"]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;overflow-wrap:normal}
.verser-row-card-meta{flex:none;font-family:var(--font-mono);font-size:var(--font-size-meta);font-weight:500;color:var(--text-secondary);white-space:nowrap;font-variant-numeric:tabular-nums}
.verser-row-card-meta:is(:lang(ar),:dir(rtl)){font-family:var(--font-mono-rtl);letter-spacing:0}
.verser-row-card-chev{flex:none;display:grid;place-items:center;color:var(--text-secondary);opacity:.5}
.verser-row-card-chev>svg,.verser-row-card-chev .icon{inline-size:20px;block-size:20px}
[dir="rtl"] .verser-row-card-chev,.verser-row-card-chev:dir(rtl){transform:scaleX(-1)}

.verser-row-card-order{flex:none;display:flex;align-items:center;gap:var(--space-1)}
.verser-row-card[data-size="sm"]{min-block-size:max(var(--tap-min),calc(52px * var(--density)));padding-block:6px}
.verser-row-card[data-size="sm"] .verser-row-card-icon{inline-size:36px;block-size:36px}
.verser-row-card[data-size="sm"] .verser-row-card-icon>svg,.verser-row-card[data-size="sm"] .verser-row-card-icon .icon{inline-size:20px;block-size:20px}
.verser-row-card[data-size="line"]{min-block-size:var(--tap-min);padding-block:var(--space-1);gap:var(--space-2)}
.verser-row-card[data-size="line"] .verser-row-card-icon{inline-size:auto;block-size:auto;background:none;box-shadow:none;color:var(--text-muted)}
.verser-row-card[data-size="line"] .verser-row-card-icon>svg,.verser-row-card[data-size="line"] .verser-row-card-icon .icon{inline-size:18px;block-size:18px}
.verser-row-card[data-size="line"] .verser-row-card-text{display:flex;align-items:baseline;gap:var(--space-2)}
.verser-row-card[data-size="line"] :is(.verser-row-card-title,.verser-row-card-sub){margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;overflow-wrap:normal}
.verser-row-card[data-size="line"] .verser-row-card-title{flex:0 1 auto}
.verser-row-card[data-size="line"] .verser-row-card-sub{flex:1 1 0;min-inline-size:0;color:var(--text-muted)}
.verser-row-card[data-size="line"] .verser-row-card-chev>svg,.verser-row-card[data-size="line"] .verser-row-card-chev .icon{inline-size:16px;block-size:16px}
.verser-row-card[data-tone="danger"],.verser-row-card[data-tone="danger"] .verser-row-card-icon{color:var(--danger-text)}
/* A destructive row reads as one at a glance (2 Nov, the live review C11): its icon tile takes a rose tint and rim. */
.verser-row-card[data-tone="danger"] .verser-row-card-icon{
  background:color-mix(in srgb,var(--danger) 16%,transparent);box-shadow:inset 0 0 0 var(--border-width) color-mix(in srgb,var(--danger) 40%,transparent)
}
.verser-row-card[data-tone="danger"] .verser-row-card-sub{color:color-mix(in srgb,var(--danger-text) 80%,transparent)}

/* Interactive rows */
:is(a,button).verser-row-card,.verser-row-card[data-interactive]{
  cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:transform 160ms var(--ease-out),opacity 120ms ease
}
:is(:is(a,button).verser-row-card,.verser-row-card[data-interactive]):active:not(:disabled):not([aria-disabled="true"]){opacity:.66;transform:scale(.985)}
:is(:is(a,button).verser-row-card,.verser-row-card[data-interactive]):focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-xs)}
:is(:is(a,button).verser-row-card,.verser-row-card[data-interactive]):is(:disabled,[aria-disabled="true"]){opacity:.45;cursor:default}
@media (hover:hover) and (pointer:fine){
  :is(:is(a,button).verser-row-card,.verser-row-card[data-interactive]):not(:disabled):not(:active):hover{box-shadow:inset 0 0 0 100px var(--surface-fill-1)}
}
@media (prefers-reduced-motion:reduce){
  :is(a,button).verser-row-card,.verser-row-card[data-interactive]{transition:none}
  :is(:is(a,button).verser-row-card,.verser-row-card[data-interactive]):active{transform:none!important}
}

/* ROW SLOT (.verser-row-slot, 2 Nov, the Toolbox's pins): a row that is itself a button plus one small action of its own
   (a ☆ pin), which cannot sit inside the row's button. The slot is the list's child (dividers, hidden) and holds the row
   and, after it, a .verser-row-slot-action (.verser-icon-btn data-size="sm", aria-pressed, an aria-label naming the row).
   The action sits just before the row's chevron, centred on it; the row's text keeps clear of it. aria-pressed="true"
   fills its icon in the accent. */
.verser-row-slot{position:relative;display:block;min-inline-size:0}
.verser-row-slot.hidden,.verser-row-slot[hidden]{display:none}
.verser-row-slot>.verser-row-card{inline-size:100%}
.verser-row-slot:has(>.verser-row-slot-action)>.verser-row-card .verser-row-card-text{margin-inline-end:var(--verser-row-slot-action-room,36px)}
.verser-row-slot-action{position:absolute;inset-block-start:50%;inset-inline-end:var(--verser-row-slot-action-end,28px);transform:translateY(-50%);color:var(--text-secondary)}
.verser-row-slot-action[aria-pressed="true"]{color:var(--a)}
.verser-row-slot-action[aria-pressed="true"] svg{fill:currentColor}

/* A row list is a size container named card (27 Oct), like the kit's glass card: its rows can follow the list's own
   width (@container card (...)), which on a desktop is not the window's. */
.verser-row-list{container:card/inline-size}

/* ==========================================================================
   INBOX ITEM (.verser-row-card[data-variant="inbox"]): one thing waiting for the person (a request to approve, a
   task to verify, an ERPNext approval), in a .verser-row-list. CSS only.

   Children, in this order:
     .verser-row-card-icon     the source glyph (Verser, task, attendance, ERPNext): an <svg> or a .verser-avatar
     .verser-row-card-text     > .verser-row-card-title (what it is) + .verser-row-card-sub (requester · age · step 1 of 2;
                               wrap the age in <time>, figures in <bdi>)
     .verser-row-card-amount   optional: the amount (VerserUI.fmt.money), mono, in <bdi>
     .verser-row-card-actions  the buttons: Approve (.verser-btn data-variant="primary" data-size="sm"), Decline
                               (data-size="sm"), or one Open (data-size="sm")
     .verser-row-card-status   optional: role="status"; what happened ("Approved", or why it failed)
   On a narrow list the amount and the actions take their own lines under the words; from a 560px list they sit at the row's end.

     data-state  pending (default)  actions on
                 acting             a tap is on its way: actions disabled (give the buttons disabled too, and
                                    aria-busy="true" on the one tapped), the loading light runs along the row's foot
                 done               the outcome in .verser-row-card-status, the actions gone, the row quieter
                 error              the reason in .verser-row-card-status (rose), the actions back
     data-source verser | task_verification | attendance_correction | erpnext   (for the screen; no colour of its own)
   Hooks: --verser-inbox-actions-gap, -amount-text, -done-opacity.
   ========================================================================== */
.verser-row-card[data-variant="inbox"]{
  position:relative;flex-wrap:wrap;align-items:flex-start;row-gap:var(--space-2);overflow-x:clip
}
.verser-row-card[data-variant="inbox"]>.verser-row-card-text{flex:1 1 0;min-inline-size:min(12rem,60%);align-self:center}
.verser-row-card[data-variant="inbox"]>.verser-row-card-icon{align-self:center}
.verser-row-card-amount{
  flex:1 0 100%;box-sizing:border-box;align-self:center;
  padding-inline-start:calc(var(--verser-row-card-icon-size,44px) + var(--verser-row-card-gap,calc(var(--space-3) + 2px)));font-family:var(--font-mono);font-size:var(--font-size-small);font-weight:var(--vx-fw-semibold);white-space:nowrap;
  color:var(--verser-inbox-amount-text,var(--text));font-variant-numeric:tabular-nums;unicode-bidi:isolate
}
.verser-row-card-actions{
  display:flex;flex-wrap:wrap;gap:var(--verser-inbox-actions-gap,var(--space-2));
  flex:1 0 100%;box-sizing:border-box;
  padding-inline-start:calc(var(--verser-row-card-icon-size,44px) + var(--verser-row-card-gap,calc(var(--space-3) + 2px)))
}
.verser-row-card-actions>.verser-btn{flex:1 1 0;min-inline-size:0}
.verser-row-card-status{
  flex:1 0 100%;box-sizing:border-box;margin:0;
  padding-inline-start:calc(var(--verser-row-card-icon-size,44px) + var(--verser-row-card-gap,calc(var(--space-3) + 2px)));
  font-family:var(--font-mono);font-size:var(--font-size-meta);line-height:var(--line-height-body);color:var(--text-secondary)
}
.verser-row-card-status:empty{display:none}
.verser-row-card-status:is(:lang(ar),:dir(rtl)){font-family:var(--font-mono-rtl);letter-spacing:0}
@container card (width >= 560px){
  .verser-row-card[data-variant="inbox"]{flex-wrap:nowrap;align-items:center}
  .verser-row-card[data-variant="inbox"] :is(.verser-row-card-actions,.verser-row-card-amount){flex:none;padding-inline-start:0}
  .verser-row-card[data-variant="inbox"] .verser-row-card-actions>.verser-btn{flex:none}
  .verser-row-card[data-variant="inbox"] .verser-row-card-status{flex:none;max-inline-size:16rem;padding-inline-start:0;text-align:end}
}
.verser-row-card[data-variant="inbox"][data-state="done"]>:not(.verser-row-card-status){opacity:var(--verser-inbox-done-opacity,.6)}
.verser-row-card[data-variant="inbox"][data-state="done"] .verser-row-card-actions{display:none}
.verser-row-card[data-variant="inbox"][data-state="error"] .verser-row-card-status{color:var(--danger-text)}
.verser-row-card[data-variant="inbox"][data-state="acting"] .verser-row-card-actions>.verser-btn:not([aria-busy="true"]){opacity:.45}
/* Acting: the kit's loading light along the row's foot, moved by transform (the checklist's pending row). */
.verser-row-card[data-variant="inbox"][data-state="acting"]{
  --_verser-sweep-dir:1;--_verser-sweep-light:linear-gradient(90deg,transparent,var(--brand-from),var(--brand-to),transparent)
}
.verser-row-card[data-variant="inbox"][data-state="acting"]:dir(rtl){
  --_verser-sweep-dir:-1;--_verser-sweep-light:linear-gradient(270deg,transparent,var(--brand-from),var(--brand-to),transparent)
}
.verser-row-card[data-variant="inbox"][data-state="acting"]::after{
  content:"";position:absolute;inset-inline-start:0;inset-block-end:-1px;inline-size:45%;block-size:2px;
  border-radius:var(--radius-pill);background:var(--_verser-sweep-light);pointer-events:none;
  animation:verser-inbox-sweep var(--verser-loading-duration,1.2s) cubic-bezier(.4,0,.2,1) infinite
}
@keyframes verser-inbox-sweep{
  from{transform:translateX(calc(-100% * var(--_verser-sweep-dir)))}
  to{transform:translateX(calc(225% * var(--_verser-sweep-dir)))}
}
@media (prefers-reduced-motion:reduce){
  .verser-row-card[data-variant="inbox"][data-state="acting"]::after{inset-inline:0;inline-size:auto;transform:none;animation:verser-loading-fade 1.6s ease-in-out infinite}
}

/* ==========================================================================
   ROW WITH AN ACTION (.verser-row-card[data-variant="action"], Projects kit addition #3, 2026-10-30): a row that
   opens (the open area) and also carries its own buttons, outside the inbox (Take it on on an unassigned task in a
   project, Team's Unassigned). The row itself is a <div>; the open area is the <button>, so the two never nest.

   <div class="verser-row-card" data-variant="action">
     <button type="button" class="verser-row-card-open">
       <span class="verser-row-card-icon">…</span>                (an unassigned task: .verser-progress-ring[data-state="unassigned"])
       <span class="verser-row-card-text"><span class="verser-row-card-title"><bdi>Cable tray install</bdi></span>
         <span class="verser-row-card-sub">Unassigned · 6 Nov</span></span>
       <span class="verser-row-card-meta">…</span>                 (optional)
     </button>
     <span class="verser-row-card-actions"><button class="verser-btn" data-variant="primary" data-size="sm">Take it on</button></span>
   </div>
   The actions take their own line under the words, lined up with the title, each button at its own width; from a
   560px list they sit at the row's end. The open area presses and lightens like a button row.

   GROUPED META (.verser-row-card-meta[data-variant="group"]): a pill and a small control side by side at the row's
   end (Members: the PM pill and the row's ⋯; a pending invitation: the Invited pill and Cancel invitation, or a
   small × on a phone).

   SELECTED: a row with an action that is open in a split's pane beside it (aria-current="true" on the row): the
   pressed fill and the picked rim. Only this variant: the other rows keep their screens' own marks.
   ========================================================================== */
.verser-row-card[data-variant="action"]{flex-wrap:wrap;row-gap:var(--space-2)}
.verser-row-card-open{
  display:flex;align-items:center;gap:var(--verser-row-card-gap,calc(var(--space-3) + 2px));flex:1 1 100%;min-inline-size:0;
  margin:0;padding:0;border:0;border-radius:var(--radius-xs);background:none;color:inherit;font:inherit;text-align:start;
  cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:transform 160ms var(--ease-out),opacity 120ms ease
}
.verser-row-card-open:active{opacity:.66;transform:scale(.985)}
.verser-row-card-open:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring);outline-offset:var(--focus-ring-offset)}
@media (hover:hover) and (pointer:fine){.verser-row-card-open:not(:active):hover{box-shadow:inset 0 0 0 100px var(--surface-fill-1)}}
@media (prefers-reduced-motion:reduce){.verser-row-card-open{transition:none}.verser-row-card-open:active{transform:none}}
.verser-row-card[data-variant="action"]>.verser-row-card-actions>.verser-btn{flex:0 0 auto}
@container card (width >= 560px){
  .verser-row-card[data-variant="action"]{flex-wrap:nowrap}
  .verser-row-card[data-variant="action"]>.verser-row-card-open{flex:1 1 auto}
  .verser-row-card[data-variant="action"]>.verser-row-card-actions{flex:none;padding-inline-start:0}
}
.verser-row-card-meta[data-variant="group"]{display:flex;align-items:center;gap:var(--space-1)}
.verser-row-card[data-variant="action"][aria-current="true"]{
  padding-inline:var(--space-2);border-radius:var(--radius-sm);background:var(--surface-pressed);box-shadow:inset 0 0 0 1px var(--selected-edge)
}
