/* =====================================================================
   STF Taskboard — Capacity, Team, Leadership Roles, To-Do List
   ===================================================================== */

/* shared section label */
.tb-sb-section { margin-top: 38px; }
.tb-sb-section:first-of-type { margin-top: 4px; }
.tb-sb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tb-sb-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--fg-1); margin: 0; display: flex; align-items: center; gap: 9px; }
.tb-sb-head h2 svg { width: 16px; height: 16px; color: var(--fg-3); }
.tb-sb-head .tag { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); border: 1px solid var(--border-1); border-radius: 999px; padding: 3px 9px; }
.tb-sb-head .tag.merit { color: var(--stf-amber); border-color: color-mix(in srgb, var(--stf-amber) 36%, var(--border-1)); }
.tb-sb-head .tag.load { color: var(--stf-blueprint); border-color: color-mix(in srgb, var(--stf-blueprint) 36%, var(--border-1)); }
.tb-sb-head .rule { flex: 1; height: 1px; background: var(--border-1); }
.tb-sb-head .cnt { font-size: 12px; color: var(--fg-4); font-variant-numeric: tabular-nums; }

/* week / total toggle reuses .tb-viewtoggle */

/* ---------------------------------------------------------------------
   LAST WEEK SUMMARY panel (right drawer)
   --------------------------------------------------------------------- */
