/* Business Tasks: roster work at a glance. Runtime adds these classes only
   for Business accounts; Artist board and detail styles stay independent. */
#panel-board.bt-business .board-head {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}
#panel-board.bt-business.board-roster .board-head { padding-top: 16px; }
#panel-board.bt-business.board-roster .board-head > div:first-child { margin-bottom: 0; }
#panel-board.bt-business .board-head-actions { flex-wrap: wrap; }
#panel-board.bt-business #boardTierViews { display: flex; flex-shrink: 0; gap: 18px; }
#panel-board.bt-business .board-head button { font-family: var(--font-body); }
#panel-board.bt-business #boardCanvas.bt-canvas {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 16px 32px 48px;
  background: none;
}
#panel-board.bt-business > .bt-toolbar { margin: 12px 32px 0; }
#panel-board.bt-business > .bt-add { margin: 16px 32px 0; }
#panel-board.bt-business > .bt-notice { margin: 12px 32px 0; }

.bt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
}
.bt-views { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.bt-add {
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--border-med));
  border-radius: 14px;
  background: color-mix(in srgb, var(--green) 4%, var(--surface));
}
.bt-add-title {
  width: 100%;
  min-width: 0;
  padding: 5px 0 12px;
  margin-bottom: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.bt-add-title::placeholder { color: var(--text-3); }
.bt-add-fields { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.bt-add-fields label {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
}
.bt-add-fields select,
.bt-add-fields input,
.bt-add-owner,
.bt-add-cancel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
}
.bt-add-owner { width: auto; max-width: 240px; padding-inline: 13px; cursor: pointer; overflow-wrap: anywhere; }
.bt-add-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bt-add-cancel { width: auto; padding-inline: 13px; cursor: pointer; }
.bt-add-cancel:hover { background: var(--surface-2); color: var(--text); }
.bt-add-fields input[type="date"] { font-family: var(--font-mono); font-size: 11px; }
.bt-primary {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, var(--border-med));
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}
.bt-primary:hover { background: color-mix(in srgb, var(--green) 16%, var(--surface)); }
.bt-add button:disabled,
.bt-editor button:disabled,
.bt-table :disabled { opacity: .5; cursor: default; }

