/* ─── Tasks tab ───────────────────────────────────────────────────────────────── */

/* .tab-bar derivative — sits inline in a .filter-row beside the timeline-scale select/Add Task
   button instead of taking its own full-width row with a page-spanning bottom border. The active
   state can't rely on .tab-bar's usual border-bottom-cut illusion once that border is gone, so it
   paints a solid pill instead (the treatment inventory.css's retired .subnav-wrap dropdown used) */
.tab-bar--inline {
  margin-bottom: 0;
  border-bottom: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.tab-bar--inline .tab-btn {
  padding: 0.35rem 0.9rem;
  border: none;
  border-radius: 0;
  /* .tab-btn hangs 1px low so its underline lands on .tab-bar's rule · there is no rule here to land on, so it just sat the pills a pixel below anything beside them */
  margin-bottom: 0;
}
.tab-bar--inline .tab-btn:hover { background: var(--row-hover); color: var(--text); }
.tab-bar--inline .tab-btn.active { background: var(--primary); color: var(--on-primary); }

/* Gantt timeline — sticky task column on the left, horizontally scrolling day canvas on the
   right. Both sides share the row heights declared in static/js/tasks/gantt.js (ROW_H /
   GROUP_H / HEAD_H); changing one without the other misaligns labels from their bars. */
.gantt {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px var(--shadow-sm);
  overflow: hidden;
}

.gantt-labels {
  flex: 0 0 264px;
  border-right: 1px solid var(--border);
  background: var(--table-surface);
}
.gantt-scroll { flex: 1 1 auto; overflow-x: auto; }
/* min-width:100% (not just the day-driven inline width) so a sparse task list still fills the
   scroll area instead of leaving a bare --surface gap where the ruler/grid background should be */
.gantt-canvas { position: relative; min-width: 100%; }

/* ─── Ruler / heads ─── */

.gantt-label-head,
.gantt-ruler {
  height: 52px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  background: var(--table-surface);
}
.gantt-label-head {
  display: flex;
  align-items: flex-end;
  padding: 0 0.7rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.gantt-ruler { position: relative; }

/* Two explicit bands (month 18px + day 34px = the ruler's 52px) instead of eyeballed top offsets,
   so the day-of-week letters never crowd the month text above them */
.gantt-ruler-month {
  position: absolute;
  top: 0;
  height: 18px;
  line-height: 18px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* One vertical rule per month boundary, spanning the full ruler height */
.gantt-ruler-sep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.gantt-ruler-day {
  position: absolute;
  top: 18px;
  height: 34px;
  box-sizing: border-box;
  padding: 4px 0 6px;
  text-align: center;
  font-size: 0.66rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.gantt-ruler-day b { display: block; font-weight: 600; color: var(--text-sub); }
.gantt-ruler-day.is-weekend { opacity: 0.55; }
.gantt-ruler-day.is-weekly { text-align: left; padding-left: 4px; }
.gantt-ruler-day.is-today,
.gantt-ruler-day.is-today b { color: var(--danger); font-weight: 700; }

/* ─── Rows ─── */

.gantt-row-label {
  height: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.7rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.gantt-row-title { overflow: hidden; text-overflow: ellipsis; }
.gantt-row-label.is-done .gantt-row-title { color: var(--text-muted); }
.gantt-row-label:hover { background: var(--row-hover); }

/* Past-due marker in the label column, where a bar's own tint isn't visible without scrolling */
.gantt-late-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}

.gantt-lane {
  position: relative;
  height: 34px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border-light);
}
.gantt-lane.is-stripe { background: var(--row-stripe); }
.gantt-lane:hover,
.gantt-lane.is-hover { background: var(--row-hover); }

/* Group bands carry the caller's own sections — the list view's buckets, or a board's lists */
.gantt-group-label,
.gantt-group-lane {
  height: 28px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  background: var(--surface-deep);
}
.gantt-group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.gantt-group-count { color: var(--text-muted); font-weight: 600; letter-spacing: 0.02em; }

/* ─── Bars ─── */

.gantt-bar {
  position: absolute;
  top: 7px;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.gantt-bar.is-done { background: var(--success); color: var(--on-success); }
.gantt-bar.is-late { box-shadow: inset 0 0 0 2px var(--danger); }
.gantt-bar:hover { filter: brightness(1.08); }
.gantt-bar-label { overflow: hidden; text-overflow: ellipsis; }
.gantt-bar-days { margin-left: auto; opacity: 0.85; font-variant-numeric: tabular-nums; }

/* A task with an end date but no start date is a moment, not a span */
.gantt-milestone {
  position: absolute;
  top: 9px;
  width: 16px;
  height: 16px;
  background: var(--warning);
  border-radius: 2px;
  transform: rotate(45deg);
  cursor: pointer;
}
.gantt-milestone.is-done { background: var(--success); }
.gantt-milestone.is-late { background: var(--danger); }
.gantt-milestone:hover { filter: brightness(1.1); }
.gantt-milestone-tag {
  position: absolute;
  top: 9px;
  height: 16px;
  line-height: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warning);
  white-space: nowrap;
  pointer-events: none;
}
/* ─── Grid, today marker, dependency arrows ─── */

/* Offset by the ruler height so both overlays start at the first lane */
.gantt-grid,
.gantt-deps {
  position: absolute;
  inset: 52px 0 0 0;
  pointer-events: none;
}
.gantt-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
}
.gantt-grid-line.is-week { background: var(--border); }
/* carries the ruler's month separator on down through the lanes */
.gantt-grid-line.is-month { background: var(--text-faint); opacity: 0.4; }
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger);
  opacity: 0.7;
}
.gantt-dep {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.gantt-dep-head { fill: var(--text-faint); stroke: none; }

.gantt-lanes { position: relative; }

/* ─── Legend ─── */

.gantt-legend {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.gantt-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.gantt-swatch {
  width: 22px;
  height: 10px;
  border-radius: 3px;
  background: var(--primary);
}
.gantt-swatch.is-done { background: var(--success); }
.gantt-swatch.is-late { background: var(--primary); box-shadow: inset 0 0 0 2px var(--danger); }
.gantt-swatch.is-milestone {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--warning);
  transform: rotate(45deg);
}
.gantt-swatch.is-dep {
  height: 0;
  border-radius: 0;
  background: none;
  border-top: 1px dashed var(--text-faint);
}
.gantt-swatch.is-today { width: 2px; height: 13px; border-radius: 0; background: var(--danger); }

/* ─── Hover tooltip ─── */

/* Mirrors the chart tooltip's --tooltip-* tokens so both floating panels read as one thing */
.gantt-tip {
  position: fixed;
  z-index: var(--z-float);
  max-width: 280px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--tooltip-border);
  border-radius: 5px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  box-shadow: 0 4px 14px var(--shadow-md);
  font-size: 0.76rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.gantt-tip.is-open { opacity: 1; }
.gantt-tip-title { font-weight: 600; margin-bottom: 0.25rem; }
.gantt-tip-row { color: var(--tt-muted); font-variant-numeric: tabular-nums; }
.gantt-tip-row b { color: var(--tooltip-text); font-weight: 600; }
.gantt-tip-note {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--tooltip-border);
  color: var(--tt-muted);
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .gantt-tip { transition: none; }
}