.tb-lw-scrim { position: fixed; inset: 0; z-index: 180; background: rgba(10,10,9,0.44); }
.tb-lw {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 181; width: 460px; max-width: 94vw;
  background: var(--bg-1); border-left: 1px solid var(--border-1); box-shadow: var(--shadow-overlay);
  display: flex; flex-direction: column;
}
@keyframes tb-lw-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tb-lw-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--border-1); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tb-lw-head .e { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 7px; }
.tb-lw-head .t { font-family: var(--font-display); font-weight: 300; font-size: 25px; letter-spacing: -0.02em; color: var(--fg-1); }
.tb-lw-head .r { font-size: 12px; color: var(--fg-3); margin-top: 5px; font-variant-numeric: tabular-nums; }
.tb-lw-body { overflow-y: auto; padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 24px; }
.tb-lw-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tb-lw-stat { border: 1px solid var(--border-1); border-radius: var(--radius-md); padding: 12px 14px; }
.tb-lw-stat .v { font-family: var(--font-display); font-weight: 300; font-size: 26px; letter-spacing: -0.02em; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.tb-lw-stat .k { font-size: 11px; color: var(--fg-3); margin-top: 3px; }
.tb-lw-stat.fire .v { color: #C2603A; }
.tb-lw-stat.attn .v { color: var(--stf-amber); }
.tb-lw-sec { display: flex; flex-direction: column; gap: 10px; }
.tb-lw-sec > .h { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); }
.tb-lw-pp { display: flex; align-items: center; gap: 10px; }
.tb-lw-pp .nm { font-size: 12.5px; color: var(--fg-1); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-lw-pp .bar { width: 120px; height: 5px; border-radius: 999px; background: var(--border-1); overflow: hidden; }
.tb-lw-pp .bar > span { display: block; height: 100%; border-radius: 999px; }
.tb-lw-pp .bar.merit > span { background: var(--stf-amber); }
.tb-lw-pp .bar.load > span { background: var(--stf-blueprint); }
.tb-lw-pp .v { font-size: 12px; font-weight: 600; color: var(--fg-1); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.tb-lw-line { font-size: 12.5px; color: var(--fg-2); line-height: 1.5; padding: 11px 13px; border: 1px solid var(--border-1); border-radius: var(--radius-md); background: var(--bg-2); }
.tb-lw-reset { font-size: 11px; color: var(--fg-4); display: inline-flex; align-items: center; gap: 7px; }
.tb-lw-reset svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------------
   CAPACITY — assignment rows
   --------------------------------------------------------------------- */
.tb-cap-rows { display: flex; flex-direction: column; }
.tb-cap-asg {
  display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1.5fr) auto; gap: 18px; align-items: center;
  padding: 14px 12px; margin: 0 -12px; border-top: 1px solid var(--border-1); border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-stf);
}
.tb-cap-asg:first-child { border-top: none; }
.tb-cap-asg:hover { background: var(--bg-2); }
.tb-cap-asg .proj { font-size: 14px; font-weight: 500; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cap-asg .task { font-size: 12.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cap-asg .who { display: flex; align-items: center; gap: 6px; justify-self: end; }
.tb-cap-stack { display: flex; }
.tb-cap-stack .av { width: 26px; height: 26px; border-radius: 999px; margin-left: -7px; border: 1.5px solid var(--bg-1); display: grid; place-items: center; font-size: 9.5px; font-weight: 600; color: #fff; box-shadow: var(--shadow-xs); }
.tb-cap-stack .av:first-child { margin-left: 0; }
.tb-cap-stack .av.state-none { opacity: 0.3; }
.tb-cap-stack .av.state-submitted { opacity: 0.6; }
.tb-cap-stack .av.anon { background: var(--bg-3); color: var(--fg-3); }
.tb-cap-stack .av.anon svg { width: 13px; height: 13px; }
.tb-cap-count { font-size: 11.5px; color: var(--fg-4); margin-left: 8px; white-space: nowrap; }

/* over / under load indicator chip */
.tb-load-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tb-load-chip .d { width: 6px; height: 6px; border-radius: 999px; }
.tb-load-chip.over { color: var(--stf-danger); background: color-mix(in srgb, var(--stf-danger) 14%, transparent); }
.tb-load-chip.over .d { background: var(--stf-danger); }
.tb-load-chip.under { color: var(--stf-blueprint); background: var(--stf-blueprint-faint); }
.tb-load-chip.under .d { background: var(--stf-blueprint); }
.tb-load-chip.ok { color: var(--fg-3); background: var(--bg-3); }
.tb-load-chip.ok .d { background: var(--fg-4); }

/* management rows reuse capacity track */
.tb-mgmt { display: flex; flex-direction: column; gap: 2px; }
.tb-mgmt-people { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.tb-mgmt-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 15px 9px 9px; border: 1px solid var(--border-1); border-radius: var(--radius-pill);
  background: var(--bg-2);
}
.tb-mgmt-chip .nm { font-size: 13.5px; font-weight: 500; color: var(--fg-1); }

/* ---------------------------------------------------------------------
   TEAM — per-member work breakdown cards (Capacity)
   --------------------------------------------------------------------- */
.tb-team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
.tb-team-card { border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-2); padding: 16px 18px; position: relative; }
.tb-team-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.tb-team-top .meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }

/* ---- leadership rotation roles (sub-leadership) -------------------- */
.tb-roles { flex: none; align-self: flex-start; display: flex; }
.tb-roles-tags {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px; cursor: pointer;
  background: none; border: none; border-radius: 6px; transition: background var(--dur-fast) var(--ease-stf);
}
.tb-roles-tags:hover { background: var(--bg-3); }
.lr-badge {
  --rc: var(--stf-blueprint);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 23px; height: 18px; padding: 0 5px; border-radius: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; line-height: 1;
  color: var(--rc); background: color-mix(in srgb, var(--rc) 15%, var(--bg-1));
  border: 1px solid color-mix(in srgb, var(--rc) 36%, transparent);
}
.lr-badge.sm { height: 17px; min-width: 22px; font-size: 9px; cursor: pointer; }
.lr-name-pill {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px;
  border-radius: 999px; font-size: 10px; font-weight: 500; cursor: pointer;
  background: color-mix(in srgb, var(--rc) 14%, var(--bg-3));
  color: var(--rc);
  border: 1px solid color-mix(in srgb, var(--rc) 28%, transparent);
  transition: background .15s;
}
.lr-name-pill:hover { background: color-mix(in srgb, var(--rc) 22%, var(--bg-3)); }
.lr-more { font-size: 9.5px; font-weight: 600; color: var(--fg-4); padding: 0 2px; }
.tb-roles-add {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  font-size: 10.5px; font-weight: 500; color: var(--fg-3);
  background: none; border: 1px dashed var(--border-2); border-radius: 999px; padding: 3px 9px;
  transition: color var(--dur-fast) var(--ease-stf), border-color var(--dur-fast) var(--ease-stf);
}
.tb-roles-add:hover { color: var(--fg-1); border-color: var(--fg-3); }
.tb-roles-add svg { color: var(--fg-4); }

/* (?) brief helper */
.lr-help { display: inline-flex; align-items: center; color: var(--fg-4); cursor: help; vertical-align: middle; }
.lr-help:hover { color: var(--stf-blueprint); }

/* role detail / brief tooltip */
.lr-tip {
  background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 13px 14px 14px; pointer-events: none;
  animation: calTipIn 120ms var(--ease-stf);
}
.lr-tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lr-tip-name { font-size: 13px; font-weight: 600; color: var(--fg-1); letter-spacing: -0.01em; }
.lr-tip-purpose { font-size: 11.5px; line-height: 1.5; color: var(--fg-2); margin: 0; text-wrap: pretty; }
.lr-tip-sec { margin-top: 11px; }
.lr-tip-k { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); font-weight: 700; display: block; margin-bottom: 5px; }
.lr-tip-sec ul { margin: 0; padding-left: 15px; display: flex; flex-direction: column; gap: 3px; }
.lr-tip-sec li { font-size: 11px; line-height: 1.4; color: var(--fg-2); }
.lr-tip-sec p { font-size: 11px; line-height: 1.45; color: var(--fg-2); margin: 0; }
.lr-brief-list { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border-1); display: flex; flex-wrap: wrap; gap: 7px 13px; }
.lr-brief-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-2); }
.lr-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* role picker popup */
.lr-picker {
  background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay); overflow: hidden; animation: calTipIn 120ms var(--ease-stf);
}
.lr-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--border-1); }
.lr-picker-head .t { font-size: 12px; font-weight: 600; color: var(--fg-1); }
.lr-picker-list { padding: 4px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.lr-picker-row {
  --rc: var(--stf-blueprint);
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid transparent; background: none; cursor: pointer; padding: 5px 8px; border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-stf), border-color var(--dur-fast) var(--ease-stf);
}
.lr-picker-row:hover { background: var(--bg-3); }
.lr-picker-row.on { background: color-mix(in srgb, var(--rc) 9%, var(--bg-1)); border-color: color-mix(in srgb, var(--rc) 34%, var(--border-1)); }
.lr-picker-nm { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; color: var(--fg-1); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-check { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; color: var(--fg-4); }
.lr-picker-row.on .lr-check { color: var(--rc); }
.tb-team-top .meta .nm { font-size: 13.5px; font-weight: 500; color: var(--fg-1); }
.tb-team-top .meta .rl { font-size: 11px; color: var(--fg-4); }
.tb-team-work { display: flex; flex-direction: column; gap: 8px; }
.tb-team-task { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: var(--radius-md); background: var(--bg-1); border: 1px solid var(--border-1); }
.tb-team-task .st { width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--border-2); }
.tb-team-task .st.completed { background: var(--stf-success); }
.tb-team-task .st.submitted { background: var(--stf-amber); }
.tb-team-task .st.none { background: var(--stf-silver); }
.tb-team-task .st.anon { width: 18px; height: 18px; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-3); }
.tb-team-task .st.anon svg { width: 11px; height: 11px; }
.tb-team-task .tk { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-team-task .tk .tt { font-size: 12.5px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-team-task .tk .pj { font-size: 10.5px; color: var(--fg-4); letter-spacing: 0.02em; }
.tb-team-task.anon .tk .tt { color: var(--fg-2); font-style: italic; }
.tb-team-task .stl { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4); white-space: nowrap; flex: none; }
.tb-team-empty { font-size: 12px; color: var(--fg-4); padding: 6px 2px; }

/* ---- dense team cards (compressed: project names only) ------------- */
.tb-load-chip .sl { color: var(--fg-4); font-weight: 500; margin-left: 1px; }
.tb-team-grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tb-team-grid.dense .tb-team-card { padding: 12px 13px; }
.tb-team-grid.dense .tb-team-top { margin-bottom: 9px; gap: 9px; }
.tb-team-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.tb-team-pill {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  font-size: 15px; font-weight: 500; color: var(--fg-2);
  height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--bg-1); border: 1px solid var(--border-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-team-pill .dot { width: 6px; height: 6px; border-radius: 999px; flex: none; background: var(--border-2); }
.tb-team-pill.state-completed .dot { background: var(--stf-success); }
.tb-team-pill.state-submitted .dot { background: var(--stf-amber); }
.tb-team-pill.state-none .dot { background: var(--fg-4); }
.tb-team-pill.anon { color: var(--fg-3); font-style: italic; }
.tb-team-pill.anon svg { color: var(--fg-4); }
.tb-team-pill.lead {
  color: var(--stf-blueprint); border-color: color-mix(in srgb, var(--stf-blueprint) 34%, transparent);
  background: var(--stf-blueprint-faint); font-weight: 500;
  height: 18px; padding: 0 7px; font-size: 10px;
}
.tb-team-pill.task {
  color: #7A5C35;
  border-color: color-mix(in srgb, #B8946A 38%, transparent);
  background: color-mix(in srgb, #B8946A 12%, var(--bg-1));
  font-weight: 500; height: 18px; padding: 0 7px; font-size: 10px;
}
[data-theme="dark"] .tb-team-pill.task { color: #C8A07A; }
.tb-team-role-pill {
  display: inline-flex; align-items: center;
  height: 15px; padding: 0 6px;
  border-radius: 999px; font-size: 9px; font-weight: 500;
  color: var(--fg-4); background: var(--bg-3);
  border: 1px solid var(--border-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tb-team-led { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 7px; }
.tb-team-led > svg { color: var(--stf-blueprint); flex: none; }
.tb-team-led .k { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); font-weight: 700; margin-right: 2px; }

/* ---- team section project/task view toggle ------------------------- */
.tb-cap-view-seg {
  display: flex; align-items: center;
  border: 1px solid var(--border-1); border-radius: 999px;
  background: var(--bg-1); padding: 2px; gap: 2px;
}
.tb-cap-view-seg button {
  height: 20px; padding: 0 10px; border-radius: 999px; border: none;
  background: transparent; cursor: pointer;
  font-size: 10.5px; font-weight: 500; color: var(--fg-3);
  transition: background 120ms, color 120ms;
}
.tb-cap-view-seg button:hover { color: var(--fg-1); }
.tb-cap-view-seg button.active {
  background: var(--bg-3); color: var(--fg-1);
}

/* ---- assign task button (+) ---------------------------------------- */
.tb-cap-assign-btn {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: none; padding: 0;
  border-radius: var(--radius-sm); border: 1px solid var(--border-1);
  background: transparent; color: var(--fg-4); cursor: pointer;
  opacity: 0; transition: opacity 120ms, background 120ms, color 120ms, border-color 120ms;
}
.tb-team-card:hover .tb-cap-assign-btn,
.tb-cap-assign-btn.open { opacity: 1; }
.tb-cap-assign-btn:hover,
.tb-cap-assign-btn.open {
  background: var(--stf-blueprint-faint);
  color: var(--stf-blueprint);
  border-color: color-mix(in srgb, var(--stf-blueprint) 40%, transparent);
}

/* ---- assign task dropdown menu ------------------------------------- */
.tb-cap-menu {
  position: absolute; top: 46px; right: 0; z-index: 300;
  min-width: 210px; max-width: 270px; max-height: 260px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  padding: 4px; display: flex; flex-direction: column;
}
.tb-cap-menu-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; padding: 7px 10px; border-radius: var(--radius-md);
  background: transparent; border: none; cursor: pointer; text-align: left;
  transition: background 100ms;
}
.tb-cap-menu-item:hover { background: var(--bg-3); }
.tb-cap-menu-proj {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-4); font-weight: 600; font-family: var(--font-mono);
}
.tb-cap-menu-title { font-size: 12px; color: var(--fg-1); font-weight: 500; }
.tb-cap-menu-empty { font-size: 12px; color: var(--fg-4); padding: 8px 10px; font-style: italic; }

/* ---- task pill: hover to unassign ---------------------------------- */
.tb-cap-pill-wrap {
  overflow: visible !important;
  padding-right: 4px !important;
}
.tb-cap-pill-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.tb-cap-unassign-btn {
  display: none; align-items: center; justify-content: center;
  width: 11px; height: 11px; flex: none; padding: 0; margin-left: 1px;
  border-radius: 999px; border: none; cursor: pointer;
  background: color-mix(in srgb, var(--fg-1) 14%, transparent);
  color: var(--fg-3); transition: background 100ms, color 100ms;
  line-height: 1;
}
.tb-cap-pill-wrap:hover .tb-cap-unassign-btn { display: flex; }
.tb-cap-unassign-btn:hover { background: var(--stf-danger); color: #fff; }

/* ---- header stat badge (unassigned count) --------------------------- */
.tb-cap-stat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap;
}
.tb-cap-stat.amber { color: var(--stf-amber); background: var(--stf-amber-faint); }

/* ---- drag-to-reassign hint line ------------------------------------- */
.tb-cap-hint { font-size: 11.5px; color: var(--fg-4); margin: -2px 0 12px; }

/* ---- drag handles / cursors ----------------------------------------- */
.tb-team-handle { cursor: grab; touch-action: none; }
.tb-team-handle:active { cursor: grabbing; }
.tb-role-drag { cursor: grab; touch-action: none; }
.tb-role-drag:active { cursor: grabbing; }

/* ---- rotating roles pinned to the card's top-right corner ----------- */
.tb-team-roles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-left: auto; align-self: flex-start; max-width: 55%; }

/* ---- member task list (Mission-Control style rows) ------------------ */
.tb-cap-tasklist { display: flex; flex-direction: column; gap: 5px; }
.tb-cap-task {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 9px; border-radius: var(--radius-md);
  background: var(--bg-1); border: 1px solid var(--border-1);
  cursor: grab; touch-action: none;
  transition: opacity 120ms, border-color 120ms, background 120ms;
}
.tb-cap-task:hover { border-color: var(--border-2); }
.tb-cap-task:active { cursor: grabbing; }
.tb-cap-task.is-drag-source { opacity: 0.32; }
.tb-cap-task-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; background: var(--stf-silver); }
.tb-cap-task-dot.state-completed { background: var(--stf-success); }
.tb-cap-task-dot.state-submitted { background: var(--stf-amber); }
.tb-cap-task-tag {
  flex: none; font-size: 8px; font-weight: 700; letter-spacing: 0.1em; font-family: var(--font-mono);
  color: var(--stf-amber); background: var(--stf-amber-faint);
  padding: 2px 5px; border-radius: var(--radius-sm); line-height: 1;
}
.tb-cap-task-title { flex: 1; min-width: 0; font-size: 12.5px; color: var(--fg-1); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cap-task-asg { display: flex; flex: none; }
.tb-cap-task-asg .tb-ava { width: 20px; height: 20px; font-size: 8.5px; margin-left: -5px; border: 1.5px solid var(--bg-2); }
.tb-cap-task-asg .tb-ava:first-child { margin-left: 0; }
.tb-cap-task-x {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 16px; height: 16px; padding: 0; border: none; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--fg-1) 12%, transparent); color: var(--fg-3);
  transition: background 100ms, color 100ms;
}
.tb-cap-task:hover .tb-cap-task-x { display: flex; }
.tb-cap-task-x:hover { background: var(--stf-danger); color: #fff; }

/* ---- unassigned task pool ------------------------------------------- */
.tb-cap-pool {
  border: 1px dashed var(--border-2); border-radius: var(--radius-lg);
  background: var(--bg-1); padding: 12px 14px; margin-bottom: 14px;
  transition: border-color 120ms, background 120ms;
}
.tb-cap-pool-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--fg-3); }
.tb-cap-pool-head .t { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.tb-cap-pool-head .cnt { font-size: 11px; color: var(--fg-4); background: var(--bg-3); border-radius: 999px; padding: 1px 8px; }
.tb-cap-pool-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-cap-pool-empty { font-size: 12px; color: var(--fg-4); font-style: italic; }
.tb-cap-pool .tb-cap-task { max-width: 260px; }

/* ---- admin task section --------------------------------------------- */
.tb-cap-admin {
  border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  background: var(--bg-2); padding: 12px 14px;
  transition: border-color 120ms, background 120ms;
}
.tb-cap-admin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }

