/* OBSCURA OS: TASKS, Upcoming and several cards at once.
 *
 * Upcoming lists what is due on every open board; the selection acts on
 * several cards of a board together. Read after the page's own rules,
 * whose tokens (--tk-card, --tk-btn) it uses.
 */
/* ---- upcoming: what is due on every board ----
   A plain list under a heading for each stretch of time, the board and
   list under each card's title, and its due date as the card shows it. */
.tk-up-group { max-width: 760px; }
.tk-up-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 6px; font: 600 var(--text-xs) var(--font-sans); color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.tk-up-group h3 span { font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-up-group.is-overdue h3 { color: var(--danger); }
.tk-up-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tk-up-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; min-height: 52px; padding: 2px 8px 2px 0; border-bottom: 1px solid var(--rule); }
.tk-up-tick { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.tk-up-tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-strong); cursor: pointer; }
.tk-up-open { min-width: 0; padding: 6px 4px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.tk-up-open:hover .tk-up-title { text-decoration: underline; }
.tk-up-open:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 0; }
.tk-up-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.tk-up-where { display: block; font-size: var(--text-2xs); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-up-row .tk-badge { font-size: var(--text-2xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-up-row.is-done .tk-up-title { text-decoration: line-through; color: var(--ink-soft); }
.tk-upview > .tk-empty { text-align: left; padding: 8px 0; }

/* ---- several cards at once ----
   A selected card is ringed in the accent; in Select mode each card
   carries a box saying whether it is chosen, and a tap chooses it. The
   bar of what can be done to them sits under the board, never over it. */
.tk-card-pick { display: none; position: absolute; top: 8px; left: 8px; z-index: 1; width: 18px; height: 18px; border: 2px solid var(--ink-soft); border-radius: var(--radius-sm); background: var(--tk-card); pointer-events: none; }
.tk-boardview.is-selecting .tk-card-pick, .tk-card-wrap.is-selected .tk-card-pick { display: block; }
.tk-card-wrap.is-selected .tk-card-pick { border-color: var(--accent-strong); background: var(--accent-strong); }
.tk-card-wrap.is-selected .tk-card-pick::after { content: ''; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tk-boardview.is-selecting .tk-card-body, .tk-card-wrap.is-selected .tk-card-body { padding-left: 34px; }
.tk-card-wrap.is-selected .tk-card { outline: 2px solid var(--accent-strong); outline-offset: 0; }
.tk-table tr.is-selected td { background: var(--accent-soft); }
.tk-table .tk-pick-cell { width: 44px; padding: 4px 8px; }
.tk-table .tk-pick-cell input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-strong); vertical-align: middle; }
.tk-selbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; background: var(--paper-raised); color: var(--ink); border-top: 1px solid var(--rule-strong); }
.tk-selbar[hidden] { display: none; }
.tk-sel-count { margin-right: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
body.tk-has-selbar #obscuraNotice { bottom: calc(var(--tk-selbar-h, 52px) + 12px) !important; }
body.tasks-app.tk-has-selbar #ppBadge { bottom: calc(var(--tk-selbar-h, 52px) + 8px); }
@media (pointer: coarse) {
  .tk-selbar .tk-btn { min-height: 44px; }
}
@media (max-width: 700px) {
  .tk-sel-count { flex: 1 1 100%; }
  .tk-table .tk-pick-cell { display: block; padding: 4px 12px 0; }
}

/* ---- the dashboard: how the board's cards stand ----
   Three sets of flat bars on the board's colour, a card each. */
.tk-dashview { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.tk-dashview .tk-empty, .tk-dash-total { margin: 0 0 10px; font-weight: 600; }
.tk-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.tk-dash-set { background: var(--paper-raised); color: var(--ink); border-radius: var(--radius-md); padding: 12px 14px; }
.tk-dash-set h3 { margin: 0 0 8px; font-size: var(--text-sm); }
.tk-dash-set ul { list-style: none; margin: 0; padding: 0; }
.tk-dash-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3ch; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 2px 6px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; text-align: left; }
button.tk-dash-row { cursor: pointer; }
button.tk-dash-row:hover { background: var(--paper-inset); }
.tk-dash-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); }
.tk-dash-name .tk-label { margin: 0; max-width: 100%; }
.tk-dash-track { height: 10px; background: var(--paper-inset); border-radius: var(--radius-sm); overflow: hidden; }
.tk-dash-bar { display: block; height: 100%; background: var(--accent-strong); }
.tk-dash-bar.is-over { background: var(--danger); }
.tk-dash-bar.is-done { background: var(--ink-faint); }
.tk-dash-n { text-align: right; font-variant-numeric: tabular-nums; font-size: var(--text-xs); }
@media (pointer: coarse) { .tk-dash-row { min-height: 44px; } }