.bt-list,
.bt-loading-list { min-width: 0; container-type: inline-size; overflow: hidden; border: 1px solid var(--border-med); border-radius: 14px; background: var(--surface); }
.bt-loading-list .bt-loading-cell { display: flex; align-items: center; gap: 11px; min-height: 36px; }
.bt-loading-list .ld-skel { display: block; margin: 0; }
.bt-loading-list .bt-loading-bar { width: 72%; height: 12px; }
.bt-loading-list tr:nth-child(even) .bt-loading-bar { width: 58%; }
.bt-loading-list .bt-loading-icon { flex: 0 0 17px; width: 17px; height: 17px; border-radius: 4px; }
.bt-loading-list .bt-loading-col-2 .bt-loading-icon { flex-basis: 24px; width: 24px; height: 24px; border-radius: 50%; }
.bt-loading-list .bt-loading-col-3,
.bt-loading-list .bt-loading-col-4 { justify-content: center; }
.bt-loading-list .bt-loading-col-3 .bt-loading-bar,
.bt-loading-list .bt-loading-col-4 .bt-loading-bar { width: 100%; height: 34px; border-radius: 999px; }
.board-session-loading { grid-column: 1 / -1; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 14px; color: var(--text-3); font-family: var(--font-body); font-size: 13px; }
.bt-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bt-table th {
  padding: 12px 10px;
  background: color-mix(in srgb, var(--green) 3%, var(--surface-2));
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 14px; /* Ollie, 2026-09-22: 13px read small against the rows */
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border-med);
}
.bt-table th:first-child { width: 27%; padding-left: 16px; }
.bt-table th:nth-child(2) { width: 20%; }
.bt-table th:nth-child(3) { width: 18%; padding-left: 49px; }
.bt-table th:nth-child(4) { width: 18%; text-align: center; }
.bt-table th:last-child { width: 17%; padding-right: 16px; }
.bt-table td { padding: 14px 10px; vertical-align: middle; border-bottom: 1px solid var(--border-med); }
.bt-table td:first-child { padding-left: 16px; }
.bt-table td:last-child { padding-right: 16px; }
.bt-table tbody tr:last-child td { border-bottom: 0; }
.bt-table tbody tr:hover,
.bt-table tbody tr:focus-within { background: color-mix(in srgb, var(--green) 5%, var(--surface)); }
.bt-title-cell { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.bt-complete {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 5px 0 0;
  accent-color: var(--green);
  cursor: pointer;
}
.bt-title {
  min-width: 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.bt-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.bt-context { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.bt-context-artist,
.bt-context-project {
  max-width: 100%;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}
.bt-context-project { color: var(--text-3); font-size: 11px; }
.bt-context-artist { color: var(--text); font-weight: 600; }
button.bt-context-artist,
button.bt-context-project { cursor: pointer; }
button.bt-context-artist:hover,
button.bt-context-project:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.bt-owner,
.bt-due,
.bt-status {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}
.bt-owner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}
.bt-owner-avatar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}
.bt-owner-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-owner-count { flex: 0 0 auto; color: var(--text-2); font-size: 11px; }
.bt-owner:hover { background: var(--surface-2); color: var(--text); }
.bt-owner.cal-artist-chip,
.bt-owner-chip {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 3px 7px;
  gap: 7px;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-c, var(--surface)) 30%, var(--surface));
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.bt-owner.cal-artist-chip:hover { border-color: var(--text-3); }
[data-theme="dark"] .bt-owner.cal-artist-chip,
[data-theme="dark"] .bt-owner-chip {
  background: color-mix(in srgb, var(--chip-c, var(--surface)) 45%, var(--surface));
  border-color: color-mix(in srgb, var(--chip-c, var(--border-med)) 55%, var(--surface));
}
.bt-owner.is-unassigned { color: var(--text-3); }
.bt-owner.is-unassigned .bt-owner-avatar { background: var(--surface-2); color: var(--text-3); font-size: 16px; font-weight: 400; }
.bt-due {
  position: relative;
  height: 36px;
  min-height: 36px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text);
  text-align: center;
}
.bt-due::-webkit-datetime-edit { padding: 0; text-align: center; }
.bt-due::-webkit-date-and-time-value { min-height: 22px; margin: 0; text-align: center; }
.bt-due::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.bt-status { padding-left: 4px; cursor: pointer; }
.bt-status option { background: var(--surface); color: var(--text); }
.bt-due:hover,
.bt-status:hover { background: var(--surface); border-color: var(--border-med); }
.bt-due.is-overdue,
.bt-due.bt-overdue { color: var(--coral); background: color-mix(in srgb, var(--coral) 6%, var(--surface)); }
[data-theme="dark"] .bt-due.is-overdue,
[data-theme="dark"] .bt-due.bt-overdue { color: color-mix(in srgb, var(--coral) 65%, var(--text)); }
.bt-completed .bt-title { text-decoration: line-through; color: var(--text-3); }
.bt-completed .bt-context { opacity: .75; }
.bt-empty { padding: 44px 16px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.6; }

/* Existing selects retain their IDs and values; the visible control and its
   menu use the same themed surface and oval trigger as other Artery menus. */
.bt-native-select { display: none !important; }
.bt-select-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  background: var(--surface);
  background-image: none;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.bt-select-trigger:hover,
.bt-select-trigger[aria-expanded="true"] { background: var(--green-dim); color: var(--text); border-color: color-mix(in srgb, var(--green) 30%, var(--border-med)); }
.bt-select-trigger:disabled { opacity: .5; cursor: default; }
.bt-select-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-select-chevron { flex: 0 0 6px; width: 6px; height: 6px; margin: -3px 1px 0 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 120ms var(--ease); }
.bt-select-trigger[aria-expanded="true"] .bt-select-chevron { margin-top: 3px; transform: rotate(225deg); }
.bt-select-menu {
  position: fixed;
  z-index: 10010;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  max-height: min(320px, calc(100dvh - 24px));
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--border-med);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overscroll-behavior: contain;
}
.bt-select-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.bt-select-option:hover,
.bt-select-option[aria-selected="true"] { background: var(--green-dim); color: var(--text); }
.bt-select-option[aria-selected="true"] { font-weight: 600; }
.bt-select-option .bt-select-label { white-space: normal; overflow: visible; text-overflow: clip; }
.bt-select-option:disabled { opacity: .5; cursor: default; }
.bt-select-check { margin-left: auto; flex-shrink: 0; color: var(--text); }
.bt-select-trigger:focus-visible,
.bt-select-option:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.bt-select-option:focus-visible { outline-offset: -2px; }
/* Optional artist picker: the calendar's chip shape and theme-aware washes,
   with the existing single-selection listbox and checkmark. */