/* ---- drop-target highlight (toggled directly via JS during drag) --- */
.tb-cap-pool.tb-cap-drop-hover,
.tb-cap-admin.tb-cap-drop-hover,
.tb-team-card.tb-cap-drop-hover,
.stf-todo-role.tb-cap-drop-hover {
  border-color: var(--stf-blueprint) !important;
  background: var(--stf-blueprint-faint);
}
.tb-team-card { transition: border-color 120ms, background 120ms; }
.tb-team-card.no-drop { opacity: 0.86; }
.stf-todo-role { transition: border-color 120ms, background 120ms; }

/* ---- empty per-member drop hint ------------------------------------- */
.tb-team-drop-hint { font-size: 11px; color: var(--fg-4); font-style: italic; padding: 2px 0; }

/* ---- drag ghost that follows the pointer ---------------------------- */
.tb-cap-ghost {
  position: fixed; z-index: 9999; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--bg-2); box-shadow: var(--shadow-lg);
}
.tb-cap-ghost .d { width: 7px; height: 7px; border-radius: 999px; flex: none; background: var(--stf-silver); }
.tb-cap-ghost .d.state-completed { background: var(--stf-success); }
.tb-cap-ghost .d.state-submitted { background: var(--stf-amber); }
.tb-cap-ghost .d.state-admin { background: var(--stf-amber); }
.tb-cap-ghost .tb-ava { width: 22px; height: 22px; font-size: 9px; }
.tb-cap-ghost .tt { font-size: 12.5px; font-weight: 500; color: var(--fg-1); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* ---- management cards (role tracking: project lead + rotating roles) */
.tb-mgmt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.tb-mgmt-card { border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-2); padding: 14px 15px; }
.tb-mgmt-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.tb-mgmt-card-top .meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-mgmt-card-top .meta .nm { font-size: 13.5px; font-weight: 500; color: var(--fg-1); }
.tb-mgmt-card-top .meta .rl { font-size: 11px; color: var(--fg-4); }
.tb-mgmt-card-roles { display: flex; flex-direction: column; gap: 7px; }
.tb-mgmt-roleline { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.tb-mgmt-roleline .k {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4); font-weight: 700;
  width: 84px; flex: none;
}
.tb-mgmt-roleline .k svg { color: var(--fg-4); }
.tb-mgmt-none { font-size: 12px; color: var(--fg-4); }