/* Narrow screens: a 264px label column eats the canvas, so trim it back */
@media (max-width: 700px) {
  .gantt-labels { flex-basis: 150px; }
}

/* ─── Workspace derivative ─────────────────────────────────────────────────────
   Tasks is the fourth tab on the workspace archetype (shared.css) after BOM, Nest Studio
   and Documents. Everything the old .tasks-list-shell hand-rolled — the full-height bounded
   box, the rail, the panel column, the responsive break — comes from there now; all this
   derivative declares is its own column widths and what lives inside the pane. */

.tasks-workspace { --rail-w: 16rem; --panel-w: 20rem; grid-template-columns: var(--rail-col) minmax(0, 1fr) var(--panel-col); }
/* the inspector only exists once a task is picked, so the pane takes its width back when it isn't —
   no width at all beats the archetype's folded spine, which is why this sets the column not the fold */
.tasks-workspace:has(> .tasks-board:not(.hidden) > .tasks-inspector.is-hidden) { --panel-col: 0; }
.tasks-workspace .tasks-inspector.is-hidden { border: none; overflow: hidden; }

/* Both boards share the one rail, so each is boxless and its pane + inspector land in the grid's own columns */
.tasks-board { display: contents; }

/* The pane is a column of chrome + one scrolling view, not a scroller itself */
.tasks-pane { display: flex; flex-direction: column; }
.tasks-view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.tasks-gantt-scroll { flex: 1; min-height: 0; overflow: auto; }