.bt-artist-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
.bt-artist-menu .bt-select-option { width: auto; max-width: 100%; min-height: 30px; padding: 6px 13px; gap: 7px; border: 1px solid var(--border-med); border-radius: 999px; font-weight: 600; line-height: 1.3; }
.bt-artist-choice.cal-artist-chip,
.bt-artist-choice.cal-artist-chip:hover,
.bt-artist-choice.cal-artist-chip[aria-expanded="true"] { background: color-mix(in srgb, var(--chip-c, var(--surface)) 30%, var(--surface)); color: var(--text-2); }
.bt-artist-choice.cal-artist-chip:hover { border-color: var(--chip-c, var(--green)); }
.bt-artist-menu .bt-select-check:empty { display: none; }
[data-theme="dark"] .bt-artist-choice.cal-artist-chip { background: color-mix(in srgb, var(--chip-c, var(--surface)) 45%, var(--surface)); border-color: color-mix(in srgb, var(--chip-c, var(--border-med)) 55%, var(--surface)); color: var(--text); }
.bt-select-trigger[data-status="todo"], .bt-select-option[data-status="todo"] { --bt-status-color: var(--bt-todo-color); }
.bt-select-trigger[data-status="inprogress"], .bt-select-option[data-status="inprogress"] { --bt-status-color: var(--green); }
.bt-select-trigger[data-status="waiting"], .bt-select-option[data-status="waiting"] { --bt-status-color: var(--amber); }
.bt-select-trigger[data-status="done"], .bt-select-option[data-status="done"] { --bt-status-color: var(--green); }
.bt-select-trigger[data-status]::before,
.bt-select-option[data-status]::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--bt-status-color); }
.bt-select-trigger.bt-status { padding-inline: 10px; color: var(--text); background: color-mix(in srgb, var(--bt-status-color) 8%, var(--surface)); border-color: color-mix(in srgb, var(--bt-status-color) 22%, var(--border)); }
.bt-select-trigger.bt-status:hover,
.bt-select-trigger.bt-status[aria-expanded="true"] { background: color-mix(in srgb, var(--bt-status-color) 14%, var(--surface)); }

/* Match the Artist list's To do blue (overrides-board.css). In progress
   uses Artery green; the shared --indigo token intentionally stays green. */
