Open demo

CSS code

HTML
<div><span class="lbl">Priority, due date and overdue</span>
<section class="dd" aria-labelledby="cat-title">
  <div class="dd-head"><h2 id="cat-title">Spring catalogue</h2><p>Thursday 11 June · <strong>2 overdue</strong></p></div>
  <ul>
    <li class="dd-row is-overdue"><input class="dd-box" type="checkbox" id="cat-1"><div class="dd-body"><label class="dd-title" for="cat-1">Approve the cover photography</label><div class="dd-meta"><span class="dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-09">Tue 9 Jun</time></span></div></div></li>
    <li class="dd-row is-overdue"><input class="dd-box" type="checkbox" id="cat-2"><div class="dd-body"><label class="dd-title" for="cat-2">Send the price list to the printer</label><div class="dd-meta"><span class="dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-10">Wed 10 Jun</time></span></div></div></li>
    <li class="dd-row is-today"><input class="dd-box" type="checkbox" id="cat-3"><div class="dd-body"><label class="dd-title" for="cat-3">Proofread pages 12 to 24</label><div class="dd-meta"><span class="dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg><span class="sr-only">Due </span><time datetime="2026-06-11">Today</time></span></div></div></li>
    <li class="dd-row"><input class="dd-box" type="checkbox" id="cat-4"><div class="dd-body"><label class="dd-title" for="cat-4">Write captions for the linen range</label><div class="dd-meta"><span class="dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-12">Fri 12 Jun</time></span></div></div></li>
    <li class="dd-row"><input class="dd-box" type="checkbox" id="cat-5" checked><div class="dd-body"><label class="dd-title" for="cat-5">Order 500 sample envelopes</label><div class="dd-meta"><span class="dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-15">Mon 15 Jun</time></span></div></div></li>
    <li class="dd-row"><input class="dd-box" type="checkbox" id="cat-6"><div class="dd-body"><label class="dd-title" for="cat-6">Brief the courier about the launch drop</label><div class="dd-meta"><span class="dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-18">Thu 18 Jun</time></span></div></div></li>
  </ul>
</section></div>

<div><span class="lbl">Grouped by when it is due</span>
<section class="dd" aria-labelledby="wk-title">
  <div class="dd-head"><h2 id="wk-title">My week</h2><p>7 tasks · <strong>2 overdue</strong></p></div>
  <section class="dd-group g-overdue" aria-labelledby="wk-overdue">
    <h3 id="wk-overdue"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg>Overdue<span class="dd-n">2<span class="sr-only"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-overdue-1"><label class="dd-title" for="wk-overdue-1">Invoice Halden & Co for May<time class="dd-when" datetime="2026-06-08">Was due Mon 8 Jun</time></label><span class="dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span></li>
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-overdue-2"><label class="dd-title" for="wk-overdue-2">Reply to the venue about catering<time class="dd-when" datetime="2026-06-09">Was due Tue 9 Jun</time></label><span class="dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
    </ul>
  </section>
  <section class="dd-group g-today" aria-labelledby="wk-today">
    <h3 id="wk-today"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg>Today, Thursday 11 June<span class="dd-n">3<span class="sr-only"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-today-1"><label class="dd-title" for="wk-today-1">Call the accountant<time class="dd-when" datetime="2026-06-11T10:30">10:30</time></label><span class="dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-today-2"><label class="dd-title" for="wk-today-2">Send logo drafts to Marta<time class="dd-when" datetime="2026-06-11T15:00">15:00</time></label><span class="dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span></li>
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-today-3" checked><label class="dd-title" for="wk-today-3">Renew the domain name<time class="dd-when" datetime="2026-06-11">Any time</time></label><span class="dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span></li>
    </ul>
  </section>
  <section class="dd-group g-later" aria-labelledby="wk-later">
    <h3 id="wk-later"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg>Later this week<span class="dd-n">2<span class="sr-only"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-later-1"><label class="dd-title" for="wk-later-1">Upload the portfolio case study<time class="dd-when" datetime="2026-06-12">Friday</time></label><span class="dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
      <li class="dd-row2"><input class="dd-box" type="checkbox" id="wk-later-2"><label class="dd-title" for="wk-later-2">Back up the photo archive<time class="dd-when" datetime="2026-06-13">Saturday</time></label><span class="dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span></li>
    </ul>
  </section>