/* ---- distributed leadership section -------------------------------- */
.lr-dl-desc {
  font-size: 13px; line-height: 1.6; color: var(--fg-2); margin: 0 0 18px;
  max-width: 76ch; white-space: pre-line; text-wrap: pretty;
}
.lr-roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.lr-rolecard {
  border: 1px solid var(--border-1); border-radius: var(--radius-lg); background: var(--bg-2);
  padding: 14px 15px; display: flex; flex-direction: column; gap: 11px;
}
.lr-rolecard-head { display: flex; align-items: center; gap: 9px; cursor: help; }
.lr-rolecard-name { font-size: 13.5px; font-weight: 600; color: var(--fg-1); letter-spacing: -0.01em; flex: 1; min-width: 0; }
.lr-rolecard-head .lr-help { color: var(--fg-4); }
.lr-rolecard-head:hover .lr-help { color: var(--rc); }
.lr-rolecard-staff { display: flex; flex-direction: column; gap: 6px; min-height: 28px; }
.lr-staff-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 0;
}
.lr-staff-chip .nm { font-size: 12px; font-weight: 500; color: var(--fg-1); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-staff-x {
  flex: none; width: 18px; height: 18px; display: grid; place-items: center;
  border: none; background: none; cursor: pointer; color: var(--fg-4); border-radius: 999px;
  transition: color var(--dur-fast) var(--ease-stf), background var(--dur-fast) var(--ease-stf);
}
.lr-staff-x:hover { color: var(--stf-danger); background: color-mix(in srgb, var(--stf-danger) 12%, transparent); }
.lr-empty-slot {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 11.5px; font-style: italic; color: var(--fg-4);
  padding: 5px 11px; border-radius: 999px; border: 1px dashed var(--border-2);
}
.lr-empty-dot { width: 7px; height: 7px; border-radius: 999px; border: 1px dashed var(--fg-4); flex: none; }
/* + add button in card head */
.lr-add-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; border: none; background: none;
  color: var(--fg-4); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-stf), background var(--dur-fast) var(--ease-stf);
}
.lr-add-btn:hover { color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.lr-staffpicker { width: 240px; }

/* =====================================================================
   ROLE TO-DO LIST
   ===================================================================== */
.stf-todo-list {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border-1);
  border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden;
}