/* ─── Rail contents ─── */

/* nested under an owner, a row has less width to play with — let the label give way to the count
   rather than push it off the edge, since .workspace-row-label alone can't shrink in a flex row */
.tasks-workspace .workspace-row-label { flex: 1; min-width: 0; }

/* a rail row carrying an owner line stacks instead of sitting on one line */
.workspace-row.has-owner { flex-direction: column; align-items: stretch; gap: 0; }
.workspace-row-top { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.workspace-row.has-owner .workspace-row-sub { padding-left: 1rem; }

/* The pane title's own rename/delete pair, for whichever list is in focus */
.pane-title-actions { display: inline-flex; gap: 0.1rem; margin-left: 0.4rem; vertical-align: middle; }
.pane-title-actions .row-action { width: 20px; height: 20px; }

/* Per-row rename/delete, revealed on hover so the rail stays quiet until you reach for them */
.workspace-row .row-actions { display: none; gap: 0.1rem; flex: none; margin-left: 0.15rem; }
.workspace-row:hover .row-actions { display: inline-flex; }
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-faint);
  cursor: pointer;
}
.row-action:hover { background: var(--surface-deep); color: var(--text-sub); }
.workspace-row.is-current .row-action { color: var(--on-primary); opacity: 0.85; }
.workspace-row.is-current .row-action:hover { background: var(--primary-hover); opacity: 1; }
/* the count gives way to the buttons rather than both fighting for the same tail of the row */
.workspace-row:hover .workspace-row-count { display: none; }

/* The thing that owns a run of lists — a group, a change's number, a document's name. It's a fold,
   not a destination: clicking it shows/hides its lists rather than selecting anything. */
.rail-owner-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-sub);
}
.rail-owner-head:hover { background: var(--row-hover); }
.rail-owner-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-owner-head .caret { display: flex; flex: none; color: var(--text-faint); transition: transform 0.15s ease; }
.rail-owner.collapsed .caret { transform: rotate(-90deg); }
.rail-owner.collapsed .rail-owner-lists { display: none; }
/* the lists sit inside their owner, so they're indented and hang off a hairline rather than floating loose */
.rail-owner-lists { margin-left: 0.55rem; padding-left: 0.3rem; border-left: 1px solid var(--border-light); }

@media (prefers-reduced-motion: reduce) {
  .rail-owner-head .caret { transition: none; }
}

.rail-section-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0.8rem 0.5rem 0.35rem;
}
.rail-section-label:first-of-type { margin-top: 0; }

