/* The Litigation Tasks list, the module baseline of 22 October 2026 redesigned on 23 October 2026, and
   the task states the task page shares. The list reuses the intake tiles, card tabs, table card, data
   tables, Filters dialog and side dialog of the other modules, so only what those don't cover lives here. */

.tasks-page {
  display: grid;
  gap: var(--s-24);
  min-width: 0;
}
/* The last card reaches the bottom of the screen, so a short page leaves no empty space under it, as the
   user asked on 9 November 2026 (DESIGN-BASELINE, Spacing and hierarchy). */
.tasks-page:has(> .tasks-strip + .tasks-card) {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100dvh - 140px);
}

/* This stylesheet loads before the shared one, so the hidden attribute is restated with the weight to win
   over shared rules that set display. */
.tasks-page [hidden],
.task-page [hidden] {
  display: none !important;
}

/* The shared stats cards also filter the collection. */
.tasks-tile {
  color: inherit;
  text-decoration: none;
}

.tasks-tile[aria-pressed="true"] {
  border-color: var(--accent-600);
  background: var(--accent-50);
  box-shadow: inset 0 0 0 1px var(--accent-600);
}

.tasks-tile:focus-visible {
  outline: 2px solid var(--accent-600);
  outline-offset: 2px;
}

/* The list's card holds its tabs, then each tab's band of controls and its groups, board or table, so one
   card runs from the tabs to the foot. */
.tasks-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tasks-panel > .people-toolbar {
  gap: var(--s-12);
  margin: 0;
  padding: var(--s-16) var(--s-24);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tasks-toolbar .people-search {
  flex: 1 1 240px;
  max-width: 420px;
}

.tasks-toolbar .people-search input {
  height: 44px;
}

.tasks-toolbar__views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-8);
}

.tasks-toolbar__views > .select-menu {
  min-width: 0;
}

.tasks-toolbar__actions {
  display: flex;
  flex: none;
  gap: var(--s-8);
  margin-left: auto;
}

/* The creation action has breathing room while the active tab stays on the divider. */
.tasks-tabs-bar {
  gap: var(--s-8);
  padding-right: var(--s-24);
}

.tasks-tabs-bar > .card-tabs {
  padding-right: var(--s-8);
}

.tasks-tabs .card-tab {
  min-height: 72px;
}

/* The List view: each group a heading that folds, with its count, over a compact table. */
.tasks-groups {
  display: grid;
  gap: var(--s-24);
  padding: var(--s-8) var(--s-24) var(--s-24);
}

.tasks-group {
  min-width: 0;
}

.tasks-group__head {
  margin: 0 0 var(--s-8);
}

/* The chosen group's heading in the List view, its name and count, as a File page section's heading reads. */
.tasks-group__title {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  margin-bottom: var(--s-16);
  color: var(--ink-800);
  font-weight: var(--fw-bold);
}

.tasks-groups__layout {
  align-items: stretch;
}

/* The group list takes the chosen group's height, not its own, and scrolls inside itself when the groups
   run longer, as the user asked on 30 October 2026. */
.tasks-groups__layout > .tasks-groups__nav {
  height: 0;
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 720px) {
  .tasks-groups__layout > .tasks-groups__nav {
    height: auto;
    min-height: 0;
    overflow-y: visible;
  }
}

.tasks-group__toggle {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  width: fit-content;
  max-width: 100%;
  min-height: 52px;
  padding: 0 var(--s-12);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-800);
  font: inherit;
  font-weight: var(--fw-bold);
  text-align: left;
  cursor: pointer;
}

.tasks-group__toggle:hover {
  background: var(--surface-sunken);
}

.tasks-group__toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent-600);
}

.tasks-group__arrow {
  color: var(--text-muted);
  transition: transform 280ms var(--ease-soft);
}

.tasks-group__toggle[aria-expanded="false"] .tasks-group__arrow {
  transform: rotate(-90deg);
}

.tasks-group__count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 var(--s-8);
  border-radius: var(--radius-pill);
  background: var(--accent-700);
  color: var(--count-text);
  font-size: var(--fs-secondary);
}

