/* Tables people arrange themselves: widths, wrapping, row heights, and the Columns panel. See src/lib/tables.js. */
.tb{--cy:7px}.tb.d-compact{--cy:3px}.tb.d-roomy{--cy:13px}
.tb th{position:relative;vertical-align:middle}.tb .al-l,.dp .tb .al-l{text-align:left!important}.tb .al-c,.dp .tb .al-c{text-align:center!important}.tb .al-r,.dp .tb .al-r{text-align:right!important}
@media (min-width:701px){
  .tb td,.dp.core-host .tb.dp-tbl td{padding-top:var(--cy);padding-bottom:var(--cy);white-space:normal;overflow-wrap:break-word;height:auto;max-width:none;overflow:visible}
  .tb th{white-space:normal;overflow-wrap:normal;word-break:normal}
  .tb:not(.tb-w) .t-text{min-width:9em}.tb:not(.tb-w) .t-text.t-short{min-width:0}.tb:not(.tb-w) td.co{min-width:8em}
  .tb td.t-num,.tb td.t-date,.tb td.t-short,.dp.core-host .tb.dp-tbl :is(td.t-num,td.t-date,td.t-short),.tb .btn,.tb .chip{white-space:nowrap}
  .tb td.t-num small{white-space:normal}
  .tb td.t-act{white-space:nowrap}.tb td.t-act .actions{flex-wrap:nowrap}.tb td.t-act form{display:inline-block}
  .tb td.wr-1,.dp.core-host .tb.dp-tbl td.wr-1{white-space:normal}.tb td.wr-0,.dp.core-host .tb.dp-tbl td.wr-0{white-space:nowrap}
  .tb td .nowrap{white-space:nowrap}.tb td.wr-1 .nowrap{white-space:normal}
  /* Widths somebody set: exactly those, and the panel scrolls when they need more room than it has. */
  .tb.tb-w{table-layout:fixed;min-width:0;max-width:none}.tb.tb-w td,.dp.core-host .tb.tb-w td{overflow-wrap:break-word;white-space:normal}.tb.tb-w .chip{white-space:normal}.tb.tb-w td.wr-0,.dp.core-host .tb.tb-w td.wr-0{white-space:nowrap;overflow:hidden}.tb.tb-w td.t-act,.dp.core-host .tb.tb-w td.t-act{white-space:normal;overflow:visible}
  .tblbox,.dp.core-host .dp-tw{overflow-x:auto}
  /* The first column stays in view. */
  :is(.tblbox,.dp-tw) .tb :is(th,td):first-child{position:sticky;left:0;z-index:2}:is(.tblbox,.dp-tw) .tb td:first-child{background:var(--surface)}:is(.tblbox,.dp-tw) .tb th:first-child{z-index:3}
  .tbl.tb tbody tr:hover td:first-child,.tbl.tb tfoot td:first-child,.tbl.tb tr.sum td:first-child{background:var(--sunk)}
  .tb-moved .tb :is(th,td):first-child{box-shadow:1px 0 0 var(--line-2),8px 0 12px -8px rgba(0,0,0,.28)}
}
.tb-grip{position:absolute;top:0;right:-5px;width:10px;height:100%;cursor:col-resize;z-index:4;touch-action:none;border:0;background:none;padding:0}.tb th:last-child .tb-grip{right:0;width:7px}.tb-grip:hover::after,.tb-grip:focus-visible::after{content:'';position:absolute;top:2px;bottom:2px;left:4px;width:2px;background:var(--link);border-radius:2px}.tb th:last-child .tb-grip::after{left:5px}
.tb-line{position:fixed;z-index:60;background:var(--link);pointer-events:none}.tb-line.v{width:2px}.tb-line.h{height:2px}
body.tb-col,body.tb-col *{cursor:col-resize!important;user-select:none!important}body.tb-row,body.tb-row *{cursor:row-resize!important;user-select:none!important}.tb tbody tr.tb-edge,.tb tbody tr.tb-edge *{cursor:row-resize!important}
.tb-set{display:inline-grid;place-items:center;width:24px;height:22px;margin:-4px -6px -4px 6px;padding:0;border:1px solid transparent;border-radius:4px;background:none;color:var(--muted);cursor:pointer;vertical-align:middle}.tb-set:hover,.tb-set:focus-visible{color:var(--ink);border-color:var(--line-2);background:var(--surface)}
.tb-sheet{position:fixed;inset:0 0 0 auto;margin:0;width:min(420px,100vw);max-width:none;height:100dvh;max-height:none;border:0;border-left:1px solid var(--line-2);padding:0;background:var(--surface);color:var(--ink);box-shadow:-12px 0 40px rgba(0,0,0,.22)}.tb-sheet::backdrop{background:rgba(20,24,32,.32)}
.tb-sheet form{display:flex;flex-direction:column;height:100%}.tb-sheet header{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 12px 16px;border-bottom:1px solid var(--line)}.tb-sheet h2{font-size:16px;font-weight:600;margin:0}.tb-x{width:36px;height:36px;border:0;background:none;color:var(--muted);font-size:22px;line-height:1;cursor:pointer;border-radius:4px}
.tb-sheet .tb-b{flex:1;overflow:auto;padding:12px 16px;overscroll-behavior:contain}.tb-sheet footer{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--line)}.tb-sheet footer .btn:first-child{margin-right:auto}
.tb-top{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.tb-top label,.tb-f label{display:grid;gap:4px;font-size:12.5px;font-weight:500;color:var(--ink-2)}.tb-sheet select,.tb-sheet input[type=number]{width:100%;min-height:34px;padding:4px 8px;border:1px solid var(--line-2);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;font-size:13.5px}
.tb-list{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:4px}.tb-list>li{border-top:1px solid var(--line);background:var(--surface)}.tb-list>li:first-child{border-top:0}.tb-list>li.over{box-shadow:inset 0 2px 0 var(--link)}.tb-list>li.drag{opacity:.45}
.tb-r{display:flex;align-items:center;gap:4px;min-height:38px;padding:0 4px 0 0}.tb-h{cursor:grab;color:var(--muted);padding:8px 6px 8px 10px;line-height:1}.tb-r label{flex:1;display:flex;align-items:center;gap:8px;min-height:36px;font-size:14px;cursor:pointer}.tb-r input[type=checkbox]{width:16px;height:16px;accent-color:var(--ink)}.tb-r button{width:30px;height:30px;border:0;border-radius:4px;background:none;color:var(--ink-2);cursor:pointer;font-size:14px;line-height:1}.tb-r button:hover{background:var(--sunk)}.tb-r button[aria-expanded=true]{background:var(--sunk);color:var(--ink)}.tb-r button:disabled{opacity:.3;cursor:default}
.tb-f{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;padding:4px 12px 14px 34px}
@media (max-width:700px){.tb-grip,.tb-set{display:none}.tb-sheet select,.tb-sheet input[type=number]{min-height:44px;font-size:16px}.tb-r{min-height:48px}.tb-r button{width:40px;height:44px}.tb-wide{display:none!important}.tb td.al-l,.tb td.al-c,.tb td.al-r{text-align:right!important}}
@media print{.tb-set,.tb-grip,.tb-open{display:none}}
@media (min-width:701px){.tb th,.tb th.n,.dp.core-host .tb.dp-tbl th{white-space:normal}.tb:not(.tb-w) :is(th,td).t-long,.dp.core-host .tb:not(.tb-w) :is(th,td).t-long{min-width:17em}.board .tb:not(.tb-w) :is(th,td).t-long{min-width:11em}.board .tb:not(.tb-w) .t-text{min-width:7em}.board .tb .chip{white-space:normal}.dp.core-host .tb .p10a-vl-by{white-space:normal}.tb th .sortable{display:inline}}
.tb tr.grp td{background:var(--sunk)!important;font-weight:600;white-space:normal}.tb tr.grp td:first-child a{color:var(--ink);font-weight:600}.tb tr.grp td:first-child a::before{content:'▸';display:inline-block;width:1.2em;color:var(--muted)}.tb tr.grp.open td:first-child a::before{content:'▾'}.tb tr.grp .sub{font-weight:400}.tb tr.grp td:empty::before{content:none!important}
.tb tr.part td:first-child{padding-left:30px}.tb-acts{display:flex;gap:8px;align-self:end}
.tb tr.grp td:first-child a{white-space:normal}
@media (min-width:701px){.dp.core-host .tb :is(.au-diff,.au-who,.au-dev){white-space:normal;height:auto;min-height:28px}}
.dp.core-host .dp-tbl tr>td.au-when:first-child{padding-left:44px!important}
@media (min-width:701px){.dp.core-host .tb.au-tbl td:not(.au-when) *{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;max-width:none !important}}
/* Narrower than the panel: the heading and the lines between rows still run to its edge. */
@media (min-width:701px){.tb-w tr::after{content:'';display:table-cell;border-bottom:1px solid var(--line);background:var(--surface)}.tb-w thead tr::after{background:var(--sunk);border-top:1px solid var(--line);border-bottom-color:var(--line-2)}.tblbox:first-child .tb-w thead tr::after{border-top:0}.tb-w :is(tfoot tr,tr.grp,tr.sum)::after{background:var(--sunk)}.tbl.tb-w tbody tr:hover::after{background:var(--sunk)}}
/* A row's buttons stay in view on the right, however wide the columns are. */
@media (min-width:701px){:is(.tblbox,.dp-tw) .tb :is(th,td).t-act:last-child{position:sticky;right:0;z-index:2;box-shadow:-1px 0 0 var(--line)}:is(.tblbox,.dp-tw) .tb td.t-act:last-child{background:var(--surface)}:is(.tblbox,.dp-tw) .tb th.t-act:last-child{z-index:3;background:var(--sunk)}.tbl.tb tbody tr:hover td.t-act:last-child{background:var(--sunk)}:is(.tblbox,.dp-tw) .tb.tb-w :is(th,td).t-act:last-child{box-shadow:-1px 0 0 var(--line-2),-10px 0 14px -6px rgba(0,0,0,.45)}}
