/* Two lists share the tray at wide widths and read top to bottom on the phone. */
.rv-team,.tm-dlg {--tm-red:#FF9C90;}
:root[data-theme=light] :is(.rv-team,.tm-dlg) {--tm-red:#C2362C;}

.rv-team .rv-g-fig {font-size:var(--t-figure);font-weight:var(--w-strong);}
.rv-team .rv-g-tools {margin:-5px 0;}
.rv-team .rv-g-verb,.tm-dlg .rv-g-verb {font-size:var(--t-meta);font-weight:var(--w-mid);}
.tm-body {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:20px;align-items:start;}
.tm-body:has(> :only-child) {grid-template-columns:minmax(0,1fr);}
.tm-body > section {min-width:0;}
.tm-body h3 {
  margin:0 0 8px;
  color:var(--ink);
  font:var(--w-strong) var(--t-section)/24px var(--display);
  letter-spacing:0;
}
.tm-rows,.tm-lines {
  list-style:none;
  margin:0;
  padding:0;
  border-block:1px solid var(--line);
}
.tm-rows > li,.tm-lines > li {position:relative;}
.tm-rows > li:not([hidden]) ~ li:not([hidden]),
.tm-lines > li:not([hidden]) ~ li:not([hidden]) {border-top:1px solid var(--line);}
.tm-worker,.tm-tool {
  display:grid;
  align-items:center;
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  padding:6px 0;
  gap:12px;
  border:0;
  background:none;
  color:var(--ink);
  font:var(--w-row) var(--t-row)/18px var(--body);
  text-decoration:none;
  text-align:left;
}
.tm-worker {
  min-height:50px;
  grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr) 44px;
  column-gap:8px;
}
.tm-tool {grid-template-columns:minmax(0, 1fr) auto;padding-block:4px;}
.tm-tool:has(.tm-count) {grid-template-columns:minmax(0, 1fr) fit-content(42%) auto;}
.tm-person,.tm-current {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  overflow-wrap:anywhere;
}
.tm-name {font-weight:var(--w-mid);}
.tm-description,.tm-count,.tm-current {font-size:var(--t-meta);line-height:16px;color:var(--muted);}
.tm-count {text-align:right;overflow-wrap:anywhere;}
.tm-count.is-needed {color:var(--accent);}
.tm-action {min-width:16px;justify-self:end;color:var(--muted);}
.tm-worker .rv-chev,.tm-tool .rv-chev {display:block;width:16px;height:16px;color:var(--muted);}
.tm-tool .rv-chev {grid-area:auto;grid-column:-2;grid-row:1;justify-self:end;}
.tm-worker:hover .tm-name,.tm-tool:hover .tm-name {text-decoration:underline;text-underline-offset:3px;}
.tm-worker:focus-visible,.tm-tool:focus-visible {position:relative;z-index:1;outline-offset:-2px;}
.tm-w.is-red::before {
  content:"";
  position:absolute;
  inset:8px auto 8px -8px;
  width:2px;
  border-radius:2px;
  background:var(--tm-red);
}
.tm-why,.tm-w.is-red .tm-action {color:var(--tm-red);}
.tm-w.is-red .tm-action {font-size:var(--t-meta);font-weight:var(--w-mid);}
.tm-dot {flex:none;width:8px;height:8px;border-radius:50%;background:var(--tm-red);}
.tm-body .rv-pager {margin:0;justify-content:flex-end;font-size:var(--t-meta);color:var(--muted);}
.tm-body .rv-pager button {
  min-width:44px;
  padding:0 8px;
  border:0;
  background:none;
  color:var(--ink);
  font-size:var(--t-meta);
}
.tm-body .rv-pager button:enabled:hover {text-decoration:underline;text-underline-offset:3px;}

/* THE DIALOGS */
.tm-dlg .rv-dialog-body {display:flex;flex-direction:column;gap:16px;}
.tm-read {display:flex;flex-direction:column;gap:8px;color:var(--ink);}
.tm-read p {margin:0;text-wrap:pretty;}
.tm-read .tm-lead {font:var(--w-mid) var(--t-head)/24px var(--display);letter-spacing:-.01em;}
.tm-days {display:flex;flex-direction:column;gap:24px;}
.tm-day {display:flex;flex-direction:column;gap:8px;}
.tm-day + .tm-day {padding-top:20px;border-top:1px solid var(--line);}
.tm-day h3,.tm-work h3 {margin:0;font:var(--w-strong) var(--t-section)/24px var(--display);letter-spacing:0;color:var(--ink);}
.tm-destination {
  align-self:flex-start;
  display:inline-flex;
  min-height:44px;
  align-items:center;
  color:var(--accent);
  text-underline-offset:3px;
  font-size:var(--t-meta);
}
.tm-job {margin:0;color:var(--muted);text-wrap:pretty;}
.tm-flag {display:flex;align-items:center;gap:8px;margin:0;color:var(--tm-red);font-weight:var(--w-mid);}
.tm-flag.is-unread {color:var(--muted);}
.tm-worker-dlg .card {border-top:1px solid var(--line);}
.tm-worker-dlg .card .f:last-child {border-bottom:0;}
.tm-work {display:flex;flex-direction:column;gap:4px;}
.tm-work ul {list-style:none;margin:0;padding:0;}
.tm-work li + li .rv-row {border-top:1px solid var(--line);}
.tm-work li:first-child .rv-row {border-top:0;}
.tm-work .rv-row {grid-template-columns:minmax(0,1fr) auto 16px;}
.tm-work span.rv-row {grid-template-columns:minmax(0,1fr) auto 16px;}
.tm-work .rv-rm {white-space:nowrap;font-size:var(--t-meta);}
.tm-work a.rv-row:hover .rv-n {text-decoration:underline;text-underline-offset:3px;}
.tm-status {margin:0;color:var(--muted);}
.tm-status:empty {display:none;}
.tm-work [data-older] {align-self:flex-start;margin-top:4px;}

@container glance (max-width:649px) {
  .tm-body {grid-template-columns:minmax(0,1fr);}
  .tm-worker {
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"person action" "current action";
    gap:3px 12px;
  }
  .tm-person {grid-area:person;}
  .tm-current {grid-area:current;}
  .tm-current:empty {display:none;}
  .tm-action {grid-area:action;}
  .tm-tool,.tm-tool:has(.tm-count) {
    grid-template-columns:68px minmax(0,1fr) fit-content(35%) 16px;
    column-gap:8px;
  }
  .tm-tool .tm-person {display:contents;}
}
@media (max-width:719px) {
  .tm-worker-dlg .card .f {flex-direction:column;gap:2px;}
  .tm-worker-dlg .card .f .v {flex:none;text-align:left;}
}
