/* A shared board with stable controls and independent column scrolling. */
.tasks-view .topbar { min-height: 65px; padding: 12px 24px; }
.tasks-view .topbar h1 { margin: 0; color: #242832; font-size: 19px; font-weight: 700; }
.tasks-view #breadcrumb { display: none; }
.tasks-view #content { display: flex; min-height: 0; padding: 0; overflow: hidden; }
.tasks-view .tasks-new { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 12px; font-size: 12px; border-radius: 6px; }
.task-icon { width: 17px; height: 17px; flex: none; }
.tasks-workspace { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; color: #303744; background: #fff; }
.tasks-workspace [hidden], .task-detail [hidden] { display: none !important; }
.tasks-workspace button:focus-visible, .task-detail button:focus-visible, .task-move-menu button:focus-visible { outline: 2px solid #5a6ec5; outline-offset: 2px; }
.tasks-workspace input:focus, .tasks-workspace select:focus, .task-detail select:focus { border-color: #858bc0; box-shadow: 0 0 0 2px #eeeef9; }
.tasks-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 24px 21px; }
.tasks-summary { min-width: 0; }
.tasks-summary h2 { margin: 0; font-size: 23px; line-height: 1.35; letter-spacing: -.5px; font-weight: 650; color: #252b36; }
.tasks-summary p { margin: 7px 0 0; font-size: 12px; line-height: 1.5; color: #727984; }
.tasks-progress { display: flex; flex-direction: column; gap: 9px; width: 174px; flex: none; color: #747a84; font-size: 11px; }
.tasks-progress > span { text-align: right; }
.tasks-progress progress { appearance: none; border: 0; width: 100%; height: 5px; border-radius: 10px; background: #e9edef; color: #4b9381; overflow: hidden; }
.tasks-progress progress::-webkit-progress-bar { background: #e9edef; border-radius: 10px; }
.tasks-progress progress::-webkit-progress-value { background: #4b9381; border-radius: 10px; }
.tasks-progress progress::-moz-progress-bar { background: #4b9381; border-radius: 10px; }
.tasks-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px; border-bottom: 1px solid #e9ebef; }
.tasks-scopes { display: flex; min-width: 0; gap: 14px; overflow-x: auto; scrollbar-width: none; }
.tasks-scopes::-webkit-scrollbar { display: none; }
.tasks-scopes .tasks-scope { display: flex; align-items: center; gap: 7px; flex: none; margin: 0; padding: 12px 0 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #757984; background: none; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tasks-scope > span:last-child { min-width: 19px; padding: 2px 5px; text-align: center; border-radius: 5px; color: #828791; background: #f0f1f4; font-size: 10px; font-variant-numeric: tabular-nums; }
.tasks-scopes .tasks-scope:hover { color: #534564; }
.tasks-scopes .tasks-scope[aria-pressed=true] { color: #5c3d72; border-bottom-color: #765387; font-weight: 650; }
.tasks-scope[aria-pressed=true] > span:last-child { color: #6b4c7d; background: #eee7f3; }
.task-view-switch { display: flex; align-items: center; gap: 2px; flex: none; padding: 3px; border: 1px solid #e5e7ec; border-radius: 7px; background: #f7f8fa; }
.task-view-switch .task-view-button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 10px; border: 1px solid transparent; border-radius: 4px; background: none; color: #838792; font-size: 11px; }
.task-view-switch .task-view-button[aria-pressed=true] { background: #fff; border-color: #e4e6eb; box-shadow: 0 1px 2px #16223708; color: #414754; }
.task-view-button .task-icon { width: 14px; height: 14px; }
.tasks-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 17px 24px; }
.tasks-search { position: relative; width: 290px; max-width: 100%; flex: 0 1 290px; }
.tasks-search > .task-icon { position: absolute; top: 10px; left: 11px; width: 15px; height: 15px; pointer-events: none; color: #9299a3; }
.tasks-search input { display: block; width: 100%; height: 35px; padding: 8px 11px 8px 34px; color: #353d49; font-size: 12px; border: 1px solid #e0e4ea; border-radius: 6px; background: #fff; }
.tasks-search input::placeholder { color: #9298a2; }
.tasks-filters select { width: 162px; height: 35px; padding: 7px 10px; font-size: 12px; border: 1px solid #e0e4ea; border-radius: 6px; color: #636b78; }
.tasks-clear { padding: 5px; background: none; border: 0; color: #78508b; font-size: 11px; }
.tasks-clear:hover { background: none; text-decoration: underline; }
.tasks-result-count { margin-left: auto; white-space: nowrap; font-size: 11px; color: #8d929c; font-variant-numeric: tabular-nums; }
.tasks-body { flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
.task-board { display: grid; grid-auto-columns: minmax(248px, 1fr); grid-auto-flow: column; align-items: start; gap: 14px; height: 100%; min-height: 0; padding: 0 24px 14px; overflow-x: auto; overflow-y: hidden; scroll-padding: 24px; scrollbar-width: thin; scrollbar-color: #d1d6df transparent; }
.task-board:focus-visible { outline: 2px solid #c1c9e4; outline-offset: -2px; }
.task-column { display: flex; flex-direction: column; min-width: 0; min-height: 220px; max-height: 100%; border: 1px solid #e9ecf0; border-radius: 9px; background: #f4f5f7; }
.task-column-heading { display: flex; align-items: center; justify-content: space-between; min-height: 49px; gap: 8px; padding: 9px 11px 8px 13px; }
.task-column-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 650; line-height: 20px; color: #414854; }
.task-column-heading h2 { min-width: 0; }
.task-column-heading h2 > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-column-count { min-width: 19px; padding: 0 5px; border-radius: 4px; background: #e8ebef; color: #8c929c; text-align: center; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.task-status-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #ad99c8; }
.task-status-dot.todo { background: #adb6c4; }
.task-status-dot.progress { background: #6195d6; }
.task-status-dot.blocked { background: #dfa758; }
.task-status-dot.done { background: #6fae98; }
.task-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; flex: none; padding: 5px; background: transparent; border: 0; border-radius: 5px; color: #9299a5; }
.task-icon-button:hover, .task-icon-button[aria-expanded=true] { background: #e8eaf0; color: #4a5060; }
.task-column-scroll { min-height: 0; overflow: auto; padding: 0 8px 8px; scrollbar-width: thin; scrollbar-color: #d5dae2 transparent; overscroll-behavior: contain; }
.task-column-cards { display: flex; flex-direction: column; gap: 8px; }
.task-card { position: relative; min-width: 0; border: 1px solid #e0e4e9; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px #17253c06; cursor: grab; }
.task-card:hover { border-color: #b7bfd0; box-shadow: 0 2px 7px #1622370b; }
.task-card .task-card-open { display: flex; flex-direction: column; justify-content: space-between; width: 100%; min-height: 102px; padding: 14px 12px 11px; text-align: left; border: 0; border-radius: 7px; background: none; cursor: inherit; }
.task-card .task-card-open:hover { background: none; }
.task-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 0; padding-right: 12px; color: #394150; font-size: 13px; font-weight: 550; line-height: 1.55; overflow-wrap: anywhere; }
.task-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; margin-top: 20px; }
.task-owner { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: #858b96; font-size: 11px; }
.task-owner > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-avatar { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; flex: none; border-radius: 50%; color: #755888; background: #eee7f5; font-size: 8px; font-weight: 700; letter-spacing: .25px; }
.task-avatar.human { color: #9b7544; background: #f8eddc; }
.task-avatar.unassigned { color: #a1a8b2; background: #eff1f4; }
.task-card-type { display: inline-flex; color: #bdc2cb; }
.task-card-type > svg { width: 14px; height: 14px; }
.task-card .task-card-move { position: absolute; top: 6px; right: 4px; width: 24px; height: 24px; opacity: 0; background: #fff; }
.task-card:hover .task-card-move, .task-card:focus-within .task-card-move, .task-card-move[aria-expanded=true] { opacity: 1; }
.task-card .task-card-move:hover { background: #f0edf5; }
.task-card[data-tone=blocked] { border-left: 3px solid #dbab64; }
.task-card[data-tone=done] .task-card-title { color: #65717d; }
.task-card.is-saving { opacity: .55; cursor: progress; }
.task-card.is-dragging { opacity: .35; }
.task-column.is-drop-target { border-color: #7b81b8; background: #eaeaf6; outline: 2px solid #b7bce5; outline-offset: -2px; }
.task-column-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 118px; margin: 0 2px; padding: 20px 10px; border: 1px dashed #dde2e9; border-radius: 6px; color: #8993a0; text-align: center; font-size: 12px; }
.task-column-empty small { color: #a3abb6; font-size: 10px; }
.task-column-add { display: flex; align-items: center; gap: 6px; margin-top: 9px; width: 100%; padding: 8px 7px; border: 0; border-radius: 5px; background: none; color: #929aa7; font-size: 11px; }
.task-column-add:hover { color: #5e6878; background: #e9ecf1; }
.task-column-add .task-icon { width: 14px; height: 14px; }
.task-column-more { width: 100%; margin-top: 8px; padding: 9px; color: #7e8492; background: none; border: 1px dashed #dce1e8; border-radius: 5px; font-size: 11px; }
.tasks-board-hint { padding: 1px 24px 13px; color: #a1a6af; font-size: 10px; line-height: 1.5; }
.tasks-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px; height: 100%; padding: 24px; text-align: center; color: #8a8597; }
.tasks-empty > .task-icon { width: 36px; height: 36px; margin-bottom: 8px; color: #ad9cb9; }
.tasks-empty h2 { margin: 0; color: #514958; font-size: 20px; font-weight: 600; }
.tasks-empty p { margin: 0; color: #8d8796; font-size: 13px; line-height: 1.6; max-width: 370px; }
.tasks-empty button { margin-top: 9px; font-size: 12px; }
.tasks-feedback { padding: 10px 12px; margin: 0 24px 12px; font-size: 12px; color: #a3503c; background: #fff4ef; border: 1px solid #f1ddd2; border-radius: 6px; }
.task-list { height: 100%; overflow: auto; padding: 0 24px 24px; scrollbar-width: thin; }
.task-list-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.task-list-table th { position: sticky; top: 0; z-index: 1; padding: 11px 14px; background: #f5f6f8; color: #9299a4; font-size: 10px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .45px; }
.task-list-table th:first-child { width: 61%; border-radius: 6px 0 0 0; }
.task-list-table th:nth-child(2) { width: 19%; }
.task-list-table th:last-child { width: 20%; border-radius: 0 6px 0 0; }
.task-list-table td { padding: 13px 14px; border-bottom: 1px solid #eef0f4; color: #586473; vertical-align: middle; }
.task-list-table td > .task-owner { max-width: 100%; }
.task-list-table td:first-child > .task-icon { width: 14px; height: 14px; margin-right: 8px; vertical-align: middle; color: #a3adba; }
.task-list-table .task-list-title { max-width: calc(100% - 26px); padding: 0; border: 0; border-radius: 2px; background: none; color: #454f5e; font-size: 12px; font-weight: 500; text-align: left; vertical-align: middle; line-height: 1.6; overflow-wrap: anywhere; }
.task-list-title:hover { text-decoration: underline; }
.task-list-table tbody tr:hover { background: #fbfafc; }
.task-status-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px; background: #f0eaf6; border: 1px solid transparent; border-radius: 5px; color: #89749f; font-size: 10px; font-weight: 500; white-space: nowrap; }
.task-status-pill { overflow: hidden; }
.task-status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.task-status-pill.todo { background: #eef0f4; color: #8691a0; }
.task-status-pill.progress { background: #eaf1fc; color: #5683bb; }
.task-status-pill.blocked { background: #fbf0df; color: #a67b36; }
.task-status-pill.done { background: #e9f3ed; color: #5b9376; }
.task-move-menu { position: fixed; z-index: 250; width: 206px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; padding: 5px; border: 1px solid #dedce6; border-radius: 8px; background: #fff; color: #575265; box-shadow: 0 8px 30px #22213720; }
.task-menu-heading { padding: 8px 10px; color: #9c94a5; font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: .5px; }
.task-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: none; text-align: left; font-size: 12px; }
.task-menu-item:hover, .task-menu-item:focus-visible { background: #f0edf6; }
.task-menu-item > .task-icon { margin-left: auto; width: 14px; height: 14px; color: #806392; }
.task-detail { width: min(900px, calc(100vw - 40px)); max-height: min(90dvh, 1000px); padding: 0; border-color: #dbe0e8; border-radius: 12px; color: #333b49; }
.task-detail::backdrop { background: #18233366; }
.task-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 12px 28px; }
.task-detail-caption { font-size: 10px; font-weight: 650; letter-spacing: 1px; text-transform: uppercase; color: #9a96a3; }
.task-detail-actions { display: flex; gap: 5px; }
.task-detail-actions .task-icon-button { width: 30px; height: 30px; }
.task-detail > h2 { margin: 4px 28px 25px; font-size: 23px; font-weight: 650; line-height: 1.45; letter-spacing: -.35px; overflow-wrap: anywhere; }
.task-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 208px; align-items: start; gap: 30px; padding: 0 28px 30px; }
.task-description { min-width: 0; }
.task-description-heading { margin: 0 0 14px; color: #a09aa8; font-size: 11px; font-weight: 600; }
.task-description .document-markdown { width: 100%; max-width: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.8; color: #525e6b; }
.task-description .document-markdown h2 { font-size: 17px; }
.task-description .document-markdown h3 { font-size: 15px; }
.task-description .document-markdown > :first-child { margin-top: 0; }
.task-description .task-no-description { color: #a4a2ae; }
.task-detail-sidebar { min-width: 0; padding: 16px; border: 1px solid #ececf2; border-radius: 8px; background: #f7f7fa; }
.task-detail-sidebar label { display: block; margin: 18px 0 7px; color: #8e879a; font-size: 10px; font-weight: 600; }
.task-detail-sidebar label:first-child { margin-top: 0; }
.task-detail-sidebar select { width: 100%; min-width: 0; height: 35px; padding: 6px 8px; border: 1px solid #e2dfe9; border-radius: 5px; color: #6d6077; font-size: 12px; background: #fff; }
.task-detail-edit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 23px 0 0; border-color: #dcd5e5; color: #745483; background: #fff; font-size: 12px; }
.task-detail-edit .task-icon { width: 14px; height: 14px; }
.task-detail-source { display: block; margin: 9px 0 0; width: 100%; padding: 5px 0; font-size: 10px; color: #9a8fa2; background: none; border: 0; }
.task-detail-source:hover { text-decoration: underline; background: none; }
.task-source-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e8e4ed; color: #a49bab; font-size: 10px; }
.task-source-details summary { cursor: pointer; }
.task-source-details .code { margin: 9px 0 0; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.task-detail-feedback { margin: -10px 28px 20px; padding: 9px 12px; border: 1px solid #d6e8de; border-radius: 6px; background: #f0f8f3; color: #538169; font-size: 12px; }
.task-detail-feedback.is-error { border-color: #eddbd3; background: #fff5f0; color: #a26048; }
.task-form label { margin-top: 16px; color: #6b6077; font-size: 12px; font-weight: 600; }
.task-form > label:first-child { margin-top: 8px; }
.task-form > input { font-size: 15px; }
.task-form-metadata { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; }
.task-form-metadata > div { min-width: 0; }
.task-form select { font-size: 13px; }
.task-form textarea { min-height: 160px; resize: vertical; font-family: inherit; line-height: 1.6; font-size: 13px; }
.task-form-hint { margin: 7px 0 0; color: #a29aa9; font-size: 11px; }
@media (hover: none) { .task-card .task-card-move { opacity: 1; } }
@media (max-width: 1100px) {
  .tasks-controls { gap: 12px; }
  .tasks-scopes { gap: 12px; }
  .task-view-button > span { display: none; }
  .task-view-switch .task-view-button { padding: 6px 8px; }
  .tasks-filters { gap: 8px; }
  .tasks-search { flex: 1; }
  .tasks-filters select { width: 150px; }
}
@media (max-width: 700px) {
  .tasks-view .topbar { padding: 12px 16px; }
  .tasks-view .topbar h1 { font-size: 18px; }
  .tasks-view #top-actions .tasks-new { font-size: 11px; padding: 6px 9px; }
  .tasks-overview { padding: 20px 16px 17px; gap: 12px; align-items: flex-start; }
  .tasks-summary h2 { font-size: 20px; }
  .tasks-summary p { font-size: 11px; }
  .tasks-progress { width: 96px; margin-top: 4px; font-size: 9px; }
  .tasks-controls { padding: 0 16px; gap: 12px; }
  .tasks-scopes { gap: 13px; }
  .tasks-scopes .tasks-scope { font-size: 11px; }
  .tasks-scope > span:last-child { font-size: 9px; min-width: 16px; padding: 2px 4px; }
  .tasks-filters { padding: 13px 16px; }
  .tasks-search { flex-basis: 100%; width: 100%; }
  .tasks-filters select { width: 140px; flex: 1; }
  .tasks-result-count { font-size: 10px; }
  .task-board { grid-auto-columns: minmax(240px, 84%); gap: 12px; padding: 0 16px 12px; scroll-padding: 16px; scroll-snap-type: x proximity; }
  .task-column { scroll-snap-align: start; }
  .tasks-board-hint { padding: 2px 16px 11px; font-size: 9px; }
  .tasks-feedback { margin-left: 16px; margin-right: 16px; }
  .task-list { padding: 0 16px 16px; }
  .task-list-table thead { display: none; }
  .task-list-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; padding: 12px 0; border-bottom: 1px solid #eef0f4; }
  .task-list-table td { padding: 0; border: 0; min-width: 0; }
  .task-list-table td:first-child { grid-column: 1 / -1; margin-bottom: 10px; }
  .task-list-table td:last-child { text-align: right; }
  .task-list-table .task-owner { max-width: 100%; }
  .task-detail { width: calc(100vw - 20px); max-height: 95dvh; border-radius: 10px; }
  .task-detail-header { padding: 12px 14px 10px 18px; }
  .task-detail > h2 { margin: 2px 18px 20px; font-size: 20px; }
  .task-detail-layout { display: flex; flex-direction: column; gap: 22px; padding: 0 18px 22px; }
  .task-detail-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; width: 100%; order: -1; }
  .task-detail-sidebar label { margin: 0; }
  .task-detail-sidebar label[for=field-task-detail-status] { grid-column: 1; grid-row: 1; }
  .task-detail-sidebar label[for=field-task-detail-owner] { grid-column: 2; grid-row: 1; }
  .task-detail-sidebar #field-task-detail-status { grid-column: 1; grid-row: 2; }
  .task-detail-sidebar #field-task-detail-owner { grid-column: 2; grid-row: 2; }
  .task-detail-edit { grid-column: 1; grid-row: 3; margin: 5px 0 0; padding: 8px 5px; font-size: 11px; }
  .task-detail-source { grid-column: 2; grid-row: 3; margin: 5px 0 0; }
  .task-source-details { grid-column: 1 / -1; margin-top: 7px; padding-top: 10px; }
  .task-detail-feedback { margin: 0 18px 16px; }
  .task-form-metadata { gap: 10px; }
  .task-form-metadata select { padding: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tasks-workspace *, .task-detail * { transition: none !important; scroll-behavior: auto !important; } }