[data-tasks-group="overdue"] .tasks-group__count {
  background: var(--count-bg);
  color: var(--count-text);
}

.tasks-group__body {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 280ms var(--ease-soft),
    opacity 280ms var(--ease-soft);
}

.tasks-group__body.is-closed {
  grid-template-rows: 0fr;
  opacity: 0;
}

.tasks-group__clip {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .tasks-group__body,
  .tasks-group__arrow {
    transition: none;
  }
}

/* Every group's table shares one set of column widths, so the columns line up from group to group. The
   task column takes what is left, and a narrow screen scrolls the table inside the card. */
.tasks-table--group {
  table-layout: fixed;
  min-width: 1872px;
}

.tasks-col--account {
  width: 148px;
}
.tasks-col--borrowers {
  width: 212px;
}

.tasks-col--type {
  width: 128px;
}
.tasks-col--file-type {
  width: 128px;
}
.tasks-col--client {
  width: 112px;
}
.tasks-col--file {
  width: 96px;
}
.tasks-col--due {
  width: 116px;
}
.tasks-col--assignee {
  width: 208px;
}
.tasks-col--status {
  width: 124px;
}
.tasks-col--countdown {
  width: 176px;
}
.tasks-col--actions {
  width: 124px;
}

.tasks-table--group thead th {
  position: static;
  padding-block: var(--s-8);
  border-top: 0;
}

.tasks-table--group th,
.tasks-table--group td {
  padding: var(--s-12);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.tasks-table--group th:first-child,
.tasks-table--group td:first-child {
  padding-left: var(--s-24);
}

.tasks-table--group th:last-child,
.tasks-table--group td:last-child {
  padding-right: var(--s-16);
}

.tasks-table--group tbody tr:last-child > * {
  border-bottom: 0;
}

.tasks-table--group tbody tr:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent-600);
}

/* A task's ID, LT and four digits for a Litigation task, muted beside its title. */
.task-ref {
  color: var(--text-muted);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.tasks-row-title {
  display: block;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* The second line under a title: the File it belongs to and its client. */
.tasks-row-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  font-weight: var(--fw-medium);
}

.tasks-row-sub__sep {
  margin: 0 2px;
}

.tasks-row-badge {
  display: inline-flex;
  margin-top: var(--s-4);
}

.tasks-stage {
  display: inline;
  color: var(--ink-800);
}

.tasks-stage__sep {
  color: var(--text-muted);
}

.tasks-stage--manual {
  color: var(--text-muted);
}

/* A due date and the words beside it. Overdue reads red. */
.tasks-due {
  display: block;
  white-space: nowrap;
}

.tasks-due--none {
  color: var(--text-muted);
}

.tasks-due__relative {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  font-weight: var(--fw-medium);
}

.tasks-due__relative.is-overdue,
.tasks-table--group .tasks-due.is-overdue {
  color: var(--danger-text);
  font-weight: var(--fw-bold);
}

.tasks-assignee {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-8);
}

.tasks-assignee .table-person {
  white-space: nowrap;
}

.tasks-table--group .tasks-assignee .table-person {
  min-width: 0;
  white-space: normal;
}

.tasks-assignee__readonly {
  cursor: default;
}

.table-person.tasks-assignee__readonly:hover > span:last-child {
  color: inherit;
}

.tasks-table--group .tasks-assignee-control {
  font-size: var(--fs-body);
}

.tasks-cover {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}

.tasks-team {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  color: var(--ink-800);
  font-weight: var(--fw-bold);
}

.tasks-team .icon {
  --solar-secondary-color: var(--accent-400);
  --solar-secondary-opacity: 0.5;
  width: 24px;
  height: 24px;
  color: var(--accent-600);
}

.tasks-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

/* Icon buttons in a row stay 40px so three fit the column. */
.tasks-row-actions .icon-button {
  width: 40px;
  height: 40px;
}

.icon-button.is-faded,
.btn.is-faded {
  opacity: 0.45;
  cursor: not-allowed;
}