</section></div>
CSS
/* Due-date task lists: a real checkbox per task, priority written as text (High, Medium, Low) with a bar icon,
   due dates in <time>, and an overdue state that says "Overdue" in words as well as turning red. No JavaScript. */
.dd{--dd-ink:#0f1b2d;--dd-muted:#4a5872;--dd-line:#e0e6f0;--dd-box:#7586a3;--dd-accent:#1d4ed8;--dd-red:#b91c1c;--dd-red-bg:#fef2f2;
  --dd-high:#991b1b;--dd-high-bg:#fee2e2;--dd-med:#92400e;--dd-med-bg:#fef3c7;--dd-low:#334155;--dd-low-bg:#e8edf4;
  background:#fff;color:var(--dd-ink);border:1px solid var(--dd-line);border-radius:18px;padding:24px 26px;box-shadow:0 18px 40px -28px rgba(15,27,45,.4)}
.dd :where(h2,h3,p,ul){margin:0;padding:0}
.dd ul{list-style:none}
.dd-head{display:flex;align-items:baseline;justify-content:space-between;gap:4px 16px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--dd-line)}
.dd-head h2{font-size:1.2rem;font-weight:800;letter-spacing:-.015em}
.dd-head p{font-size:.86rem;color:var(--dd-muted)}
.dd-head strong{color:var(--dd-red)}
.dd-box{appearance:none;flex:none;width:20px;height:20px;margin:2px 0 0;border:2px solid var(--dd-box);border-radius:6px;background:#fff center/13px no-repeat;cursor:pointer;
  transition:background-color .15s,border-color .15s}