/* Role row */
.stf-todo-role { background: var(--bg-1); display: flex; flex-direction: column; }

/* Header */
.stf-todo-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-stf);
}
.stf-todo-head:hover { background: var(--bg-2); }
.stf-todo-role.is-open > .stf-todo-head { background: var(--bg-2); }

.stf-todo-role-name {
  font-size: 13px; font-weight: 500; color: var(--fg-1); flex: none;
}

.stf-todo-holders {
  display: flex; align-items: center; gap: -4px; margin-left: 2px; flex: none;
}
.stf-todo-ava {
  width: 20px !important; height: 20px !important; font-size: 8px !important;
  border-radius: 999px; margin-left: -5px; border: 1.5px solid var(--bg-1);
}
.stf-todo-holders .stf-todo-ava:first-child { margin-left: 0; }
.stf-todo-unassigned {
  font-size: 10.5px; color: var(--fg-4); font-style: italic;
}

.stf-todo-cnt {
  margin-left: auto; font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-4); font-variant-numeric: tabular-nums; flex: none;
}
.stf-todo-cnt.done { color: var(--stf-success, #4D7A57); }

.stf-todo-chevron {
  display: flex; align-items: center; color: var(--fg-4); flex: none;
  transition: transform var(--dur-fast) var(--ease-stf);
}
.stf-todo-chevron.up { transform: rotate(180deg); }

/* Body */
.stf-todo-body {
  display: flex; flex-direction: column;
  padding: 4px 14px 10px 14px;
  border-top: 1px solid var(--border-1);
  background: var(--bg-1);
}

.stf-todo-empty {
  font-size: 12px; color: var(--fg-4); font-style: italic;
  padding: 6px 2px 4px;
}

/* Item row */
.stf-todo-item {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-1);
}
.stf-todo-item:last-of-type { border-bottom: none; }
.stf-todo-item.is-done .stf-todo-text { color: var(--fg-4); text-decoration: line-through; }

/* Check button */
.stf-todo-check {
  width: 16px; height: 16px; flex: none;
  border-radius: 4px; border: 1.5px solid var(--border-2);
  background: transparent; cursor: pointer; display: grid; place-items: center;
  color: var(--fg-1); transition: all var(--dur-fast) var(--ease-stf);
}
.stf-todo-check:hover { border-color: var(--fg-2); background: var(--bg-3); }
.stf-todo-check.is-done { background: var(--fg-1); border-color: var(--fg-1); color: var(--bg-1); }
.stf-todo-check.placeholder { pointer-events: none; visibility: hidden; }

/* Text */
.stf-todo-text {
  flex: 1; font-size: 13px; color: var(--fg-1); line-height: 1.4;
  min-width: 0; cursor: default;
}

/* Item action buttons — always visible, subtle */
.stf-todo-actions {
  display: flex; align-items: center; gap: 2px; flex: none;
  opacity: 0; transition: opacity var(--dur-fast);
}
.stf-todo-item:hover .stf-todo-actions { opacity: 1; }

.stf-todo-edit-btn,
.stf-todo-del {
  flex: none; width: 20px; height: 20px; display: grid; place-items: center;
  border: none; background: none; cursor: pointer; border-radius: 4px;
  color: var(--fg-4);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.stf-todo-edit-btn:hover { background: var(--bg-3); color: var(--fg-1); }
.stf-todo-del:hover { background: color-mix(in srgb, var(--stf-danger, #B5482F) 14%, transparent); color: var(--stf-danger, #B5482F); }

/* Inline edit input */
.stf-todo-edit-input {
  flex: 1; font: inherit; font-size: 13px; color: var(--fg-1);
  background: transparent; border: none; border-bottom: 1px solid var(--stf-blueprint);
  outline: none; padding: 1px 0; min-width: 0;
}
.stf-todo-edit-input::placeholder { color: var(--fg-4); }

/* Add item button */
.stf-todo-addnew {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px; padding: 4px 0;
  font: inherit; font-size: 11.5px; color: var(--fg-4);
  background: none; border: none; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-stf);
  align-self: flex-start;
}
.stf-todo-addnew:hover { color: var(--stf-blueprint); }
.stf-todo-addnew svg { flex: none; }

/* =====================================================================
   HUMAN CONTENT — picture-first 4:5 ideas grid
   ===================================================================== */
.hc-root { display: flex; flex-direction: column; gap: 0; }

.hc-alloc-note {
  font-size: 11.5px; color: var(--fg-4); font-style: italic;
  margin: 6px 0 20px; letter-spacing: 0.01em;
}

/* Card grid */
.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px; margin-bottom: 12px;
}

/* Card */
.hc-icard {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-2);
  transition: box-shadow var(--dur-base) var(--ease-glide), transform var(--dur-base) var(--ease-glide), border-color var(--dur-fast);
}
.hc-icard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hc-icard.is-pinned { border-color: var(--stf-blueprint); }
.hc-icard.is-dragging { opacity: 0.35; transform: scale(0.97); }
.hc-icard.is-over { outline: 2px solid var(--stf-blueprint); outline-offset: 2px; }
.hc-icard.is-editing { box-shadow: var(--shadow-lg); }

/* 4:5 image */
.hc-icard-img {
  position: relative; width: 100%;
  background-size: cover; background-position: center; overflow: hidden;
}

/* Overlay buttons */
.hc-icard-pin-btn, .hc-icard-edit-btn, .hc-icard-del {
  position: absolute; width: 28px; height: 28px; display: grid; place-items: center;
  border: none; cursor: pointer; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--stf-canvas) 72%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.hc-icard:hover .hc-icard-pin-btn,
.hc-icard:hover .hc-icard-edit-btn,
.hc-icard:hover .hc-icard-del { opacity: 1; }

.hc-icard-pin-btn  { top: 8px; right: 8px; color: var(--fg-2); }
.hc-icard-pin-btn:hover { color: var(--stf-blueprint); }
.hc-icard.is-pinned .hc-icard-pin-btn { opacity: 1; color: var(--stf-blueprint); }

.hc-icard-edit-btn { bottom: 8px; right: 8px; color: var(--fg-2); }
.hc-icard-edit-btn:hover { color: var(--fg-1); }
.hc-icard.is-editing .hc-icard-edit-btn { opacity: 1; color: var(--stf-blueprint); }

.hc-icard-del { top: 8px; left: 8px; color: var(--fg-3); }
.hc-icard-del:hover { color: var(--stf-danger); }

/* Pinned badge */
.hc-icard-pinbadge {
  position: absolute; bottom: 8px; left: 8px;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--stf-blueprint); color: #fff; border-radius: var(--radius-sm);
}

/* Info block */
.hc-icard-info {
  padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.hc-icard-title { font-size: 13px; font-weight: 600; color: var(--fg-1); line-height: 1.35; }
.hc-icard-desc {
  font-size: 11.5px; color: var(--fg-3); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Inline edit */
.hc-icard-edit-title {
  width: 100%; font: inherit; font-size: 13px; font-weight: 600; color: var(--fg-1);
  background: transparent; border: none; border-bottom: 1px solid var(--stf-blueprint); outline: none; padding: 2px 0;
}
.hc-icard-edit-desc {
  width: 100%; font: inherit; font-size: 12px; color: var(--fg-2);
  background: transparent; border: 1px solid var(--border-1); border-radius: var(--radius-sm);
  outline: none; padding: 6px 8px; resize: vertical; line-height: 1.4;
  transition: border-color var(--dur-fast);
}
.hc-icard-edit-desc:focus { border-color: var(--stf-blueprint); }
.hc-icard-edit-actions { display: flex; gap: 6px; margin-top: 4px; }

/* Type chip + inline select */
.hc-type-chip {
  display: inline-block; font-size: 9.5px; font-family: var(--font-mono);
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--fg-3); background: var(--bg-3); border: 1px solid var(--border-1);
  border-radius: var(--radius-sm); padding: 1px 6px; white-space: nowrap; flex: none;
}
.hc-type-select {
  font: inherit; font-size: 12px; color: var(--fg-2);
  background: var(--bg-2); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 4px 8px; outline: none; cursor: pointer;
}
.hc-type-select--inline { font-size: 10px; padding: 2px 4px; width: 100%; border-radius: var(--radius-xs); }

/* Assignees */
.hc-icard-assignees { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.hc-icard-av {
  width: 22px !important; height: 22px !important; font-size: 9px !important;
  border-radius: 999px; cursor: pointer; border: 1.5px solid var(--bg-1);
  transition: opacity var(--dur-fast);
}
.hc-icard-av:hover { opacity: 0.65; }

.hc-assign-btn {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 1.5px dashed var(--border-2); border-radius: 999px;
  background: none; cursor: pointer; color: var(--fg-4);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.hc-assign-btn:hover { border-color: var(--fg-2); color: var(--fg-1); }

.hc-assign-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--bg-1); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  min-width: 168px; overflow: hidden;
}

/* Modal inputs */
.hc-modal-label {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px;
}
.hc-modal-input {
  width: 100%; font: inherit; font-size: 14px; color: var(--fg-1);
  background: transparent; border: none; border-bottom: 1px solid var(--rule);
  outline: none; padding: 4px 0; transition: border-color var(--dur-fast);
}
.hc-modal-input:focus { border-color: var(--stf-blueprint); }
.hc-modal-textarea {
  width: 100%; font: inherit; font-size: 13px; color: var(--fg-1);
  background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  outline: none; padding: 8px; resize: vertical; line-height: 1.45;
  transition: border-color var(--dur-fast);
}
.hc-modal-textarea:focus { border-color: var(--stf-blueprint); }

/* =====================================================================
   PAGE HELP TIP — ? button + popover in topbar
   ===================================================================== */
.tb-page-help {
  position: relative; display: flex; align-items: center; flex: none;
}

.tb-page-help-btn {
  width: 18px; height: 18px; border-radius: 999px;
  border: 1.5px solid var(--border-2);
  background: transparent; cursor: pointer;
  font-size: 10px; font-weight: 700; font-family: var(--font-sans);
  color: var(--fg-4); line-height: 1;
  display: grid; place-items: center;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
  flex: none;
}
.tb-page-help-btn:hover,
.tb-page-help-btn.is-open {
  border-color: var(--fg-2); color: var(--fg-1); background: var(--bg-3);
}

.tb-page-help-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 120;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--bg-1); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  font-size: 12.5px; line-height: 1.6; color: var(--fg-2);
  font-family: var(--font-sans);
  text-wrap: pretty;
  pointer-events: auto;
}

.hc-alloc-note {
  font-size: 11.5px; color: var(--fg-4); font-style: italic;
  margin: 6px 0 20px; letter-spacing: 0.01em;
}