.rail-icon { flex-shrink: 0; display: flex; color: var(--primary); }
.workspace-row.is-current .rail-icon { color: var(--on-primary); }
.list-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { font-size: 0.74rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
/* a List gets a colored dot (idColorVar, utils.js) instead of a smart-list icon */
.list-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.rail-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.rail-add:hover { background: var(--row-hover); color: var(--text); }

/* ─── Center pane ─── */

.tasks-quick-add {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--table-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}
.quick-add-plus {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.quick-add-plus:hover { background: var(--primary); color: var(--on-primary); }
.tasks-quick-add input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
}
.tasks-quick-add input::placeholder { color: var(--text-faint); }
/* A Group aggregate view has no single List a new task could join */
.tasks-quick-add:has(input:disabled) { opacity: 0.55; }
.tasks-quick-add input:disabled { cursor: not-allowed; }
.quick-add-details {
  font-size: 0.72rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}
.quick-add-details:hover { background: var(--row-hover); color: var(--text-sub); }

.tasks-list-scroll { flex: 1 1 auto; overflow-y: auto; padding-bottom: 0.5rem; }

/* ─── Section group — archetype: .section-group ─── */

.section-group { margin-bottom: 0.3rem; }
.section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.3rem 0.3rem;
  cursor: pointer;
  user-select: none;
}
.section-head .caret { color: var(--text-faint); transition: transform 0.15s ease; display: flex; }
.section-group.collapsed .caret { transform: rotate(-90deg); }
.section-head h4 {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* section-group--overdue derivative */
.section-group--overdue .section-head h4 { color: var(--danger); }
.section-head .n { color: var(--text-faint); font-size: 0.7rem; font-weight: 600; }
.section-head .section-head-del { display: none; }
.section-group:not(.collapsed):hover > .section-head .section-head-del { display: inline-flex; }
.section-rows { display: flex; flex-direction: column; }
/* section-group--completed derivative shares .collapsed's rules — collapsed by default via JS state */
.section-group.collapsed .section-rows,
.section-group.collapsed > .section-group { display: none; }

/* a section nested inside another (Completed's own buckets) sits in from its parent and reads quieter */
.section-group.is-nested { margin-left: 0.75rem; }
.section-group.is-nested .section-head h4 { font-size: 0.66rem; color: var(--text-faint); }

/* ─── Task row — archetype: .task-row ─── */

.task-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.45rem;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
}
.task-row:hover { background: var(--row-hover); }
.task-row.is-selected { background: var(--info-bg); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }

.row-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.6px solid var(--text-faint);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.task-row:hover .row-check { border-color: var(--primary); }
/* task-row--done derivative */
.task-row.is-done .row-check { background: var(--success); border-color: var(--success); color: var(--on-success); }

.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 0.86rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.task-row.is-done .row-title { color: var(--text-faint); text-decoration: line-through; }
.row-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.15rem; flex-wrap: wrap; }
.row-meta .meta-item { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.71rem; color: var(--text-faint); }
.row-meta .meta-item svg { flex-shrink: 0; }
/* row-meta variants — data-driven states, not new components */
.row-meta .meta-item.is-overdue { color: var(--danger); font-weight: 600; }
.row-meta .meta-item.is-linked { color: var(--info-color); }
.row-meta .list-dot { width: 7px; height: 7px; }

.row-star {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  opacity: 0;
  transition: opacity 0.1s ease;
}
.task-row:hover .row-star, .row-star.is-starred { opacity: 1; }
.row-star.is-starred { color: var(--star); }
.row-star:hover { background: var(--surface-deep); }

/* A task you can't manage (assigned to you but write-gated on a change/document you can't edit) —
   check/star render but take no clicks, so the state reads without offering a control that'd 403 */
.row-check.is-locked, .row-star.is-locked { opacity: 0.35; cursor: default; }
.task-row:hover .row-star.is-locked { opacity: 0.35; }

.row-delete {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.1s ease;
}
.task-row:hover .row-delete { opacity: 1; }
.row-delete:hover { background: var(--danger-bg); color: var(--danger); }

/* ─── Detail inspector — same panel + tab band as .doc-inspector ─── */

.tasks-inspector { display: flex; flex-direction: column; overflow: hidden; }
/* the tab band's own row; edit/delete ride it as icons rather than taking a header of their own */
.tasks-inspector-tabs { flex: none; margin: 0; padding: 0 0.4rem; display: flex; align-items: center; gap: 0.15rem; }
.tasks-inspector-tabs .btn-icon { margin-left: auto; }
.tasks-inspector-tabs .btn-icon + .btn-icon { margin-left: 0; }
.tasks-inspector-tabs .btn-collapse-panel { margin-left: 0.15rem; align-self: center; }
.tasks-inspector-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.8rem; }