/* The Board view: a column for each group, cards half the height of the 23 October ones. A column never
   narrows below 400px, the user's choice of 13 November 2026, unless the board itself is narrower, as on
   a phone, where a column takes the board's width so its cards are never cut off. Once the columns don't
   fit, the board scrolls sideways inside the card. */
.tasks-panel .tasks-board {
  position: relative;
  grid-template-columns: repeat(var(--tasks-columns, 5), minmax(min(400px, 100%), 1fr));
  gap: var(--s-12);
  padding: var(--s-16) var(--s-24) var(--s-24);
  overflow-x: auto;
}

.tasks-column .desk-column__head h3 {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  margin: 0;
  color: var(--ink-800);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
}

.tasks-column .desk-column__count {
  background: var(--accent-700);
  color: var(--count-text);
  font-weight: var(--fw-bold);
}

[data-tasks-column="overdue"] .desk-column__count {
  background: var(--count-bg);
  color: var(--count-text);
}

.tasks-board-card {
  display: grid;
  gap: var(--s-8);
  padding: var(--s-12) 14px;
}

/* Overdue is a status cue, so it keeps a border above the shared nested-card reset. */
.tasks-board .tasks-board-card.is-overdue {
  border: 1px solid var(--danger-text);
}

.tasks-board-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
}

.tasks-board-card__title {
  margin: 0;
}

/* The reference and the task title open the Task details page in a new tab, highlighted and underlined on
   hover as a Jira key is, and a click elsewhere on the card opens the Task details modal, the user's choice of
   13 November 2026. */
.tasks-board-card__ref {
  text-decoration: none;
}

.tasks-board-card__file-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* The File reference opens the File modal, with the same hover. */
.tasks-board-card__ref:is(:hover, :focus-visible),
.tasks-board-card__task-link:is(:hover, :focus-visible),
.tasks-board-card__file-link:is(:hover, :focus-visible) {
  color: var(--accent-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tasks-board .tasks-board-card:is([data-tasks-card], [data-tasks-pile-card]):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-600);
}

/* A board card keeps its own background while the focus is inside it, as it is when a closed modal hands the
   focus back to the card or its File link, which the user did not want tinted on 13 November 2026. The card's
   focus ring and its links' own focus styles still mark keyboard focus. */
.tasks-board-card.desk-card:focus-within:not(:hover) {
  background: var(--surface);
}

.tasks-board-card.desk-card:focus-within:hover {
  background: #fcfdff;
}

.tasks-board-card__meta {
  display: grid;
  gap: var(--s-8);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  line-height: 1.4;
}

.tasks-board-card__meta > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s-8);
}

.tasks-board-card__meta dt {
  white-space: nowrap;
  font-weight: var(--fw-bold);
}

.tasks-board-card__meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.tasks-board-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding-top: var(--s-8);
  border-top: 1px solid var(--table-row-line);
}

.tasks-board-card__due .tasks-due {
  font-size: var(--fs-secondary);
}

.tasks-board-card__due .tasks-due__relative.badge,
.tasks-countdown.badge {
  display: inline-flex;
  border: 0;
  background: var(--accent-50);
  color: var(--accent-800);
  font-weight: var(--fw-bold);
}

.tasks-countdown.badge {
  white-space: nowrap;
}

.tasks-due + .tasks-countdown.badge {
  margin-top: var(--s-4);
}

.tasks-board-card__due .tasks-due__relative.is-overdue,
.tasks-countdown.badge.is-overdue {
  background: var(--danger-soft);
  color: var(--danger-text);
}

/* On a board card the due date and its countdown chip share one line, since the 400px columns leave room, at
   the user's request of 13 November 2026. A worklist card's Most overdue or Earliest due label stays above. */
.tasks-board-card__due {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-8);
}

.tasks-board-card__due .tasks-pile-card__due-label {
  flex-basis: 100%;
  margin-bottom: 0;
}

.tasks-board-card__due .tasks-due + .tasks-countdown.badge {
  margin-top: 0;
}

/* The card's actions menu at its top right, shown while the card is hovered, holds the focus or has the menu
   open, and always on touch screens where nothing hovers, under the user's direction of 13 November 2026. */
