/* More breathing room around controls and documents; canvas coordinates stay intact. */
.sidebar {padding-left:10px;padding-right:10px;}
.sidebar-head {gap:10px;margin-bottom:28px;}
.sidebar-section {margin-bottom:28px;}
.sidebar-label {padding-bottom:10px;}
.sidebar-item {min-height:38px;padding:8px 10px;gap:10px;}
.sidebar-item + .sidebar-item {margin-top:3px;}
.sidebar-footer {padding-top:16px;}
.app-header {gap:15px;}
.database-toolbar {gap:24px;}
.view-tabs {gap:24px;}
.filterbar {column-gap:18px;}
.tag-list {gap:10px;}
.filter-tag {gap:7px;padding:5px 8px;}
.filter-controls {gap:12px;}
.segment button {padding-left:9px;padding-right:9px;}

.workbench-view {padding:32px 40px 72px;}
.overview-heading,.board-page-head {margin-bottom:28px;gap:24px;}
.overview-heading p {margin-top:8px;}
.section-row {margin:36px 0 20px;}
.quick-board-grid {gap:24px;}
.quick-board {padding:22px 24px;}
.quick-board > header {gap:12px;}
.quick-board-heading {gap:10px;}
.quick-board-actions {gap:6px;}
.quick-board > p {margin:14px 0 20px;line-height:1.85;}
.quick-board > p:empty {display:none;}
.quick-projects {gap:10px;}
.quick-projects > button {gap:12px;padding:7px 0;}
.quick-board > .quick-projects {margin-top:16px;}
.quick-board > p + .quick-projects {margin-top:0;}
.board-empty-add {padding-top:16px;}
.overview-projects,.board-project-grid,.outcome-grid {gap:22px;}
.workbench-view .project-card,.mobile-list .project-card,.gather-cards .project-card {padding:20px;}
.workbench-view .card-tags,.mobile-list .card-tags,.gather-cards .card-tags {gap:6px;margin-top:12px;}
.workbench-view .card-note,.mobile-list .card-note,.gather-cards .card-note {margin-top:14px;line-height:1.7;}
.workbench-view .card-footer,.mobile-list .card-footer,.gather-cards .card-footer {margin-top:14px;gap:9px;}
.workbench-view .card-reference,.mobile-list .card-reference,.gather-cards .card-reference {margin-top:12px;}
.board-note {margin-bottom:30px;}
.board-project-context {padding:0 20px 18px;}
.board-project-actions {gap:12px;margin-bottom:6px;}
.outcome-card {padding:24px;}
.outcome-card h3 {margin:16px 0 12px;}
.outcome-card footer {margin-top:24px;padding-top:16px;}
body.list-view .mobile-list {gap:22px;padding-top:28px;padding-bottom:56px;}
.gather-cards {gap:16px;}

.detail-top {padding:14px 30px 12px;gap:16px;}
.detail-body {padding:0 32px 48px;}
.detail-title-tools {margin-top:12px;gap:14px;}
.detail-toolbar {gap:8px;}
.inline-title {margin-top:12px;margin-bottom:18px;}
.detail-edit-properties {gap:16px 22px;margin-bottom:18px;}
.detail-edit-properties > label {gap:9px;}
.detail-tags {gap:8px;margin-bottom:22px;}
.project-content-section,.project-content-section.comment-pool {margin-top:28px;padding-top:22px;}
.project-content-section:first-of-type {margin-top:0;padding-top:8px;}
.project-content-section.custom-section {padding-top:22px;}
.project-section-head {gap:8px;margin-bottom:12px;}
.section-tools {gap:4px;}
.detail-section {margin-top:28px;padding-top:22px;}
.detail-section h3 {margin-bottom:16px;}
.detail-section:has(.material-row) {margin-top:28px;}
.detail-body .inline-field {margin:18px 0;}
.detail-body .inline-title {margin:12px -8px 18px;}
.relation-row {padding:16px;margin:12px 0;}
.relation-row .relation-context {margin-top:12px;}
.relation-row .inline-field {margin-bottom:0;}
.material-row {gap:10px;padding:12px 14px;margin:10px 0;}
.inline-plan {padding:12px 16px 16px;margin:16px 0;}
.inline-plan .inline-field {margin:10px 0;}
.plan-options {gap:18px;margin:14px 0;}
.comment-compose-actions {padding-top:8px;padding-bottom:10px;gap:14px;}
.comment-entry {padding:20px 0 14px;}
.comment-entry .inline-field {margin:8px 0 0;}
.detail-section-additions {gap:16px;margin:26px 0;}
.detail-actions {gap:12px;margin-top:32px;}