.drawer-title-row { display: flex; align-items: flex-start; gap: 0.65rem; margin-bottom: 1rem; }
.drawer-check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.6px solid var(--text-faint);
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  cursor: pointer;
}
.drawer-check.is-done { background: var(--success); border-color: var(--success); color: var(--on-success); }
.drawer-check.is-locked { cursor: default; opacity: 0.5; }
.drawer-title { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.drawer-title.is-done { color: var(--text-faint); text-decoration: line-through; }

.drawer-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.15rem;
  border-bottom: 1px solid var(--border-light);
}
.drawer-field svg { color: var(--text-muted); flex-shrink: 0; }
.drawer-field-label { font-size: 0.82rem; color: var(--text-sub); flex: 1; }
.drawer-field-value { font-size: 0.78rem; color: var(--text-muted); }
.drawer-star-btn {
  background: none; border: none; cursor: pointer; color: var(--border);
  display: flex; align-items: center; padding: 0;
}
.drawer-star-btn.is-starred { color: var(--star); }
.drawer-star-btn:disabled { cursor: default; opacity: 0.5; }

.drawer-linked {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0.15rem;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  background: var(--info-bg);
  color: var(--info-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.drawer-deps { margin: 0.4rem 0.15rem; }
.drawer-deps-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.35rem; }
.dep-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  margin: 0 0.3rem 0.3rem 0;
  border-radius: 999px;
  background: var(--surface-deep);
  color: var(--text-sub);
  font-size: 0.74rem;
}
.dep-chip.is-done { color: var(--text-faint); text-decoration: line-through; }
.dep-chip svg { flex-shrink: 0; }

.drawer-notes {
  margin: 0.35rem 0.15rem 0;
  font-size: 0.8rem;
  color: var(--text-sub);
  white-space: pre-wrap;
  line-height: 1.5;
}
.drawer-notes.is-empty { color: var(--text-faint); font-style: italic; }

.drawer-footer-note {
  padding: 0.6rem 1.05rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.7rem;
  color: var(--text-faint);
}

/* Narrow screens: the archetype drops the rail at 940px, so the inspector goes too rather than
   squeezing a 20rem column into what's left — a task's detail is reachable by reopening the row */
@media (max-width: 940px) {
  .tasks-workspace, .tasks-workspace:has(.tasks-inspector.is-hidden) { grid-template-columns: minmax(0, 1fr) !important; }
  .tasks-inspector { display: none; }
}

/* ─── Group Tasks board — same workspace/section-group/task-row shapes as My Tasks,
   swapping the nav rail's smart lists for real auth.groups teams and adding an assignee tag ──── */


/* The board nests a wrapper between the pane and .tasks-list-scroll, so it has to pass the bounded
   height down — :not(.hidden) keeps the ID selector from beating base.css's .hidden */
#group-tasks-board:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Lists a change handed the group, gathered under that change and folding as one block —
   a change can hand over several lists, so the whole run collapses, not just each list inside it */
.board-owner-group { margin: 0.5rem 0 0.2rem; }
.board-owner-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.2rem 0.25rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  user-select: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.board-owner-head:hover { color: var(--text-sub); }
.board-owner-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-owner-head .n { color: var(--text-faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.board-owner-head .caret { display: flex; flex: none; color: var(--text-faint); transition: transform 0.15s ease; }
.board-owner-group.collapsed .caret { transform: rotate(-90deg); }
.board-owner-group.collapsed .board-owner-body { display: none; }

@media (prefers-reduced-motion: reduce) {
  .board-owner-head .caret { transition: none; }
}
/* its lists sit inside it, indented so the grouping reads without a second colour */
.board-owner-group .section-group { margin-left: 0.6rem; }


.assignee-tag-inline { flex-shrink: 0; margin: 0 0.4rem; display: flex; align-items: center; }

.quick-add-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem 0.5rem 2.2rem;
  color: var(--text-faint);
}
.quick-add-inline input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  font-size: 0.83rem;
  color: var(--text);
}
.quick-add-inline input:focus { outline: none; }
.quick-add-inline input::placeholder { color: var(--text-faint); }