.tasks-board-card__end {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  margin-left: auto;
}

.tasks-board-card__menu {
  flex: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.tasks-board-card__menu > .icon-button {
  width: 32px;
  height: 32px;
}

.tasks-board-card:hover .tasks-board-card__menu,
.tasks-board-card:focus-within .tasks-board-card__menu,
.tasks-board-card__menu:has(> [aria-expanded="true"]) {
  opacity: 1;
}

@media (hover: none) {
  .tasks-board-card__menu {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tasks-board-card__menu {
    transition: none;
  }
}

.tasks-pile-card .tasks-board-card__top {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.tasks-board-card__assignment-label {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}

.tasks-pile-card__due-label {
  display: block;
  margin-bottom: var(--s-4);
}

.tasks-assignee .tasks-assignee-control > span:not(.avatar):not(.visually-hidden) {
  overflow: visible;
  white-space: normal;
}

.tasks-assignee .tasks-assignee-control .avatar {
  width: 32px;
  height: 32px;
}

/* The assignee's picture at the right end of a board card's foot, named on hover, as on a Jira card.
   The user replaced the Assigned to block with it on 13 November 2026. */
.tasks-board-card__owner {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  /* Every picture opens the person's card on hover, so each shows the pointer, the user's request of
     13 November 2026, including a read-only one and a worklist's stack. */
  cursor: pointer;
}

.tasks-board-card__owner * {
  cursor: inherit;
}

button.tasks-board-card__owner:hover {
  background: var(--accent-50);
}

button.tasks-board-card__owner:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent-600);
}

.tasks-board-card__owner .avatar {
  width: 32px;
  height: 32px;
}

.tasks-board-card__owner > .icon {
  --solar-secondary-color: var(--text-muted);
  --solar-secondary-opacity: 0.4;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

/* The task states and markers, each in its own colour family and never the primary. */
.task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge.task-badge--waiting {
  border-color: transparent;
  background: var(--info-50);
  color: var(--info-700);
}

.badge.task-badge--open {
  border-color: transparent;
  background: var(--success-50);
  color: var(--success-700);
}

.badge.task-badge--closed,
.badge.task-badge--done {
  border-color: transparent;
  background: var(--surface-sunken);
  color: var(--ink-700);
}

.badge.task-badge--cancelled {
  border-color: transparent;
  background: var(--surface-sunken);
  color: var(--text-muted);
}

.badge.task-badge--overdue {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger-text);
}

.badge.task-badge--held,
.badge.task-badge--left {
  border-color: transparent;
  background: var(--warning-50);
  color: var(--warning-700);
}

.badge.task-badge--queue {
  border-color: var(--accent-100);
  background: var(--accent-50);
  color: var(--accent-800);
}

/* The empty states sit inside the card, under its toolbar. */
.tasks-empty {
  padding: var(--s-8) var(--s-24) var(--s-24);
}

.tasks-empty .empty-state {
  border-top: 0;
}

/* In the full-height card the empty state fills the space under the controls, keeping its top line under
   them, with its words in the middle. */
.tasks-panel > .tasks-empty:not([hidden]) {
  flex: 1;
  display: grid;
}
.tasks-panel > .tasks-empty > .empty-state {
  align-content: center;
}

/* The side panel that previews a task. */
#tasks-preview.dialog-backdrop {
  place-items: stretch start;
  padding: 0;
  overflow: hidden;
}

#tasks-preview > .dialog {
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}

#tasks-preview[open] > .dialog {
  animation: tasks-preview-enter 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tasks-preview-enter {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #tasks-preview[open] > .dialog {
    animation: none;
  }
}

.tasks-preview {
  display: grid;
  gap: var(--s-16);
}

.tasks-preview__title {
  margin: 0;
  color: var(--ink-800);
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  line-height: 1.35;
}

.tasks-preview__title a:hover {
  color: var(--accent-700);
}

.tasks-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}

.tasks-preview__facts {
  gap: var(--s-12) var(--s-16);
}