#panel-board.bt-business,
#boardDetailModal.bt-detail,
.bt-select-menu { --bt-todo-color: #6366f1; }
[data-theme="dark"] #panel-board.bt-business,
[data-theme="dark"] #boardDetailModal.bt-detail,
[data-theme="dark"] .bt-select-menu { --bt-todo-color: #818cf8; }
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill[data-status="todo"] { --bt-status-color: var(--bt-todo-color); }
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill[data-status="inprogress"] { --bt-status-color: var(--green); }
/* Waiting wears the same amber as the Waiting column and status chip
   (Ollie, 2026-09-22: the drawer pill was the generic green). */
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill[data-status="waiting"] { --bt-status-color: var(--amber); }
.bt-select-trigger.bt-status:is([data-status="todo"], [data-status="inprogress"]),
.bt-select-option:is([data-status="todo"], [data-status="inprogress"]),
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill:is([data-status="todo"], [data-status="inprogress"], [data-status="waiting"]) { color: var(--bt-status-color); }
.bt-select-option:is([data-status="todo"], [data-status="inprogress"]):hover,
.bt-select-option:is([data-status="todo"], [data-status="inprogress"])[aria-selected="true"],
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill:is([data-status="todo"], [data-status="inprogress"], [data-status="waiting"]):hover,
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill:is([data-status="todo"], [data-status="inprogress"], [data-status="waiting"]).active { background: color-mix(in srgb, var(--bt-status-color) 12%, var(--surface)); }
#boardDetailModal.bt-detail #boardDetailStatusPills .task-filter-pill:is([data-status="todo"], [data-status="inprogress"], [data-status="waiting"]) { border-color: color-mix(in srgb, var(--bt-status-color) 30%, var(--border)); }

/* Board status lives in a small, consistent marker; headings and actions
   keep the same ink so one column does not dominate the page. */
#panel-board.bt-business .board-col { --bt-column-color: var(--text-3); }
#panel-board.bt-business .board-col[data-col="todo"] { --bt-column-color: var(--bt-todo-color); }
#panel-board.bt-business .board-col[data-col="inprogress"] { --bt-column-color: var(--green); }
#panel-board.bt-business .board-col[data-col="waiting"] { --bt-column-color: var(--amber); }
#panel-board.bt-business .board-col[data-col="done"] { --bt-column-color: var(--green); }
#panel-board.bt-business .board-col:not(.kb-drop-target) { border-color: var(--border-med); }
#panel-board.bt-business .board-col-title { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
#panel-board.bt-business .board-col-title::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bt-column-color);
}
#panel-board.bt-business .kb-move-btn { color: var(--text-2); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
#panel-board.bt-business .kb-move-btn:hover { color: var(--text); text-decoration-color: currentColor; }

.bt-editor {
  position: fixed;
  z-index: 10010;
  width: min(320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border-med);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
}
.bt-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.bt-owner-choices {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
}
.bt-editor > input {
  display: inline-block;
  width: calc(100% - 88px);
  min-width: 0;
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  vertical-align: middle;
}
.bt-editor > input::placeholder { color: var(--text-3); }
.bt-editor > input + button { width: 80px; min-height: 34px; margin: 12px 0 0 8px; vertical-align: middle; }
.bt-owner-choices > p { padding: 10px 6px; color: var(--text-3); font-size: 12px; }
.bt-editor-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bt-editor button:not(.bt-primary):not(.bt-owner-chip) {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
}
.bt-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
}
.bt-notice button { flex-shrink: 0; padding: 3px 0; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bt-notice:empty { display: none; }
.bt-toolbar[hidden],
.bt-add[hidden],
.bt-add-fields[hidden],
.bt-add-fields [hidden],
.bt-notice[hidden],
.bt-editor[hidden] { display: none !important; }
.bt-add :is(input, select, button):focus-visible,
.bt-views button:focus-visible,
.bt-table :is(input, select, button):focus-visible,
.bt-editor :is(input, button):focus-visible,
.bt-notice button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Keep the task list in view while its details scroll as a single drawer. */
#boardDetailModal.bt-detail {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
  background: color-mix(in srgb, var(--bg) 25%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#boardDetailModal.bt-detail .board-modal-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(620px, 100%);
  max-width: 620px !important;
  height: 100dvh;
  max-height: 100dvh;
  padding: 24px;
  border-width: 0 0 0 1px;
  border-radius: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#boardDetailModal.bt-detail .board-modal-card > div:has(> #boardDetailTitle) {
  order: -2;
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 0;
  padding: 20px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
#boardDetailModal.bt-detail .bt-detail-context {
  order: -1;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -8px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#boardDetailModal.bt-detail .bt-detail-context > span + span::before { content: "/"; margin-right: 6px; }
#boardDetailModal.bt-detail .bd-col-form { flex: 0 0 auto; gap: 18px; min-width: 0; }
#boardDetailModal.bt-detail .bd-form-zone { flex: 0 0 auto; overflow: visible; padding: 0; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#boardDetailModal.bt-detail .bd-form-zone > * { min-width: 0; }
#boardDetailModal.bt-detail .bt-repeat-field { align-self: start; }
#boardDetailModal.bt-detail label:has(> #boardDetailDue) > span { display: none; }
#boardDetailModal.bt-detail #boardDetailDue { min-height: 38px; }
#boardDetailModal.bt-detail .bt-repeat-field .bt-select-trigger { width: 100%; min-height: 39px; margin-top: 6px; }
#boardDetailModal.bt-detail .bt-repeat-feedback { font: 12px/1.5 var(--font-body); color: var(--text-2); text-transform: none; margin-top: 6px; }
#boardDetailModal.bt-detail .bt-repeat-feedback:empty { display: none; }
#boardDetailModal.bt-detail .bt-repeat-feedback button { margin-left: 6px; }
#boardDetailModal.bt-detail .bt-activity { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 12px; }
#boardDetailModal.bt-detail .bt-activity summary { font: 500 12px/1.5 var(--font-body); color: var(--text-2); cursor: pointer; }
#boardDetailModal.bt-detail .bt-activity-list { margin-top: 10px; font: 12px/1.5 var(--font-body); color: var(--text); overflow-wrap: anywhere; }
#boardDetailModal.bt-detail .bt-activity-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
#boardDetailModal.bt-detail .bt-activity-item:last-child { border-bottom: 0; }
#boardDetailModal.bt-detail .bt-activity-actor { font-weight: 600; color: var(--text); }
#boardDetailModal.bt-detail .bt-activity-time { display: block; margin-top: 3px; font: 11px/1.5 var(--font-mono); color: var(--text-2); }
#boardDetailModal.bt-detail .bt-activity-empty { margin: 0; }
#boardDetailModal.bt-detail .bd-form-zone::after { display: none; }
#boardDetailModal.bt-detail .board-modal-label { font-family: var(--font-body); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
#boardDetailModal.bt-detail .bd-form-zone .board-assignees { max-height: 150px; overflow-y: auto; }
#boardDetailModal.bt-detail .bd-col-comments { flex: 0 0 auto; min-width: 0; border-left: 0; border-top: 1px solid var(--border); padding: 20px 0 0; gap: 14px; }
#boardDetailModal.bt-detail .board-detail-comments { flex: 0 0 auto; max-height: 400px; min-height: 0; }
#boardDetailModal.bt-detail .board-detail-comments-header { font-size: 13px; letter-spacing: 0; text-transform: none; }
#boardDetailModal.bt-detail .bd-actions-row { flex-wrap: wrap; }
#boardDetailModal.bt-detail .bd-photo-row { flex-wrap: wrap; }
/* The drawer slides over the Meridian launcher's corner; it sits on top of the
   comment box, so the launcher hides while the drawer is open (Ollie, 2026-09-22). */
body.bt-drawer-open.meridian-authed .meridian-fab, body.bt-drawer-open .meridian-fab { display: none; } /* outranks meridian.css's show rule, which loads later */
/* Green supplies the accent; readable theme text names each action. Attach
   file is exempt: it is a site pill like Save (Ollie, 2026-09-22). */
#boardDetailModal.bt-detail .task-filter-pill:not(.bt-attach-file),
#boardDetailModal.bt-detail .board-assign-add,
#boardDetailModal.bt-detail .board-assign-new-go,
#boardDetailModal.bt-detail .bd-pdf-action:not(.bd-pdf-remove) { color: var(--text-2); }
#boardDetailModal.bt-detail .task-filter-pill:not(.bt-attach-file):hover,
#boardDetailModal.bt-detail .board-assign-add:hover,
#boardDetailModal.bt-detail .board-assign-new-go:hover,
#boardDetailModal.bt-detail .bd-pdf-action:not(.bd-pdf-remove):hover { color: var(--text); }
#boardDetailModal.bt-detail .task-filter-pill.active { background: var(--green-dim); color: var(--text); }
/* One attachment entry point, with the existing photo/PDF records below it.
   Tight: heading row, one hint line, then the records (Ollie, 2026-09-22). */
#boardDetailModal.bt-detail .bt-attachments {
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
#boardDetailModal.bt-detail .bt-attachments-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#boardDetailModal.bt-detail #btAttachmentsHeading { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text); }
/* Same pill as Save (.board-modal-submit): green ink, green ghost border, green-dim hover. */
#boardDetailModal.bt-detail .bt-attach-file { flex-shrink: 0; color: var(--green); }
#boardDetailModal.bt-detail .bt-attach-file:disabled { opacity: var(--opacity-disabled); cursor: default; }
#boardDetailModal.bt-detail .bt-attach-file:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
#boardDetailModal.bt-detail .bt-attachments-hint { margin: 2px 0 0; font-family: var(--font-body); font-size: 11px; line-height: 1.4; color: var(--text-3); }
#boardDetailModal.bt-detail .bt-attachments .bd-photo-row { min-width: 0; align-items: center; gap: 12px; margin-top: 12px; }
#boardDetailModal.bt-detail .bt-attachments .bd-photo-thumb { flex: 0 1 auto; max-width: min(160px, 100%); }
#boardDetailModal.bt-detail .bt-photo-feedback { flex: 1 1 160px; min-width: 0; font-family: var(--font-body); font-size: 12px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
#boardDetailModal.bt-detail .bt-photo-feedback.is-error { color: var(--coral); }
#boardDetailModal.bt-detail .bt-photo-feedback:empty { display: none; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdfs { margin-top: 12px; padding-top: 0; border-top: 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-list { margin: 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-row { gap: 10px; padding: 9px 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-row:first-child { padding-top: 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-row:last-child { padding-bottom: 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-actions { flex-wrap: wrap; gap: 12px; }
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-feedback { flex-wrap: wrap; }
#boardDetailModal.bt-detail .bt-attachments.bt-pdf-idle .bd-pdf-feedback { margin-top: 0; }
#boardDetailModal.bt-detail .bt-attachments .bd-photo-row > label,
#boardDetailModal.bt-detail .bt-attachments .bd-photo-row > input,
#boardDetailModal.bt-detail .bt-attachments .bd-photo-row > button,
#boardDetailModal.bt-detail .bt-attachments #boardDetailPhotoNote,
#boardDetailModal.bt-detail .bt-attachments .bd-pdf-header,
#boardDetailModal.bt-detail .bt-attachments.bt-photo-empty .bd-photo-row,
#boardDetailModal.bt-detail .bt-attachments.bt-pdf-idle #boardDetailPdfNote,
#boardDetailModal.bt-detail .bt-attachments.bt-pdf-empty .bd-pdfs,
#boardDetailModal.bt-detail .bt-attachments [hidden] { display: none !important; }
#boardDetailModal.bt-detail .bt-detail-extra {
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
#boardDetailModal.bt-detail .bt-detail-extra > summary {
  width: fit-content;
  padding: 4px 0;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}
#boardDetailModal.bt-detail .bt-detail-extra > summary:hover { color: var(--text); }
#boardDetailModal.bt-detail .bt-detail-extra > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
#boardDetailModal.bt-detail .bt-detail-extra > :not(summary) { margin-top: 12px; }
#boardDetailModal.bt-detail .bt-detail-extra .board-label-pills { position: static; top: auto; margin-bottom: 0; }
#boardDetailModal.bt-detail .bt-detail-extra .board-detail-meta { margin-bottom: 0; }

@media (max-width: 1100px) {
  #panel-board.bt-business .board-head { gap: 12px; }
  #panel-board.bt-business.board-roster .board-head > div:first-child { width: auto; flex: 1 1 auto; }
  #panel-board.bt-business .board-head-actions { width: 100%; margin-left: 0; }
  #panel-board.bt-business #boardTierViews { margin-left: auto; }
}
@media (max-width: 760px) {
  #panel-board.bt-business .board-head { padding: 22px 16px 16px; }
  #panel-board.bt-business .board-head-actions { gap: 6px; }
  #panel-board.bt-business .board-head-actions .board-add-btn { padding: 7px 11px; font-size: 12px; }
  #panel-board.bt-business #boardCanvas.bt-canvas { padding: 14px 16px 40px; }
  #panel-board.bt-business > .bt-toolbar { margin: 12px 16px 0; }
  #panel-board.bt-business > .bt-add { margin: 14px 16px 0; }
  #panel-board.bt-business > .bt-notice { margin: 10px 16px 0; }
  .bt-toolbar { margin-bottom: 14px; gap: 8px; }
  .bt-add { padding: 12px; }
  .bt-add-fields label { flex-basis: calc(50% - 5px); }
  .bt-add-fields .bt-primary { margin-left: auto; }
}
/* The sidebar can make the work area narrow even on a desktop viewport. */
@container (max-width: 760px) {
  .bt-table,
  .bt-table tbody { display: block; }
  .bt-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bt-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; padding: 16px; border-bottom: 1px solid var(--border-med); }
  .bt-table tbody tr:last-child { border-bottom: 0; }
  .bt-table td,
  .bt-table td:first-child,
  .bt-table td:last-child { display: block; min-width: 0; padding: 0; border: 0; }
  .bt-table td:first-child { grid-column: 1 / -1; }
  .bt-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text-3); font-size: 10px; line-height: 1.4; }
  .bt-table td:first-child::before { display: none; }
  .bt-table td[data-label="Owner"]::before { padding-left: 39px; }
  .bt-table td[data-label="Due"]::before { text-align: center; }
  .bt-title { font-size: 14px; }
  .bt-context { padding-top: 4px; }
  .bt-due,
  .bt-status { min-height: 36px; border-color: var(--border); background: var(--surface); }
  .bt-owner { min-height: 36px; }
}
@media (max-width: 620px) {
  #boardDetailModal.bt-detail .board-modal-card { width: 100%; padding: 20px 16px; border: 0; }
  #boardDetailModal.bt-detail .board-modal-card > div:has(> #boardDetailTitle) { top: -20px; margin: -20px -16px 0; padding: 16px; }
  #boardDetailModal.bt-detail .bd-form-zone { display: flex; flex-direction: column; gap: 16px; }
  #boardDetailModal.bt-detail .bd-inline-row,
  #boardDetailModal.bt-detail .bd-label-tools { flex-wrap: wrap; }
  #boardDetailModal.bt-detail .bd-inline-row .board-label-pills { min-width: 0; }
}
