.kb { --kb-blue:#1d4ed8; --kb-line:#dce2ec; --kb-muted:#475569; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; min-width:0; color:#172337; font-family:Inter,"Segoe UI",sans-serif; }
.kb :is(input,select,button,summary) { min-height:40px; }
.kb input[type=checkbox] { min-height:24px; width:24px; accent-color:var(--kb-blue); }
.kb a { color:var(--kb-blue); text-decoration:underline; }
.kb label { min-width:0; }
.kb :focus-visible { outline:3px solid var(--kb-blue); outline-offset:2px; }
.kb-primary { background:var(--kb-blue); color:white; border-color:var(--kb-blue); }
.kb-primary:hover:not(:disabled) { background:#1e40af; }
.kb-bar { display:flex; flex-wrap:wrap; align-items:end; gap:8px; }
.kb-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:10px; align-items:end; }
.kb-wide { grid-column:1/-1; }
.kb-section { background:white; border:1px solid var(--kb-line); border-radius:12px; padding:clamp(12px,2vw,20px); display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.kb-section summary { cursor:pointer; display:list-item; width:fit-content; font-weight:640; padding:8px 0; }
.kb .kb-muted { color:var(--kb-muted); }
.kb-live:empty { margin:-7px 0; }
.kb-live:not(:empty) { padding:10px 12px; border-radius:8px; color:#1e40af; background:#eaf0ff; overflow-wrap:anywhere; }
.kb-live.kb-error:not(:empty) { color:#9b2016; background:#fee4e2; }
.kb-lanes { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; }
.kb-board { display:grid; grid-auto-columns:minmax(218px,1fr); grid-auto-flow:column; align-items:start; gap:12px; min-width:0; max-width:100%; overflow:auto; padding:5px 4px 12px; }
.kb-column { min-height:120px; min-width:0; display:grid; gap:9px; padding:10px; border:1px solid var(--kb-line); border-top:4px solid var(--kb-column-color,#94a3b8); border-radius:10px; background:#f5f6f8; }
.kb-column-head { display:flex; gap:6px 10px; flex-wrap:wrap; align-items:center; justify-content:space-between; }
.kb-column-head h3 { overflow-wrap:anywhere; }
.kb-wip { color:#93370d; background:#fef0c7; border-radius:5px; padding:2px 6px; }
.kb-column.kb-column-wip { outline:2px solid #d97706; outline-offset:-2px; }
.kb-project-status { background:#eef2f8; color:#334155; padding:4px 8px; border-radius:6px; font-weight:620; }
.kb-health-green { background:#ecfdf3; color:#067647; }
.kb-health-yellow { background:#fef0c7; color:#93370d; }
.kb-health-red { background:#fee4e2; color:#b42318; }
.kb-tabs { border-bottom:1px solid var(--kb-line); }
.kb-tabs a { padding-inline:8px; }
.kb-tabs a[aria-current] { border-bottom:3px solid var(--kb-blue); font-weight:650; text-decoration:none; }
.kb-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,168px),1fr)); gap:8px; margin:0; }
.kb-kpis div { padding:10px 12px; border:1px solid var(--kb-line); border-radius:8px; min-width:0; }
.kb-kpis dt { color:var(--kb-muted); }
.kb-kpis dd { margin:4px 0 0; font-weight:650; overflow-wrap:anywhere; }
.kb-task { padding:10px; background:white; border:1px solid var(--kb-line); border-radius:9px; min-width:0; display:grid; gap:6px; overflow-wrap:anywhere; }
.kb-task p { font-size:.88rem; }
.kb-task progress { display:block; width:100%; height:8px; accent-color:var(--kb-blue); }
.kb-task progress.kb-late { accent-color:#b42318; }
.kb-late { color:#b42318; }
.kb-avatar { display:inline-grid; place-items:center; width:25px; height:25px; margin-right:6px; border-radius:50%; background:#eaf0ff; color:#1e40af; font-weight:700; }
.kb-task[data-drag-over],.kb-column[data-drag-over] { outline:2px dashed var(--kb-blue); outline-offset:-2px; }
.kb-task[draggable=true] { cursor:grab; }
.kb-link { display:inline-flex; align-items:center; min-height:40px; }
.kb-list { width:100%; min-width:0; max-width:100%; overflow:auto; border:1px solid var(--kb-line); border-radius:8px; }
.kb-list table { min-width:670px; }
.kb-drawer { width:min(850px,calc(100% - 24px)); max-height:calc(100dvh - 28px); padding:clamp(12px,2.4vw,24px); }
.kb-drawer .kb-section { padding:12px; }
.kb-drawer h2 { overflow-wrap:anywhere; }
.kb-drawer textarea { min-height:90px; }
.kb-checks { display:grid; gap:7px; }
.kb-check-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; }
.kb-drawer ul { margin-block:0; padding-inline-start:22px; }
.kb-markdown { display:grid; gap:8px; overflow-wrap:anywhere; white-space:pre-wrap; }
.kb-note { white-space:pre-wrap; overflow-wrap:anywhere; }
@media (max-width:620px) { .kb-board { grid-auto-columns:minmax(230px,78vw); } .kb-drawer { padding:12px; } }

.kb-my-work, .kb-my-work .kb, .kb-mine-drawer {
  --kb-blue:#226247;
  --kb-line:#dbe5dd;
  --kb-muted:#4e6558;
  color:#192e25;
}
.kb-my-work { container:my-work / inline-size; }
.kb-my-work > :has(> .kb-mine-filters) { display:grid; gap:10px; }
.kb-mine-quick, .kb-mine-main, .kb-mine-view, .kb-mine-status {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.kb-mine-quick button, .kb-mine-status button {
  color:#325344;
  border-color:var(--kb-line);
  background:#fff;
}
.kb-mine-quick button[aria-pressed="true"], .kb-mine-status button[aria-pressed="true"] {
  background:#daede0;
  border-color:#a0c3aa;
  color:#174b33;
}
.kb-mine-filters {
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid var(--kb-line);
  border-radius:12px;
  background:#fff;
}
.kb-mine-main { align-items:end; gap:8px; }
.kb-mine-main > label:has(input[type="search"]) { flex:1 1 230px; }
.kb-mine-main input[type="search"] { width:100%; background:#f5f8f5; }
.kb-mine-filters :is(label, select, input, summary) { color:#334f41; }
.kb-mine-filters :is(label, input, select, button, summary) { font-size:.86rem; }
.kb-mine-extra[open] { flex:1 0 100%; }
.kb-mine-extra > summary {
  display:list-item;
  width:fit-content;
  padding:8px 9px;
  border:1px solid var(--kb-line);
  border-radius:7px;
  font-weight:650;
  cursor:pointer;
}
.kb-mine-extra > .kb-fields { padding:6px 0 4px; }
.kb-mine-view {
  width:fit-content;
  padding:3px;
  border-radius:8px;
  background:#ecf2ec;
}
.kb-mine-view button {
  min-height:34px;
  padding:4px 10px;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  color:#425b4d;
}
.kb-mine-view button[aria-pressed="true"] {
  background:#fff;
  color:#164c34;
  border-color:#d5e3d7;
}
.kb-mine-count { color:var(--kb-muted); font-size:.82rem; }
.kb-mine-status { display:none; }
.kb-mine-empty { padding:18px; border:1px solid var(--kb-line); border-radius:10px; background:#fff; color:var(--kb-muted); }
.kb-my-work .kb-lanes { gap:18px; }
.kb-my-work .kb-board {
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-flow:row;
  gap:10px;
  overflow:visible;
  padding:0;
}
.kb-my-work .kb-column {
  --lane-bg:#edf1ec;
  --lane-dot:#637868;
  min-height:164px;
  gap:8px;
  padding:9px;
  border:0;
  border-radius:11px;
  background:var(--lane-bg);
}
.kb-my-work .kb-column[data-column-id="in_progress"] { --lane-bg:#edf2f6; --lane-dot:#47748d; }
.kb-my-work .kb-column[data-column-id="review"] { --lane-bg:#f5f0e7; --lane-dot:#8b5e22; }
.kb-my-work .kb-column[data-column-id="done"] { --lane-bg:#e9f2e9; --lane-dot:#4c7752; }
.kb-my-work .kb-column-head { padding:5px 2px; gap:4px; }
.kb-my-work .kb-column-head h3 { display:flex; align-items:center; gap:6px; font-size:.88rem; }
.kb-my-work .kb-column-head h3::before {
  content:"";
  flex:none;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--lane-dot);
}
.kb-my-work .kb-column-head small {
  min-width:24px;
  padding:2px 5px;
  border-radius:12px;
  background:#fff;
  text-align:center;
  font-weight:650;
}
.kb-my-work .kb-task {
  gap:7px;
  padding:10px;
  border-color:#d9e5dc;
  box-shadow:0 1px 3px #24463211;
}
.kb-my-work .kb-task:hover { border-color:#91af9e; }
.kb-my-work .kb-task a {
  min-height:32px;
  color:#173d2f;
  text-decoration:none;
  font-weight:670;
  overflow-wrap:anywhere;
}
.kb-my-work .kb-task a:hover { text-decoration:underline; text-underline-offset:3px; }
.kb-mine-card-top, .kb-mine-card-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:4px 5px;
  font-size:.78rem;
  font-variant-numeric:tabular-nums;
}
.kb-my-work .kb-task :is(.kb-mine-card-top, .kb-mine-card-bottom) p { font-size:inherit; }
.kb-mine-card-bottom { border-top:1px solid #edf2ed; padding-top:7px; }
.kb-mine-due-today { color:#276745; font-weight:650; }
.kb-mine-code { color:#486256; font-weight:650; }
.kb-mine-priority { padding:2px 5px; border-radius:4px; background:#edf3ed; color:#385548; }
.kb-mine-priority[data-priority="high"], .kb-mine-priority[data-priority="urgent"] {
  background:#f9efe0;
  color:#784b15;
}
.kb-my-work .kb-task > details {
  padding:0;
  border:0;
  border-top:1px solid #edf2ed;
  border-radius:0;
  background:transparent;
}
.kb-my-work .kb-task > details > summary { min-height:28px; font-size:.8rem; color:#335a47; }
.kb-my-work .kb-list { border-radius:10px; background:#fff; }
.kb-my-work .kb-list th { background:#eef4ee; color:#3f5a4b; text-align:left; }
.kb-my-work .kb-list tbody tr:nth-child(even) { background:#f8fbf8; }
.kb-mine-drawer {
  --task-gutter:clamp(16px,3vw,28px);
  --task-top:clamp(18px,9dvh,88px);
  width:min(780px,calc(100% - 24px));
  inset:var(--task-top) 0 auto;
  margin:0 auto;
  max-height:calc(100dvh - var(--task-top) - 16px);
  overflow:auto;
  overscroll-behavior:contain;
  gap:0;
  padding:0;
  background:#fff;
  border:1px solid var(--kb-line);
  border-radius:16px;
  box-shadow:0 20px 60px #102a2040;
}
.kb-mine-drawer::backdrop { background:#15292275; }
.kb-mine-drawer .kb-section { border-color:var(--kb-line); }
.kb-my-work .kb-primary:hover:not(:disabled), .kb-mine-drawer .kb-primary:hover:not(:disabled) { background:#174b33; }
.kb-mine-card-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:16px;
  z-index:2;
  position:sticky;
  top:0;
  padding:20px var(--task-gutter) 0;
  background:#fff;
  border-bottom:1px solid var(--kb-line);
}
.kb-mine-heading { display:grid; gap:6px; min-width:0; }
.kb-mine-heading p { margin:0; }
.kb-mine-heading h2 { margin:0; font-size:clamp(1.22rem,3vw,1.65rem); line-height:1.22; }
.kb-mine-context { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; color:var(--kb-muted); font-size:.86rem; overflow-wrap:anywhere; }
.kb-mine-task-status {
  display:inline-flex;
  align-items:center;
  width:max-content;
  gap:6px;
  padding:3px 8px;
  color:#42574c;
  background:#edf1ee;
  border-radius:6px;
  font-weight:650;
}
.kb-mine-task-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.kb-mine-task-status[data-status="in_progress"] { background:#e8f1f9; color:#23567b; }
.kb-mine-task-status[data-status="review"] { background:#fbf1dd; color:#7a4e19; }
.kb-mine-task-status[data-status="done"] { background:#e6f3e8; color:#285b38; }
.kb-mine-close { display:grid; place-items:center; width:44px; min-height:44px; padding:0; font-size:1.5rem; line-height:1; color:var(--kb-muted); }
.kb-mine-tabs {
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  gap:2px 8px;
}
.kb-mine-tabs button {
  min-height:44px;
  padding:6px 5px;
  color:#456252;
  background:transparent;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
}
.kb-mine-tabs button:hover { color:#124e35; background:#f1f6f2; }
.kb-mine-tabs button:is([aria-pressed="true"], [aria-selected="true"]) {
  color:#124e35;
  border-color:#2a7652;
}
.kb-mine-drawer > :is(.kb-section,.kb-mine-overview) {
  padding:20px var(--task-gutter) 24px;
  border:0;
  border-radius:0;
}
.kb-mine-drawer > .kb-section h2 { font-size:1.08rem; }
.kb-mine-drawer > p:empty { position:absolute; inset:auto; margin:0; }
.kb-mine-drawer > p:not(:empty) { margin:12px var(--task-gutter) 0; }
.kb-mine-overview { display:grid; gap:20px; min-width:0; }
.kb-mine-facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 20px;
  margin:0;
}
.kb-mine-facts div { min-width:0; padding:8px 0; border-bottom:1px solid #e5ece5; }
.kb-mine-facts dt { color:var(--kb-muted); font-size:.8rem; }
.kb-mine-facts dd { margin:3px 0 0; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.kb-mine-time-facts { margin:12px var(--task-gutter) 0; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); }
.kb-mine-description { display:grid; gap:8px; overflow-wrap:anywhere; }
.kb-mine-description h3 { font-size:.94rem; }
.kb-mine-task-tags { display:flex; flex-wrap:wrap; gap:6px; }
.kb-mine-task-tags span { padding:3px 8px; background:#edf2ef; color:#3f5a4b; border-radius:6px; font-size:.78rem; }
.kb-mine-actions { display:flex; flex-wrap:wrap; align-items:start; gap:8px; }
.kb-mine-move:empty { display:none; }
.kb-mine-actions > :is(details,.kb-mine-move):is([open],:has(details[open])) { flex-basis:100%; }
.kb-mine-actions details.kb-section { gap:10px; padding:0; border:0; background:transparent; }
.kb-mine-actions details > summary {
  display:flex;
  align-items:center;
  max-width:100%;
  gap:8px;
  min-height:40px;
  padding:6px 10px;
  border:1px solid var(--kb-line);
  border-radius:7px;
  color:var(--kb-blue);
  font-size:.85rem;
}
.kb-mine-actions details > summary::-webkit-details-marker { display:none; }
.kb-mine-actions details > summary::after { content:'›'; transform:rotate(90deg); }
.kb-mine-actions details[open] > summary::after { transform:rotate(-90deg); }
.kb-mine-actions details > summary:hover { background:#eff5f0; }
.kb-mine-edit-trigger { color:var(--kb-blue); font-size:.85rem; }
.kb-mine-actions .kb-mine-archive > summary { color:#9b2016; border-color:transparent; }
.kb-mine-actions details[open] > :not(summary) { margin-top:10px; }
.kb-mine-actions details > button { justify-self:start; }
.kb-mine-drawer .kb-list-empty { padding:14px; background:#f4f7f4; border-radius:8px; font-size:.9rem; }
.kb-mine-comment-list > ul { display:grid; gap:10px; list-style:none; padding:0; }
.kb-mine-comment-list li { display:grid; gap:6px; min-width:0; padding:12px 14px; background:#f4f7f4; border-radius:8px; }
.kb-mine-entry-header { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; overflow-wrap:anywhere; }
.kb-mine-entry-header time { color:var(--kb-muted); font-size:.8rem; font-variant-numeric:tabular-nums; }
.kb-mine-comment-form { grid-template-columns:minmax(0,1fr) auto; margin-top:4px; }
.kb-mine-comment-form > label:has(textarea) { grid-column:1/-1; }
.kb-mine-comment-form textarea { resize:vertical; }
.kb-mine-comment-form > .kb-bar { grid-column:auto; justify-content:end; }
.kb-mine-comment-form:not(:has(select)) > .kb-bar { grid-column:1/-1; }
.kb-mine-check-progress { display:grid; gap:6px; color:var(--kb-muted); font-size:.84rem; }
.kb-mine-check-progress progress { width:100%; height:8px; accent-color:var(--kb-blue); }
.kb-mine-checklist > ul, .kb-mine-subtask-list > ul { display:grid; list-style:none; padding:0; }
.kb-mine-checklist li, .kb-mine-subtask-list li {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  padding:7px 0;
  border-bottom:1px solid #e5ece5;
  overflow-wrap:anywhere;
}
.kb-mine-checklist li > span:last-child { flex:none; color:var(--kb-muted); font-size:.8rem; }
.kb-mine-checklist li > .kb-mine-check-done { color:#236349; }
.kb-mine-check-item { display:flex; align-items:center; width:100%; min-height:40px; gap:10px; cursor:pointer; }
.kb-mine-check-item > input { flex:none; width:19px; min-height:19px; margin:0; }
.kb-mine-check-item > input:checked + span { color:var(--kb-muted); }
.kb-mine-subtasks { display:grid; gap:10px; margin-top:8px; }
.kb-mine-subtasks h3 { font-size:1rem; }
.kb-mine-subtasks details.kb-section { padding:0; border:0; }
.kb-mine-subtasks details > summary { padding:8px 10px; border:1px solid var(--kb-line); border-radius:7px; color:var(--kb-blue); }
.kb-mine-subtasks .kb-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.kb-mine-subtask-list .kb-mine-task-status { flex:none; font-size:.8rem; }
.kb-mine-history > ol { display:grid; list-style:none; margin:0; padding:0; }
.kb-mine-history li { display:grid; gap:6px; padding:12px 0; border-bottom:1px solid #e5ece5; }
.kb-mine-history .kb-mine-entry-author { color:var(--kb-muted); font-size:.84rem; }
.kb-mine-history dl { display:grid; grid-template-columns:minmax(85px,max-content) minmax(0,1fr); gap:5px 12px; margin:0; padding:8px 10px; background:#f4f7f4; border-radius:7px; font-size:.87rem; overflow-wrap:anywhere; }
.kb-mine-history dt { color:var(--kb-muted); }
.kb-mine-history dd { margin:0; }
.kb-mine-drawer .kt-time-controls { display:flex; flex-wrap:wrap; gap:8px 12px; }
.kb-mine-drawer .kt-time-controls > :empty { display:none; }
.kb-mine-drawer .kt-time-controls > :has(details[open]) { flex-basis:100%; }
.kb-mine-drawer .kt-section { border-top:0; padding-top:0; }

.kb-mine-edit-panel {
  min-width:0;
  padding:18px var(--task-gutter) 0;
}
.kb-mine-edit-panel > h3 { margin-bottom:20px; font-size:1.08rem; }
.kb-mine-edit-form {
  grid-template-columns:minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.kb-mine-edit-group {
  min-width:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:12px 16px;
  margin:0;
  padding:12px 0 0;
  border:0;
  border-top:1px solid var(--kb-line);
}
.kb-mine-edit-group legend { padding:0 9px 0 0; color:#314d3f; font-size:.87rem; font-weight:700; }
.kb-mine-edit-group :is(input,textarea,select):not([type="checkbox"]) { width:100%; }
.kb-mine-edit-group textarea { resize:vertical; }
.kb-mine-edit-group label:has(> input[type="checkbox"]) {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  overflow-wrap:anywhere;
}
.kb-mine-edit-group input[type="checkbox"] { flex:0 0 auto; width:18px; min-height:18px; margin:0; }
.kb-mine-watchers summary { width:fit-content; padding-block:9px; cursor:pointer; color:var(--kb-blue); font-size:.9rem; }
.kb-mine-watch-options {
  max-height:200px;
  overflow:auto;
  padding:4px 10px;
  background:#f4f7f4;
  border-radius:8px;
}
.kb-mine-edit-form .kb-checks > button { justify-self:start; }
.kb-mine-edit-footer {
  position:sticky;
  bottom:0;
  z-index:1;
  justify-content:flex-end;
  margin-inline:calc(-1 * var(--task-gutter));
  padding:10px var(--task-gutter);
  background:#fff;
  border-top:1px solid var(--kb-line);
}

@media (max-width:620px) {
  .kb-mine-drawer { --task-top:10px; width:calc(100% - 16px); }
  .kb-mine-card-header { padding-top:14px; gap:8px; }
  .kb-mine-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .kb-mine-tabs button { min-width:0; padding-inline:2px; font-size:.8rem; }
  .kb-mine-facts { column-gap:12px; }
  .kb-mine-overview { gap:14px; }
}
@media (max-width:480px) {
  .kb-mine-edit-group, .kb-mine-subtasks .kb-fields { grid-template-columns:minmax(0,1fr); gap:10px; }
  .kb-mine-edit-form .kb-check-row { grid-template-columns:auto minmax(0,1fr); }
  .kb-mine-edit-form .kb-check-row button { grid-column:2; justify-self:start; }
}

@container my-work (max-width:700px) {
  .kb-my-work .kb-board { grid-template-columns:minmax(0,1fr); }
  .kb-my-work .kb-column:not([data-selected="true"]) { display:none; }
  .kb-mine-status { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:10px; }
  .kb-mine-status button { padding:5px 2px; min-height:44px; font-size:.77rem; }
  .kb-mine-main > label:has(input[type="search"]) { flex-basis:100%; }
  .kb-my-work .kb-task a { min-height:44px; }
}

.kb-project-board, .kb-project-board .kb, .kb-project-drawer, .kb-project-create-drawer {
  --kb-blue:var(--green,#20583f);
  --kb-line:var(--line,#dce5db);
  --kb-muted:var(--muted,#55685e);
  --kb-paper:var(--paper,#fff);
  --kb-surface:#eff3ec;
  color:var(--ink,#192d29);
}
.kb-project-board {
  container:project-kanban / inline-size;
  gap:12px;
}
#shell > main[data-page="board"] > header {
  margin-block:14px 12px;
}
#shell > main[data-page="board"] > header h1 {
  font-size:clamp(1.75rem,2.8vw,2.55rem);
}
.kb-project-head {
  display:grid;
  gap:5px;
  min-width:0;
}
.kb-project-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px 12px;
}
.kb-project-heading > div {
  min-width:0;
}
.kb-project-heading h2 {
  margin:0;
  font-size:clamp(1rem,1.6vw,1.15rem);
  line-height:1.15;
  letter-spacing:-.035em;
  overflow-wrap:anywhere;
}
.kb-project-heading p {
  margin:4px 0 0;
  color:var(--kb-muted);
  overflow-wrap:anywhere;
}
.kb-project-board .kb-project-overview {
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
}
.kb-project-overview > div {
  display:grid;
  gap:8px;
}
.kb-project-board .kb-project-overview > summary,
.kb-project-board .kb:has(> .kb-project-tools) > details > summary {
  min-height:36px;
  margin:0;
  padding:7px 4px;
  color:var(--kb-blue);
  font-size:.87rem;
}
.kb-project-board .kb:has(> .kb-project-tools) {
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:4px 10px;
}
.kb-project-board .kb:has(> .kb-project-tools) > details {
  grid-area:2 / 1;
  padding:0;
  border:0;
  background:transparent;
}
.kb-project-board .kb:has(> .kb-project-tools) > details[open] {
  grid-column:1 / -1;
  grid-row:3;
}
.kb-project-overview .kb-kpis {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,138px),1fr));
  background:var(--kb-paper);
  padding:8px 9px;
  border:1px solid var(--kb-line);
  border-radius:9px;
}
.kb-project-overview .kb-kpis div {
  padding:2px 9px;
  border:0;
  font-size:.86rem;
}
.kb-project-overview .kb-kpis dd {
  margin-top:2px;
}
.kb-project-tools {
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 8px;
  min-width:0;
  padding-block:8px;
  border-block:1px solid var(--kb-line);
}
.kb-project-tools > label:has(input[type="search"]) {
  flex:1 1 205px;
  max-width:355px;
}
.kb-project-tools input[type="search"] {
  width:100%;
  min-width:0;
}
.kb-project-filter {
  min-width:0;
}
.kb-project-filter[open] {
  flex-basis:100%;
}
.kb-project-filter > summary {
  display:flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  min-height:40px;
  padding:6px 11px;
  border:1px solid var(--kb-line);
  border-radius:8px;
  background:var(--kb-paper);
  color:var(--kb-blue);
  font-size:.88rem;
  font-weight:650;
  cursor:pointer;
}
.kb-project-filter > summary::-webkit-details-marker {
  display:none;
}
.kb-project-filter > summary::after {
  content:'›';
  transform:rotate(90deg);
}
.kb-project-filter[open] > summary::after {
  transform:rotate(-90deg);
}
.kb-project-filter-fields {
  padding:10px;
  margin-top:8px;
  background:var(--kb-paper);
  border:1px solid var(--kb-line);
  border-radius:9px;
}
.kb-project-view {
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  padding:3px;
  background:#e8eee6;
  border-radius:8px;
}
.kb-project-view button {
  min-height:34px;
  border:1px solid transparent;
  border-radius:6px;
  padding:4px 9px;
  background:transparent;
  color:var(--kb-muted);
  font-size:.87rem;
}
.kb-project-view button[aria-pressed="true"] {
  background:var(--kb-paper);
  border-color:var(--kb-line);
  color:var(--kb-blue);
  font-weight:650;
}
.kb-project-results {
  grid-area:2 / 2;
  margin:0 0 0 auto;
  color:var(--kb-muted);
  font-size:.86rem;
}
.kb-project-board .kb-board {
  align-items:stretch;
  grid-auto-columns:minmax(187px,1fr);
  gap:10px;
  padding:2px 2px 8px;
  scrollbar-width:thin;
  scrollbar-color:#b9cabc transparent;
  scroll-padding-inline:2px;
}
.kb-project-board .kb-column {
  --kb-lane-bg:#eff3ed;
  --kb-lane-head:#e8eee6;
  --kb-lane-ink:#344f3f;
  --kb-lane-dot:#687d6f;
  align-content:start;
  min-height:clamp(232px,45vh,393px);
  padding:0 8px 9px;
  gap:8px;
  border:1px solid var(--kb-line);
  border-radius:12px;
  background:var(--kb-lane-bg);
}
.kb-project-board .kb-column[data-column-status="in_progress"] {
  --kb-lane-bg:#edf3eb;
  --kb-lane-head:#e3eee2;
  --kb-lane-ink:#255840;
  --kb-lane-dot:#477b5d;
}
.kb-project-board .kb-column[data-column-status="review"] {
  --kb-lane-bg:#f4f2e9;
  --kb-lane-head:#f3ebd8;
  --kb-lane-ink:#754a20;
  --kb-lane-dot:#986732;
}
.kb-project-board .kb-column[data-column-status="done"] {
  --kb-lane-bg:#eef3f2;
  --kb-lane-head:#e2edee;
  --kb-lane-ink:#305a62;
  --kb-lane-dot:#4d7680;
}
.kb-project-board .kb-column-head {
  min-height:44px;
  justify-content:flex-start;
  gap:4px 6px;
  padding:6px 8px;
  margin-inline:-8px;
  border-radius:11px 11px 0 0;
  border-bottom:1px solid var(--kb-line);
  background:var(--kb-lane-head);
  color:var(--kb-lane-ink);
}
.kb-project-board .kb-column-head h3 {
  display:flex;
  align-items:center;
  flex:1 1 60px;
  min-width:0;
  gap:7px;
  margin:0;
  font-size:.94rem;
  line-height:1.2;
}
.kb-project-board .kb-column-head h3::before {
  content:"";
  width:7px;
  height:7px;
  flex:none;
  border-radius:50%;
  background:var(--kb-column-color,var(--kb-lane-dot));
}
.kb-project-board .kb-column-head small {
  padding:2px 5px;
  border-radius:5px;
  background:#ffffffb5;
  font-size:.75rem;
  font-variant-numeric:tabular-nums;
}
.kb-project-board .kb-column-head small.kb-wip {
  background:#fae5bf;
  color:#783e13;
}
.kb-project-board .kb-project-add {
  display:grid;
  place-items:center;
  padding:2px;
  width:36px;
  height:36px;
  min-height:36px;
  background:transparent;
  border-color:transparent;
  color:var(--kb-lane-ink);
  font-size:1.13rem;
}
.kb-project-board .kb-project-add:hover {
  background:#ffffffa0;
}
.kb-project-board .kb-column > .kb-muted {
  padding:10px 4px;
  text-align:center;
  font-size:.85rem;
}
.kb-project-board .kb-project-card {
  gap:5px;
  padding:10px 9px;
  background:var(--kb-paper);
  border-color:#d9e4d8;
  box-shadow:0 1px 3px #223f3010;
}
.kb-project-board .kb-project-card:is(:hover,:focus-within) {
  border-color:#a4bcaa;
}
.kb-project-board .kb-project-card-top,
.kb-project-board .kb-project-card-footer {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:4px 7px;
  font-variant-numeric:tabular-nums;
}
.kb-project-board .kb-project-card :is(.kb-project-card-meta,.kb-project-card-top,.kb-project-card-footer,p) {
  margin:0;
  font-size:.79rem;
  line-height:1.35;
}
.kb-project-board .kb-project-card-link {
  color:var(--ink,#192d29);
  font-size:.94rem;
  font-weight:690;
  line-height:1.3;
  text-decoration:none;
}
.kb-project-board .kb-project-card-link:hover {
  text-decoration:underline;
  text-underline-offset:3px;
}
.kb-project-board .kb-project-card-footer {
  padding-top:7px;
  margin-top:3px;
  border-top:1px solid #edf1eb;
}
.kb-project-card .kb-avatar {
  flex:none;
  margin:0;
  background:#e5efdf;
  color:#31543b;
  font-size:.73rem;
}
.kb-project-card .kb-late {
  color:#962f2a;
  font-weight:650;
}
.kb-project-board .kb-project-card > details[data-move-task] {
  padding:0;
  border:0;
  border-top:1px solid #edf1eb;
  border-radius:0;
  background:transparent;
}
.kb-project-board .kb-project-card > details[data-move-task] > summary {
  min-height:32px;
  padding:5px 2px;
  color:var(--kb-blue);
  font-size:.84rem;
}
.kb-project-board .kb-project-card progress {
  height:4px;
  border:0;
  border-radius:4px;
  background:#e4ebe2;
}
.kb-project-board .kb-project-card progress::-webkit-progress-bar {
  border-radius:4px;
  background:#e4ebe2;
}
.kb-project-board .kb-project-card progress::-webkit-progress-value {
  border-radius:4px;
  background:var(--kb-blue);
}
.kb-project-board .kb-project-card progress.kb-late::-webkit-progress-value {
  background:#962f2a;
}
.kb-project-board .kb-project-card progress::-moz-progress-bar {
  border-radius:4px;
  background:var(--kb-blue);
}
.kb-project-board .kb-project-card progress.kb-late::-moz-progress-bar {
  background:#962f2a;
}
.kb-project-jumps {
  display:none;
}
.kb-project-board .kb-live:not(:empty), .kb-project-drawer .kb-live:not(:empty) {
  color:var(--kb-blue);
  background:#e5efe3;
}
.kb-project-board .kb-live.kb-error:not(:empty), .kb-project-drawer .kb-live.kb-error:not(:empty) {
  color:#922c21;
  background:#fae8e2;
}
.kb-project-drawer.kb-mine-drawer, .kb-project-create-drawer {
  --task-gutter:clamp(12px,3.4vw,23px);
  position:fixed;
  inset:0 0 0 auto;
  width:min(100%,590px);
  max-width:100%;
  height:100dvh;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  border-inline-start:1px solid var(--kb-line);
  border-radius:0;
  background:var(--kb-paper);
  color-scheme:only light;
  overscroll-behavior:contain;
  overflow:auto;
}
.kb-project-drawer[open], .kb-project-create-drawer[open] {
  display:flex;
  flex-direction:column;
  gap:0;
}
.kb-project-drawer > *, .kb-project-create-drawer > * {
  flex:none;
  min-width:0;
}
.kb-project-drawer::backdrop, .kb-project-create-drawer::backdrop {
  background:#20382e58;
}
.kb-project-drawer .kb-mine-card-header,
.kb-project-create-drawer .kb-mine-card-header {
  padding:14px var(--task-gutter) 0;
  background:var(--kb-paper);
}
.kb-project-create-drawer .kb-mine-card-header {
  padding-bottom:12px;
}
.kb-project-drawer .kb-mine-heading h2,
.kb-project-create-drawer .kb-mine-heading h2 {
  font-size:clamp(1.25rem,3.5vw,1.75rem);
  letter-spacing:-.02em;
}
.kb-project-drawer .kb-mine-tabs {
  gap:1px 6px;
  padding-top:4px;
}
.kb-project-drawer .kb-mine-tabs button {
  padding-inline:3px;
  font-size:.86rem;
}
.kb-project-drawer .kb-mine-overview {
  gap:16px;
}
.kb-project-drawer .kb-mine-facts {
  padding:6px 11px;
  background:#eff3eb;
  border-radius:9px;
}
.kb-project-drawer .kb-mine-facts div {
  padding-block:6px;
  border:0;
}
.kb-project-drawer .kb-project-drawer-actions {
  position:sticky;
  bottom:0;
  z-index:1;
  align-content:start;
  margin-top:auto;
  max-height:48dvh;
  overflow:auto;
  border-top:1px solid var(--kb-line);
  padding:11px var(--task-gutter) calc(11px + env(safe-area-inset-bottom,0px));
  background:#f4f7f1;
}
.kb-project-drawer-actions .kb-fields,
.kb-project-create-drawer .kb-fields {
  min-width:0;
}
.kb-project-create-drawer > form {
  margin:0;
  padding:16px var(--task-gutter);
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}
.kb-project-create-drawer > form > label:has([name="name"],select[multiple]) {
  grid-column:1 / -1;
}
.kb-project-create-drawer > form :is(input:not([type="checkbox"]),select,textarea) {
  min-width:0;
  width:100%;
}
.kb-project-create-drawer > .kb-live {
  margin:8px var(--task-gutter) 0;
}
.kb-project-create-drawer > .kb-live:empty {
  display:none;
}
.kb-project-drawer > [role="tabpanel"] {
  min-width:0;
}
@container project-kanban (max-width:830px) {
  .kb-project-jumps {
    display:flex;
    gap:5px;
    min-width:0;
    max-width:100%;
    overflow:auto;
    padding:3px 3px 7px;
    scrollbar-width:thin;
  }
  .kb-project-jumps :is(button,a) {
    min-height:36px;
    flex:none;
    padding:4px 8px;
    font-size:.84rem;
    white-space:nowrap;
  }
}
@container project-kanban (max-width:550px) {
  .kb-project-board .kb-board {
    grid-auto-columns:minmax(min(226px,100%),82%);
    scroll-snap-type:x proximity;
  }
  .kb-project-board .kb-column {
    scroll-snap-align:start;
    min-height:280px;
  }
  .kb-project-board .kb-project-add {
    height:44px;
    min-height:44px;
    width:44px;
  }
  .kb-project-board .kb-project-card > details[data-move-task] > summary {
    min-height:44px;
    padding-block:10px;
  }
  .kb-project-tools > label:has(input[type="search"]) {
    flex-basis:100%;
    max-width:none;
  }
}
@media (max-width:420px) {
  .kb-project-drawer .kb-mine-tabs button {
    padding-inline:1px;
    font-size:.78rem;
    white-space:nowrap;
  }
  .kb-project-create-drawer > form {
    grid-template-columns:minmax(0,1fr);
  }
}