.tasks-preview__section {
  display: grid;
  gap: var(--s-8);
}

.tasks-preview__section h4 {
  margin: 0;
  color: var(--ink-800);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
}

.tasks-preview__guidance {
  margin: 0 0 var(--s-8);
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.tasks-preview__documents {
  display: grid;
  gap: var(--s-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tasks-preview__documents li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-12);
}

/* Align Open with the title while keeping its 44px target. */
.tasks-preview__documents li > .icon-button {
  margin-top: calc((var(--s-24) - 44px) / 2);
}

.tasks-preview__documents .icon {
  --solar-secondary-color: var(--accent-400);
  --solar-secondary-opacity: 0.5;
  flex: none;
  color: var(--accent-600);
}

.tasks-preview__doc {
  display: grid;
  flex: 1;
  min-width: 0;
}

.tasks-preview__document-id {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
}

.tasks-preview__copy {
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Create task uses the shared dialog form. */
.task-form__fact {
  align-self: end;
  margin: 0;
  padding-bottom: 10px;
}

.tasks-stage-filter[hidden] {
  display: none;
}

/* The names in Covers and Work without a File take what room is left. */
.tasks-table--covers tbody th[scope="row"],
.tasks-table--runs tbody th[scope="row"] {
  min-width: 220px;
}

.tasks-panel > .data-table-wrap {
  flex: 1;
  border: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  box-shadow: none;
}

.tasks-panel > .data-table-wrap .data-table thead th {
  border-top: 0;
}

@media (max-width: 1100px) {
  .tasks-toolbar__actions {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .tasks-panel > .people-toolbar {
    flex-wrap: wrap;
    padding: var(--s-16);
  }

  .tasks-toolbar .people-search {
    flex: 1 1 100%;
    max-width: none;
  }

  .tasks-toolbar__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .tasks-groups {
    padding: var(--s-8) var(--s-16) var(--s-16);
  }

  /* Each row becomes a block with its column names, as the other tables do on a phone. */
  .tasks-table--group thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .tasks-table--group {
    table-layout: auto;
    min-width: 0;
  }

  .tasks-table--group colgroup {
    display: none;
  }

  .tasks-table--group,
  .tasks-table--group tbody,
  .tasks-table--group tr,
  .tasks-table--group th,
  .tasks-table--group td {
    display: block;
    width: 100%;
  }

  .tasks-table--group th:first-child,
  .tasks-table--group td:first-child,
  .tasks-table--group th:last-child,
  .tasks-table--group td:last-child {
    padding-left: 0;
    padding-right: 0;
  }

  .tasks-table--group tr {
    padding: var(--s-12) var(--s-16);
    border-bottom: 1px solid var(--table-row-line);
  }

  .tasks-table--group th,
  .tasks-table--group td {
    min-width: 0;
    padding: var(--s-4) 0;
    border: 0;
  }

  .tasks-table--group tbody th {
    min-width: 0;
  }

  .tasks-table--group td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--text-muted);
    font-size: var(--fs-secondary);
    font-weight: var(--fw-bold);
  }

  .tasks-col-due,
  .tasks-col-actions {
    width: auto;
  }

  .tasks-row-actions {
    justify-content: flex-start;
    margin-left: calc(-1 * var(--s-8));
  }

  .tasks-empty {
    padding: var(--s-8) var(--s-16) var(--s-16);
  }
}

/* Overview opens the team records in wide dialogs. */
.work-summary {
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.work-summary:hover {
  background: var(--accent-50);
}

.work-records {
  display: grid;
  gap: var(--s-16);
}

.work-records .people-toolbar {
  padding: 0;
  border: 0;
}

.dialog.dialog--work-records {
  width: min(1320px, 100%);
}

@media (min-width: 901px) {
  .work-records .data-table {
    min-width: 1000px;
  }
}

.tasks-board-card[draggable="true"] {
  cursor: grab;
}

.tasks-board-card__closure > div {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
}

/* Task origin stays separate from its status; Ad Hoc work has the stronger accent. */
.badge.task-type {
  border: 0;
  background: var(--surface-sunken);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge.task-type--adhoc {
  background: var(--accent-100);
  color: var(--accent-800);
  font-weight: var(--fw-bold);
}
.tasks-board-card__identity {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
}
.tasks-board-card__drag {
  display: inline-flex;
  color: var(--accent-700);
  cursor: grab;
}
.tasks-board-card__drag .icon {
  width: 18px;
  height: 18px;
}
.tasks-board-card__foot {
  gap: var(--s-12);
}
.task-status-fields {
  display: grid;
  gap: var(--s-16);
}

.tasks-toolbar__presentation {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.tasks-table--archive {
  min-width: 1280px;
}

/* The single archive table shares the collection card's frame. */
.tasks-groups:has([data-tasks-group="archived"]) {
  padding: 0;
}

[data-tasks-group="archived"] .tasks-group__table {
  border: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  box-shadow: none;
}

.tasks-card:has([data-tasks-tab="archived"][aria-pressed="true"])
  .tasks-toolbar {
  border-bottom: 1px solid var(--line-soft);
}

.tasks-card:has([data-tasks-tab="archived"][aria-pressed="true"])
  .people-search {
  max-width: none;
}

.tasks-table--archive .tasks-col--assignee,
.tasks-col--closed-by {
  width: 176px;
}
.tasks-col--resolution {
  width: 128px;
}
.tasks-col--closed-on {
  width: 144px;
}

/* Bundled tasks, 30 October 2026. A worklist card or a worklist row stands for its column's share of a worklist.
   Every value keeps its own labelled line, and the labels share one column so the counts line up. */
.tasks-pile-card__identity {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  min-width: 0;
}

.tasks-pile-icon {
  --solar-secondary-color: var(--accent-700);
  --solar-secondary-opacity: 0.4;
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent-700);
}

.tasks-pile-card .tasks-board-card__meta {
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: var(--s-16);
}

.tasks-pile-card .tasks-board-card__meta > div {
  display: contents;
}

.tasks-pile-title {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  min-width: 0;
}

.tasks-pile-toggle {
  flex: none;
  width: 32px;
  height: 32px;
}

.tasks-pile-toggle .tasks-group__arrow {
  transition: transform 280ms var(--ease-soft);
}

.tasks-pile-toggle[aria-expanded="false"] .tasks-group__arrow {
  transform: rotate(-90deg);
}

.badge.task-badge--mixed {
  border-color: transparent;
  background: var(--surface-sunken);
  color: var(--ink-800);
}

/* The worklist's own tasks open beneath its row as an indented table with its own pager. */
.tasks-pile-detail > td {
  padding: 0 0 var(--s-24) var(--s-48);
}

.tasks-pile-members__wrap {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-control);
}

@media (prefers-reduced-motion: reduce) {
  .tasks-pile-toggle .tasks-group__arrow {
    transition: none;
  }
}

/* The worklist page, 30 October 2026. The heading names the share first with its counts, then the
   worklist, and under the 30 October 2026 worklist layout decision the work card puts the queue of tasks
   across the card with the highlighted task's own screen below it, in either view. */
.pile-page {
  display: grid;
  gap: var(--s-24);
}

.pile-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
}

.pile-item__name {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  min-width: 0;
}

/* Every section of the work card starts at the card's own padding, the tabs, the toolbar, the queue and
   the task alike, so the tabs and toolbar drop the inset their shared components add. */
.pile-tabs-bar,
.pile-tabs-bar > .card-tabs,
.table-card > .people-toolbar.pile-toolbar {
  padding-inline: 0;
}

/* The work card keeps the task content's side padding on every side, as the user asked on 30 October 2026. */
.card.pile-work {
  padding: var(--task-inset);
}

.pile-board {
  display: grid;
  gap: var(--s-24);
}

.pile-queue {
  display: grid;
  align-content: start;
  gap: var(--s-8);
  min-width: 0;
}

.pile-queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
}