.dd-box:checked{background-color:var(--dd-accent);border-color:var(--dd-accent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E")}
.dd-box:focus-visible{outline:3px solid var(--dd-accent);outline-offset:2px}
.dd-row{display:flex;align-items:flex-start;gap:14px;padding:14px 12px 14px 14px;margin:0 -12px 0 -14px;border-bottom:1px solid var(--dd-line);border-left:3px solid transparent}
.dd-row:last-child{border-bottom:0}
.dd-row.is-overdue{border-left-color:var(--dd-red);background:linear-gradient(90deg,var(--dd-red-bg),#fff 70%)}
.dd-body{min-width:0;flex:1}
.dd-title{display:block;font-size:1rem;font-weight:600;line-height:1.4;cursor:pointer;transition:color .15s}
.dd-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:7px}
.dd-prio{display:inline-flex;align-items:center;gap:5px;padding:3px 9px 3px 7px;border-radius:999px;font-size:.76rem;font-weight:700;line-height:1.3;white-space:nowrap}
.p-high{background:var(--dd-high-bg);color:var(--dd-high)}
.p-medium{background:var(--dd-med-bg);color:var(--dd-med)}
.p-low{background:var(--dd-low-bg);color:var(--dd-low)}
.dd-due{display:inline-flex;align-items:center;gap:5px;font-size:.8rem;font-weight:600;line-height:1.3;color:var(--dd-muted);white-space:nowrap}
.is-overdue .dd-due{color:var(--dd-red);font-weight:700}
.is-today .dd-due{color:var(--dd-accent)}
.dd-box:checked~.dd-body .dd-title{color:var(--dd-muted);text-decoration:line-through}
.dd-box:checked~.dd-body .dd-due{color:var(--dd-muted);font-weight:600}
/* grouped by when */
.dd-group{margin-top:20px}
.dd-group:first-of-type{margin-top:16px}
.dd-group h3{display:flex;align-items:center;gap:7px;font-size:.78rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--dd-muted);padding-bottom:6px}
.g-overdue h3{color:var(--dd-red)}
.g-today h3{color:var(--dd-accent)}
.dd-n{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--dd-low-bg);color:var(--dd-low);font-size:.72rem;letter-spacing:0}
.g-overdue .dd-n{background:var(--dd-red-bg);color:var(--dd-red)}
.dd-list2{border:1px solid var(--dd-line);border-radius:12px;overflow:hidden}
.g-overdue .dd-list2{border-color:#f3b4b4}
.dd-row2{display:flex;align-items:flex-start;gap:12px;padding:11px 14px}
.dd-row2+.dd-row2{border-top:1px solid var(--dd-line)}
.dd-row2 .dd-title{flex:1;min-width:0;font-weight:500}
.dd-when{display:block;margin-top:2px;font-size:.8rem;font-weight:600;color:var(--dd-muted)}
.g-overdue .dd-when{color:var(--dd-red)}
.dd-box:checked+.dd-title{color:var(--dd-muted);text-decoration:line-through}
.dd-box:checked+.dd-title .dd-when{text-decoration:none}
.dd-row2 .dd-prio{flex:none;margin-top:1px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:480px){.dd{padding:20px 16px}.dd-row{margin:0 -8px 0 -10px;padding:14px 8px 14px 10px}.dd-row2{padding:11px 12px}}
@media (prefers-reduced-motion:reduce){.dd *{transition:none!important}}

Bootstrap 5 code

Requires: Bootstrap 5.3.8 CSS

HTML
<div><span class="lbl">Priority, due date and overdue</span>
<section class="card dd" aria-labelledby="cat-title">
  <div class="dd-head"><h2 id="cat-title">Spring catalogue</h2><p>Thursday 11 June · <strong>2 overdue</strong></p></div>
  <ul>
    <li class="dd-row d-flex is-overdue"><input class="form-check-input" type="checkbox" id="cat-1"><div class="dd-body"><label class="dd-title" for="cat-1">Approve the cover photography</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="visually-hidden">Priority: </span>High</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-09">Tue 9 Jun</time></span></div></div></li>
    <li class="dd-row d-flex is-overdue"><input class="form-check-input" type="checkbox" id="cat-2"><div class="dd-body"><label class="dd-title" for="cat-2">Send the price list to the printer</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="visually-hidden">Priority: </span>High</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-10">Wed 10 Jun</time></span></div></div></li>
    <li class="dd-row d-flex is-today"><input class="form-check-input" type="checkbox" id="cat-3"><div class="dd-body"><label class="dd-title" for="cat-3">Proofread pages 12 to 24</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Medium</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg><span class="visually-hidden">Due </span><time datetime="2026-06-11">Today</time></span></div></div></li>
    <li class="dd-row d-flex"><input class="form-check-input" type="checkbox" id="cat-4"><div class="dd-body"><label class="dd-title" for="cat-4">Write captions for the linen range</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Medium</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="visually-hidden">Due </span><time datetime="2026-06-12">Fri 12 Jun</time></span></div></div></li>
    <li class="dd-row d-flex"><input class="form-check-input" type="checkbox" id="cat-5" checked><div class="dd-body"><label class="dd-title" for="cat-5">Order 500 sample envelopes</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Low</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="visually-hidden">Due </span><time datetime="2026-06-15">Mon 15 Jun</time></span></div></div></li>
    <li class="dd-row d-flex"><input class="form-check-input" type="checkbox" id="cat-6"><div class="dd-body"><label class="dd-title" for="cat-6">Brief the courier about the launch drop</label><div class="dd-meta"><span class="badge rounded-pill dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Low</span><span class="dd-due"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="visually-hidden">Due </span><time datetime="2026-06-18">Thu 18 Jun</time></span></div></div></li>
  </ul>
</section></div>

<div><span class="lbl">Grouped by when it is due</span>
<section class="card dd" aria-labelledby="wk-title">
  <div class="dd-head"><h2 id="wk-title">My week</h2><p>7 tasks · <strong>2 overdue</strong></p></div>
  <section class="dd-group g-overdue" aria-labelledby="wk-overdue">
    <h3 id="wk-overdue"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg>Overdue<span class="dd-n">2<span class="visually-hidden"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-overdue-1"><label class="dd-title" for="wk-overdue-1">Invoice Halden & Co for May<time class="dd-when" datetime="2026-06-08">Was due Mon 8 Jun</time></label><span class="badge rounded-pill dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="visually-hidden">Priority: </span>High</span></li>
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-overdue-2"><label class="dd-title" for="wk-overdue-2">Reply to the venue about catering<time class="dd-when" datetime="2026-06-09">Was due Tue 9 Jun</time></label><span class="badge rounded-pill dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Medium</span></li>
    </ul>
  </section>
  <section class="dd-group g-today" aria-labelledby="wk-today">
    <h3 id="wk-today"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg>Today, Thursday 11 June<span class="dd-n">3<span class="visually-hidden"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-today-1"><label class="dd-title" for="wk-today-1">Call the accountant<time class="dd-when" datetime="2026-06-11T10:30">10:30</time></label><span class="badge rounded-pill dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Medium</span></li>
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-today-2"><label class="dd-title" for="wk-today-2">Send logo drafts to Marta<time class="dd-when" datetime="2026-06-11T15:00">15:00</time></label><span class="badge rounded-pill dd-prio p-high"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="visually-hidden">Priority: </span>High</span></li>
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-today-3" checked><label class="dd-title" for="wk-today-3">Renew the domain name<time class="dd-when" datetime="2026-06-11">Any time</time></label><span class="badge rounded-pill dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Low</span></li>
    </ul>
  </section>
  <section class="dd-group g-later" aria-labelledby="wk-later">
    <h3 id="wk-later"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg>Later this week<span class="dd-n">2<span class="visually-hidden"> tasks</span></span></h3>
    <ul class="dd-list2">
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-later-1"><label class="dd-title" for="wk-later-1">Upload the portfolio case study<time class="dd-when" datetime="2026-06-12">Friday</time></label><span class="badge rounded-pill dd-prio p-medium"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Medium</span></li>
      <li class="dd-row2 d-flex"><input class="form-check-input" type="checkbox" id="wk-later-2"><label class="dd-title" for="wk-later-2">Back up the photo archive<time class="dd-when" datetime="2026-06-13">Saturday</time></label><span class="badge rounded-pill dd-prio p-low"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="visually-hidden">Priority: </span>Low</span></li>
    </ul>
  </section>
</section></div>
CSS
/* Due-date task lists on Bootstrap: .card, .badge, .form-check-input and .visually-hidden. A real checkbox per task, priority written as text (High, Medium, Low) with a bar icon,
   due dates in <time>, and an overdue state that says "Overdue" in words as well as turning red. No JavaScript. */
.dd{--bs-card-border-color:var(--dd-line);--dd-ink:#0f1b2d;--dd-muted:#4a5872;--dd-line:#e0e6f0;--dd-box:#7586a3;--dd-accent:#1d4ed8;--dd-red:#b91c1c;--dd-red-bg:#fef2f2;
  --dd-high:#991b1b;--dd-high-bg:#fee2e2;--dd-med:#92400e;--dd-med-bg:#fef3c7;--dd-low:#334155;--dd-low-bg:#e8edf4;
  background:#fff;color:var(--dd-ink);border:1px solid var(--dd-line);border-radius:18px;padding:24px 26px;box-shadow:0 18px 40px -28px rgba(15,27,45,.4)}
.dd :where(h2,h3,p,ul){margin:0;padding:0}
.dd .dd-title{margin:0}
.dd ul{list-style:none}
.dd-head{display:flex;align-items:baseline;justify-content:space-between;gap:4px 16px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--dd-line)}
.dd-head h2{font-size:1.2rem;font-weight:800;letter-spacing:-.015em}
.dd-head p{font-size:.86rem;color:var(--dd-muted)}
.dd-head strong{color:var(--dd-red)}
.dd .form-check-input{flex:none;width:20px;height:20px;margin:2px 0 0;border:2px solid var(--dd-box);border-radius:6px;background-size:13px;cursor:pointer;
  transition:background-color .15s,border-color .15s}
.dd .form-check-input:checked{background-color:var(--dd-accent);border-color:var(--dd-accent)}
.dd .form-check-input:focus{box-shadow:none;border-color:var(--dd-box)}
.dd .form-check-input:checked:focus{border-color:var(--dd-accent)}
.dd .form-check-input:focus-visible{outline:3px solid var(--dd-accent);outline-offset:2px}
.dd-row{display:flex;align-items:flex-start;gap:14px;padding:14px 12px 14px 14px;margin:0 -12px 0 -14px;border-bottom:1px solid var(--dd-line);border-left:3px solid transparent}
.dd-row:last-child{border-bottom:0}
.dd-row.is-overdue{border-left-color:var(--dd-red);background:linear-gradient(90deg,var(--dd-red-bg),#fff 70%)}
.dd-body{min-width:0;flex:1}
.dd-title{display:block;font-size:1rem;font-weight:600;line-height:1.4;cursor:pointer;transition:color .15s}
.dd-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:7px}
.dd-prio{--bs-badge-padding-x:9px;--bs-badge-padding-y:3px;--bs-badge-font-size:.76rem;--bs-badge-font-weight:700;display:inline-flex;align-items:center;gap:5px;padding-left:7px;line-height:1.3}
.p-high{background:var(--dd-high-bg);--bs-badge-color:var(--dd-high)}
.p-medium{background:var(--dd-med-bg);--bs-badge-color:var(--dd-med)}
.p-low{background:var(--dd-low-bg);--bs-badge-color:var(--dd-low)}
.dd-due{display:inline-flex;align-items:center;gap:5px;font-size:.8rem;font-weight:600;line-height:1.3;color:var(--dd-muted);white-space:nowrap}
.is-overdue .dd-due{color:var(--dd-red);font-weight:700}
.is-today .dd-due{color:var(--dd-accent)}
.dd .form-check-input:checked~.dd-body .dd-title{color:var(--dd-muted);text-decoration:line-through}
.dd .form-check-input:checked~.dd-body .dd-due{color:var(--dd-muted);font-weight:600}
/* grouped by when */
.dd-group{margin-top:20px}
.dd-group:first-of-type{margin-top:16px}
.dd-group h3{display:flex;align-items:center;gap:7px;font-size:.78rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--dd-muted);padding-bottom:6px}
.g-overdue h3{color:var(--dd-red)}
.g-today h3{color:var(--dd-accent)}
.dd-n{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--dd-low-bg);color:var(--dd-low);font-size:.72rem;letter-spacing:0}
.g-overdue .dd-n{background:var(--dd-red-bg);color:var(--dd-red)}
.dd-list2{border:1px solid var(--dd-line);border-radius:12px;overflow:hidden}
.g-overdue .dd-list2{border-color:#f3b4b4}
.dd-row2{display:flex;align-items:flex-start;gap:12px;padding:11px 14px}
.dd-row2+.dd-row2{border-top:1px solid var(--dd-line)}
.dd-row2 .dd-title{flex:1;min-width:0;font-weight:500}
.dd-when{display:block;margin-top:2px;font-size:.8rem;font-weight:600;color:var(--dd-muted)}
.g-overdue .dd-when{color:var(--dd-red)}
.dd .form-check-input:checked+.dd-title{color:var(--dd-muted);text-decoration:line-through}
.dd .form-check-input:checked+.dd-title .dd-when{text-decoration:none}
.dd-row2 .dd-prio{flex:none;margin-top:1px}
@media (max-width:480px){.dd{padding:20px 16px}.dd-row{margin:0 -8px 0 -10px;padding:14px 8px 14px 10px}.dd-row2{padding:11px 12px}}
@media (prefers-reduced-motion:reduce){.dd *{transition:none!important}}

Tailwind 4 code

Requires: Tailwind CSS 4

HTML
<div><span class="mb-4 block text-[.72rem] tracking-[.12em] text-[#4a5872] uppercase">Priority, due date and overdue</span>
<section class="rounded-[18px] border border-[#e0e6f0] bg-white px-[26px] py-6 text-[#0f1b2d] shadow-[0_18px_40px_-28px_rgba(15,27,45,.4)] max-[480px]:px-4 max-[480px]:py-5" aria-labelledby="cat-title">
  <div class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 border-b border-[#e0e6f0] pb-3.5"><h2 class="text-[1.2rem] font-extrabold tracking-[-.015em]" id="cat-title">Spring catalogue</h2><p class="text-[.86rem] text-[#4a5872]">Thursday 11 June · <strong class="text-[#b91c1c]">2 overdue</strong></p></div>
  <ul>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-[#b91c1c] bg-[linear-gradient(90deg,#fef2f2,#fff_70%)]"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-1"><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-1">Approve the cover photography</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fee2e2] text-[#991b1b]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-bold text-[#b91c1c] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-09">Tue 9 Jun</time></span></div></div></li>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-[#b91c1c] bg-[linear-gradient(90deg,#fef2f2,#fff_70%)]"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-2"><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-2">Send the price list to the printer</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fee2e2] text-[#991b1b]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-bold text-[#b91c1c] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg><span>Overdue</span><time datetime="2026-06-10">Wed 10 Jun</time></span></div></div></li>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-transparent"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-3"><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-3">Proofread pages 12 to 24</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fef3c7] text-[#92400e]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-semibold text-[#1d4ed8] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg><span class="sr-only">Due </span><time datetime="2026-06-11">Today</time></span></div></div></li>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-transparent"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-4"><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-4">Write captions for the linen range</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fef3c7] text-[#92400e]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-semibold text-[#4a5872] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-12">Fri 12 Jun</time></span></div></div></li>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-transparent"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-5" checked><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-5">Order 500 sample envelopes</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#e8edf4] text-[#334155]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-semibold text-[#4a5872] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-15">Mon 15 Jun</time></span></div></div></li>
    <li class="group/task -mr-3 -ml-3.5 flex items-start gap-3.5 border-b border-l-3 border-b-[#e0e6f0] py-3.5 pr-3 pl-3.5 last:border-b-0 max-[480px]:-mr-2 max-[480px]:-ml-2.5 max-[480px]:pr-2 max-[480px]:pl-2.5 border-l-transparent"><input class="mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="cat-6"><div class="min-w-0 flex-1"><label class="block cursor-pointer text-base leading-[1.4] font-semibold transition-colors duration-150 group-has-checked/task:text-[#4a5872] group-has-checked/task:line-through motion-reduce:transition-none" for="cat-6">Brief the courier about the launch drop</label><div class="mt-[7px] flex flex-wrap gap-2"><span class="inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#e8edf4] text-[#334155]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span><span class="inline-flex items-center gap-[5px] whitespace-nowrap text-[.8rem] leading-[1.3] font-semibold text-[#4a5872] group-has-checked/task:font-semibold group-has-checked/task:text-[#4a5872]"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg><span class="sr-only">Due </span><time datetime="2026-06-18">Thu 18 Jun</time></span></div></div></li>
  </ul>
</section></div>

<div><span class="mb-4 block text-[.72rem] tracking-[.12em] text-[#4a5872] uppercase">Grouped by when it is due</span>
<section class="rounded-[18px] border border-[#e0e6f0] bg-white px-[26px] py-6 text-[#0f1b2d] shadow-[0_18px_40px_-28px_rgba(15,27,45,.4)] max-[480px]:px-4 max-[480px]:py-5" aria-labelledby="wk-title">
  <div class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 border-b border-[#e0e6f0] pb-3.5"><h2 class="text-[1.2rem] font-extrabold tracking-[-.015em]" id="wk-title">My week</h2><p class="text-[.86rem] text-[#4a5872]">7 tasks · <strong class="text-[#b91c1c]">2 overdue</strong></p></div>
  <section class="mt-4" aria-labelledby="wk-overdue">
    <h3 class="flex items-center gap-[7px] pb-1.5 text-[.78rem] font-extrabold tracking-[.09em] uppercase text-[#b91c1c]" id="wk-overdue"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M8 1.8l6.6 11.7H1.4z" stroke-linejoin="round"/><path d="M8 6.3v3.3M8 11.6v.1"/></svg>Overdue<span class="inline-grid h-5 min-w-5 place-items-center rounded-full px-1.5 text-[.72rem] tracking-normal bg-[#fef2f2] text-[#b91c1c]">2<span class="sr-only"> tasks</span></span></h3>
    <ul class="overflow-hidden rounded-xl border border-[#f3b4b4]">
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-overdue-1"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-overdue-1">Invoice Halden & Co for May<time class="mt-0.5 block text-[.8rem] font-semibold text-[#b91c1c] no-underline" datetime="2026-06-08">Was due Mon 8 Jun</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fee2e2] text-[#991b1b]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span></li>
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-overdue-2"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-overdue-2">Reply to the venue about catering<time class="mt-0.5 block text-[.8rem] font-semibold text-[#b91c1c] no-underline" datetime="2026-06-09">Was due Tue 9 Jun</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fef3c7] text-[#92400e]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
    </ul>
  </section>
  <section class="mt-5" aria-labelledby="wk-today">
    <h3 class="flex items-center gap-[7px] pb-1.5 text-[.78rem] font-extrabold tracking-[.09em] uppercase text-[#1d4ed8]" id="wk-today"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="8" cy="8" r="6.2"/><path d="M8 4.6V8l2.3 1.5"/></svg>Today, Thursday 11 June<span class="inline-grid h-5 min-w-5 place-items-center rounded-full px-1.5 text-[.72rem] tracking-normal bg-[#e8edf4] text-[#334155]">3<span class="sr-only"> tasks</span></span></h3>
    <ul class="overflow-hidden rounded-xl border border-[#e0e6f0]">
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-today-1"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-today-1">Call the accountant<time class="mt-0.5 block text-[.8rem] font-semibold text-[#4a5872] no-underline" datetime="2026-06-11T10:30">10:30</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fef3c7] text-[#92400e]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-today-2"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-today-2">Send logo drafts to Marta<time class="mt-0.5 block text-[.8rem] font-semibold text-[#4a5872] no-underline" datetime="2026-06-11T15:00">15:00</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fee2e2] text-[#991b1b]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1"/></svg><span class="sr-only">Priority: </span>High</span></li>
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-today-3" checked><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-today-3">Renew the domain name<time class="mt-0.5 block text-[.8rem] font-semibold text-[#4a5872] no-underline" datetime="2026-06-11">Any time</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#e8edf4] text-[#334155]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span></li>
    </ul>
  </section>
  <section class="mt-5" aria-labelledby="wk-later">
    <h3 class="flex items-center gap-[7px] pb-1.5 text-[.78rem] font-extrabold tracking-[.09em] uppercase text-[#4a5872]" id="wk-later"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M2 7h12M5.5 1.5v3M10.5 1.5v3"/></svg>Later this week<span class="inline-grid h-5 min-w-5 place-items-center rounded-full px-1.5 text-[.72rem] tracking-normal bg-[#e8edf4] text-[#334155]">2<span class="sr-only"> tasks</span></span></h3>
    <ul class="overflow-hidden rounded-xl border border-[#e0e6f0]">
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-later-1"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-later-1">Upload the portfolio case study<time class="mt-0.5 block text-[.8rem] font-semibold text-[#4a5872] no-underline" datetime="2026-06-12">Friday</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#fef3c7] text-[#92400e]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Medium</span></li>
      <li class="flex items-start gap-3 border-[#e0e6f0] px-3.5 py-[11px] max-[480px]:px-3 [&+li]:border-t"><input class="peer mt-0.5 size-5 flex-none cursor-pointer appearance-none rounded-md border-2 border-[#7586a3] bg-white bg-[length:13px] bg-center bg-no-repeat transition-colors duration-150 checked:border-[#1d4ed8] checked:bg-[#1d4ed8] checked:bg-tick focus-visible:outline-3 focus-visible:outline-offset-2 focus-visible:outline-[#1d4ed8] motion-reduce:transition-none" type="checkbox" id="wk-later-2"><label class="min-w-0 flex-1 cursor-pointer text-base leading-[1.4] font-medium transition-colors duration-150 peer-checked:text-[#4a5872] peer-checked:line-through motion-reduce:transition-none" for="wk-later-2">Back up the photo archive<time class="mt-0.5 block text-[.8rem] font-semibold text-[#4a5872] no-underline" datetime="2026-06-13">Saturday</time></label><span class="mt-px flex-none inline-flex items-center gap-[5px] whitespace-nowrap rounded-full py-[3px] pr-[9px] pl-[7px] text-[.76rem] leading-[1.3] font-bold bg-[#e8edf4] text-[#334155]"><svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><rect x="0" y="7" width="3" height="5" rx="1"/><rect x="4.5" y="4" width="3" height="8" rx="1" opacity=".3"/><rect x="9" y="1" width="3" height="11" rx="1" opacity=".3"/></svg><span class="sr-only">Priority: </span>Low</span></li>
    </ul>
  </section>
</section></div>
CSS
/* the white tick drawn inside a checked box */
@utility bg-tick {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

About this set

Task lists that show when each task is due and how much it matters, without relying on colour. Priority, due date and overdue is a print catalogue project with six tasks. Each one carries a priority label that says High, Medium or Low in words beside a signal-bar icon with one, two or three filled bars, and a due date inside a time element with a machine-readable datetime. Overdue tasks get a red edge, a warning icon and the word Overdue before the date; the task due today gets a clock icon and the word Today. Ticking a task strikes it through and mutes its date, so a finished task stops looking urgent. Grouped by when it is due is a freelancer’s week split into Overdue, Today and Later this week, each heading with an icon and a task count, and compact rows with the time on a second line and the priority label on the right. Both lists are plain HTML and CSS with no JavaScript. The plain and Bootstrap versions style ticked rows with the sibling combinator; the Tailwind version uses group-has-checked.

What’s included

  • Priority written as High, Medium or Low beside a one-to-three bar icon
  • Due dates in time elements with datetime attributes
  • Overdue rows say Overdue in words and add a warning icon
  • Ticked tasks are struck through and their dates muted
  • Second list grouped into Overdue, Today and Later this week, no JavaScript

Accessibility

Each task is a real checkbox with a label, and priority and due state are written in words, so nothing depends on colour: a screen reader hears Priority: High and Overdue Tue 9 Jun. Icons are hidden from assistive technology, group headings carry visually hidden task counts, checkboxes show a visible focus outline, and colour transitions stop under prefers-reduced-motion.

Customise it

Change --dd-accent, --dd-red and the --dd-high, --dd-med and --dd-low pairs on .dd for the label colours. Bootstrap uses the same variables on .badge and .form-check-input; in Tailwind swap the #1d4ed8, #b91c1c and label colour utilities.