/* Compact priorities and a quiet, directly editable comment stream. */
.priority-editor:is([data-priority="P0"],[data-priority="P1"],[data-priority="P2"]){width:46px;min-width:46px;max-width:46px;flex:none;padding:2px 3px 2px 6px!important}
.comment-pool :is(#commentForm,.comment-composer){padding:0;border:1px solid #e5e4df;border-radius:10px;background:#fafaf8;transition:border-color .15s}
.comment-pool :is(#commentForm,.comment-composer):focus-within{border-color:#aaaFA8;background:#fff}
.comment-pool :is(#commentForm,.comment-composer)>.inline-field{margin:0}
.comment-pool :is(#commentForm,.comment-composer)>.inline-field>span{display:none}
.comment-pool :is(#commentForm,.comment-composer) .rich-editor{display:flex;flex-direction:column;border:0;background:transparent;border-radius:10px}
.comment-pool :is(#commentForm,.comment-composer) .rich-editor-input{order:0;min-height:100px;padding:16px 16px 12px;font-size:13px;line-height:1.8}
.comment-pool :is(#commentForm,.comment-composer) .rich-toolbar{order:1;padding:6px 10px;border-top:1px solid #eeede8;border-bottom:0;opacity:1;color:#8a8b83}
.comment-pool :is(#commentForm,.comment-composer) .rich-image-tools,.comment-pool :is(#commentForm,.comment-composer) .rich-editor-message{order:2}
.comment-pool :is(#commentForm,.comment-composer) .comment-compose-actions{gap:12px;margin:0;padding:9px 14px 12px;border-top:1px solid #eeede8}
.comment-pool .comment-compose-actions input{font-size:12px;padding:5px 0;color:#686b63}
.comment-pool .comment-compose-actions button{display:flex;align-items:center;gap:9px;padding:6px 11px;border:1px solid #42483f;border-radius:6px;background:#42483f;color:#fff;font-size:12px;line-height:18px}
.comment-pool .comment-compose-actions button:hover{background:#30382f;border-color:#30382f}
.comment-pool .comment-compose-actions button span{font-size:14px;color:#d7dfd1}
.comment-pool .comment-entries{display:flex;flex-direction:column;gap:20px;margin-top:22px}
.comment-pool .comment-entries:empty{display:none}
.comment-pool .comment-entry{position:relative;padding:14px 14px 12px;border:1px solid #eeede7;border-radius:9px;background:#fff}
.comment-pool .comment-entry:hover,.comment-pool .comment-entry:focus-within{border-color:#dcded5}
.comment-pool .comment-entry header{gap:9px;padding:0;min-height:28px}
/* A quiet grip for sorting, separate from editable text. */
.comment-pool .comment-entry header>.comment-drag-handle{display:grid;place-items:center;width:28px;height:28px;flex:none;margin:0;padding:5px;border:0;border-radius:6px;background:transparent;color:#b4b6b1;opacity:1;cursor:grab;touch-action:none}
.comment-pool .comment-entry header>.comment-drag-handle:hover,.comment-pool .comment-entry header>.comment-drag-handle:focus-visible{background:#f1f3ef;color:#778170}
.comment-drag-handle svg{width:14px;height:18px;fill:currentColor}
.comment-pool .comment-actions{display:flex;align-items:center;gap:4px;flex:none}
.comment-pool .comment-actions button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:26px;height:26px;padding:4px;border:0;border-radius:5px;background:transparent;color:#a4a79d;cursor:pointer}
.comment-pool .comment-actions button:hover,.comment-pool .comment-actions button:focus-visible{background:#f1f3ef;color:#65705e}
.comment-pool .comment-actions [data-delete-comment]{font-size:17px}
.comment-pool .comment-actions [data-delete-comment]:hover{background:#f9eeea;color:#aa6554}
.comment-pool .comment-pin svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.comment-pool .comment-pin span{font-size:10px;white-space:nowrap}
.comment-pool .comment-pin[aria-pressed=true]{color:#748267;background:#f4f6f0;padding:4px 7px}
.comment-pool .comment-entry.is-pinned{border-color:#e0e5da}
.comment-pool .comment-entry.is-comment-dragging{opacity:.35}
.comment-pool .comment-entry.comment-drop-before::before,.comment-pool .comment-entry.comment-drop-after::after{content:"";position:absolute;left:0;right:0;height:3px;border-radius:3px;background:#84917c;pointer-events:none}
.comment-pool .comment-entry.comment-drop-before::before{top:-12px}
.comment-pool .comment-entry.comment-drop-after::after{bottom:-12px}
.comment-drag-preview{position:fixed;z-index:10020;pointer-events:none;max-width:260px;padding:10px 16px;border:1px solid #dde2d7;border-radius:8px;background:#fff;color:#575c52;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 8px 26px #242e2220}
body.comment-sorting,body.comment-sorting *{cursor:grabbing!important;user-select:none!important}
.comment-pool .comment-meta{display:flex;flex:1;min-width:0;align-items:baseline;gap:10px;flex-wrap:wrap}
.comment-pool .comment-title{box-sizing:border-box;flex:1;min-width:110px;max-width:100%;margin-left:-5px;padding:3px 5px;border:1px solid transparent;border-radius:4px;background:transparent;color:#575c52;font:inherit;font-size:12px;line-height:1.65;font-weight:550;text-overflow:ellipsis;cursor:text}
.comment-pool .comment-title::placeholder{color:#8c9187;font-weight:500}
.comment-pool .comment-title:hover{background:#f7f8f5;border-color:#e4e7df}
.comment-pool .comment-title:focus{outline:none;border-color:#aebbac;background:#fff;box-shadow:0 0 0 2px #aebbac16}
.comment-pool .comment-entry time{font-size:10px;color:#999c92;font-variant-numeric:tabular-nums}
.comment-pool .comment-entry>.inline-field{margin:9px 0 0 36px}
.comment-pool .comment-entry .rich-editor{border:0;background:transparent;border-radius:4px}
.comment-pool .comment-entry .rich-editor-input{min-height:28px;padding:0;font-size:13px;line-height:1.85}
.comment-pool .comment-entry .rich-editor.is-editing{border:1px solid #a5b1c5;border-radius:6px;background:#fff}
.comment-pool .comment-entry .rich-editor.is-editing .rich-editor-input{min-height:100px;padding:12px 14px}
.comment-pool .comment-entry .rich-toolbar{position:static;width:auto;max-width:none;padding:7px 8px;border-bottom:1px solid #e8eaee;background:#fff;opacity:1;visibility:visible;pointer-events:auto}
.comment-pool .comment-entry .rich-paste-hint{display:none}
@media(max-width:760px){.comment-pool :is(#commentForm,.comment-composer) .rich-editor-input,.comment-pool .comment-entry .rich-editor-input{font-size:16px}.comment-pool .comment-entry>.inline-field{margin-left:0}.comment-pool .comment-meta{gap:4px 9px}.comment-pool .comment-entry header>button{opacity:1}}
@media(prefers-reduced-motion:reduce){.comment-pool :is(#commentForm,.comment-composer){transition:none}}

@media (min-width:761px) and (max-width:1100px) {
  .app-header {gap:10px;}
  .database-toolbar {gap:14px;}
  .view-tabs {gap:18px;}
  .filterbar {column-gap:12px;}
  .tag-list {gap:7px;}
  .filter-controls {gap:8px;}
  .workbench-view {padding:28px 28px 60px;}
  .quick-board {padding:20px;}
  .quick-board-grid {gap:20px;}
}

@media (max-width:760px) {
  .sidebar-item {min-height:42px;}
  .sidebar-section {margin-bottom:24px;}
  .app-header {gap:6px;}
  .database-toolbar {gap:8px;}
  .view-tabs {gap:12px;}
  .view-tabs button {padding-left:3px;padding-right:3px;}
  .filterbar {column-gap:8px;row-gap:5px;}
  .tag-list {gap:7px;}
  .filter-controls {gap:8px;}
  .filter-tag {padding:5px 7px;}
  .workbench-view {padding:22px 18px 44px;}
  .overview-heading,.board-page-head {gap:12px;margin-bottom:22px;}
  .section-row {margin:30px 0 16px;}
  .quick-board-grid,.overview-projects,.board-project-grid,.outcome-grid {gap:18px;}
  .quick-board,.outcome-card {padding:18px;}
  .quick-board > p {margin:12px 0 16px;}
  .quick-projects {gap:8px;}
  .quick-projects > button {padding:6px 0;}
  .workbench-view .project-card,.mobile-list .project-card,.gather-cards .project-card {padding:18px;}
  .mobile-list,body.list-view .mobile-list {gap:16px;padding:20px 18px 36px;}
  .board-project-context {padding:0 18px 16px;}
  .detail-top {padding:8px 18px 6px;gap:10px;}
  .detail-body {padding:0 22px 40px;}
  .detail-toolbar {gap:5px;}
  .detail-edit-properties {gap:12px 16px;}
  .project-content-section,.project-content-section.comment-pool,.detail-section {margin-top:24px;padding-top:18px;}
  .project-content-section:first-of-type {margin-top:0;padding-top:6px;}
  .project-content-section.custom-section {padding-top:18px;}
  .project-section-head {gap:3px;margin-bottom:10px;}
  .section-tools {gap:2px;}
  .detail-body .inline-field {margin:14px 0;}
  .inline-plan {padding:10px 12px 14px;margin:14px 0;}
  .inline-plan .inline-field {margin:8px 0;}
  .comment-entry .inline-field {margin:8px 0 0;}
  .relation-row {padding:14px;}
  .material-row {padding:10px 12px;}
}