/* Collapsed, the queue is one line, the highlighted task's reference, File and borrower with its place
   between previous and next, under the 30 October 2026 worklist layout decision. */
.pile-queue__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12) var(--s-24);
  flex: 1;
  min-width: 0;
}

.pile-queue__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-8) var(--s-24);
  margin: 0;
}

.pile-queue__facts > div {
  display: flex;
  align-items: baseline;
  gap: var(--s-8);
}

.pile-queue__facts dt {
  color: var(--text-muted);
  font-size: var(--fs-secondary);
  font-weight: var(--fw-bold);
}

.pile-queue__facts dd {
  margin: 0;
  color: var(--ink-800);
  font-weight: var(--fw-bold);
}

.pile-queue__steps {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

/* At either end of the queue there is no task that way. */
.pile-queue__steps .icon-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pile-queue__place {
  color: var(--ink-800);
  white-space: nowrap;
}

.pile-queue__toggle .icon {
  transition: transform 280ms var(--ease-soft);
}

.pile-queue__toggle[aria-expanded="false"] .icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .pile-queue__toggle .icon {
    transition: none;
  }
}

.pile-queue__title,
.pile-item__name h3 {
  margin: 0;
  color: var(--ink-800);
  font-size: var(--fs-section);
}

.pile-queue__table tbody tr {
  cursor: pointer;
}

.pile-queue__table tbody tr.is-current {
  background: var(--accent-50);
}

.pile-queue__task {
  white-space: nowrap;
}

.pile-queue__file {
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-800);
  font: inherit;
  font-weight: var(--fw-bold);
  cursor: pointer;
}

.pile-queue__file:hover {
  color: var(--accent-700);
}

.pile-skipped {
  margin-left: var(--s-8);
  border-color: transparent;
  background: var(--surface-sunken);
  color: var(--ink-800);
}

.badge.pile-state {
  border-color: transparent;
  white-space: nowrap;
}

.badge.pile-state--can-act {
  background: var(--success-50);
  color: var(--success-700);
}

.badge.pile-state--held {
  background: var(--warning-50);
  color: var(--warning-700);
}

.badge.pile-state--waiting {
  background: var(--info-50);
  color: var(--info-700);
}

.badge.pile-state--done {
  background: var(--surface-sunken);
  color: var(--ink-800);
}

.pile-item {
  display: grid;
  align-content: start;
  gap: var(--s-24);
  min-width: 0;
}

.pile-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-12);
}

.pile-item__facts {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pile-item__guidance summary {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  color: var(--ink-800);
  font-weight: var(--fw-bold);
  list-style: none;
  cursor: pointer;
}

.pile-item__guidance summary::-webkit-details-marker {
  display: none;
}

.pile-item__guidance:not([open]) .tasks-group__arrow {
  transform: rotate(-90deg);
}

.pile-item__guidance .rich-text {
  margin-top: var(--s-12);
}

/* The highlighted task stays in the work card, below the queue, with no rule between them. It stretches
   to the card's edges so its head and workspace sit at the task page's own padding, and their frames go. */
.pile-board .pile-item {
  --pile-item-bleed: calc(var(--task-inset) * -1 - 1px);
  margin: 0 var(--pile-item-bleed) var(--pile-item-bleed);
}

/* The task reaches the work card's rounded foot, so its card and outcome footer take the same corners. */
.pile-board .pile-item .task-page > .task-columns {
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

.pile-item:empty {
  display: none;
}

.pile-item .task-page > .card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* A rule parts the task's head from its workspace, as the user asked on 30 October 2026. */
.pile-item .task-head.card {
  border-bottom: 1px solid var(--line-soft);
}


.pile-state {
  padding: var(--s-48) var(--s-24);
}

/* main.css loads after this sheet, so the toolbar names both classes to keep its wrap on phones. */
@media (max-width: 767px) {
  .people-toolbar.pile-toolbar {
    flex-wrap: wrap;
  }

  .pile-toolbar .people-search {
    flex: 1 1 100%;
  }
}

.pile-queue__due {
  white-space: nowrap;
}

.pile-queue__due .tasks-due.is-overdue {
  color: var(--danger-text);
  font-weight: var(--fw-bold);
}
