/* My Tasks · page styles (tokens + logical properties only) */
.tk-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-block-end: var(--space-5); }
.tk-sumcard {
  display: flex; align-items: center; gap: var(--space-3); padding: 14px 16px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--bg-card);
  color: var(--text-primary); text-decoration: none;
}
.tk-sumcard:hover { background: var(--bg-card-hover); border-color: var(--border-medium); }
.tk-sumcard b { display: block; font-size: var(--text-2xl); font-weight: var(--weight-extrabold); line-height: 1.1; }
.tk-sumcard small { color: var(--text-secondary); font-size: var(--text-sm); }
.tk-sum-ico, .tk-sec-ico { width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; background: var(--ts-bg); color: var(--ts-fg); }
.tk-sum-ico svg { width: 18px; height: 18px; }
.ts-red { --ts-bg: var(--danger-bg); --ts-fg: var(--danger-text); }
.ts-amber { --ts-bg: var(--warning-bg); --ts-fg: var(--warning-text); }
.ts-blue { --ts-bg: var(--accent-glow-md); --ts-fg: var(--accent-text); }
.ts-purple { --ts-bg: var(--purple-bg); --ts-fg: var(--purple-text); }
.ts-green { --ts-bg: var(--success-bg); --ts-fg: var(--success-text); }
.ts-neutral { --ts-bg: var(--bg-card-hover); --ts-fg: var(--text-secondary); }

.tk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-end: var(--space-5); }
.tk-add { flex: 1 1 380px; display: flex; align-items: center; gap: var(--space-2); position: relative; }
.tk-add > .input:first-of-type { flex: 1; padding-inline-start: 38px; }
.tk-add-ico { position: absolute; inset-inline-start: 12px; color: var(--text-muted); display: grid; pointer-events: none; }
.tk-add-ico svg { width: 16px; height: 16px; }
.tk-add-date { width: 150px; }
.tk-filters { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.tk-filters .input-wrap { width: 190px; }

.tk-list { display: grid; gap: var(--space-4); }
.tk-sec { border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--bg-surface); overflow: hidden; }
.tk-sec-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: none; border: 0; color: var(--text-primary); font: inherit; cursor: pointer; text-align: start;
}
.tk-sec-head:hover { background: var(--bg-card); }
.tk-sec-head h2 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-bold); }
.tk-sec-ico { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.tk-sec-ico svg { width: 15px; height: 15px; }
.tk-chev { width: 16px; height: 16px; color: var(--text-muted); transition: transform var(--transition-fast); }
.tk-sec-head[aria-expanded="false"] .tk-chev { transform: rotate(-90deg); }
[dir="rtl"] .tk-sec-head[aria-expanded="false"] .tk-chev { transform: rotate(90deg); }
.tk-sec-body { border-block-start: 1px solid var(--border-subtle); }
.tk-empty { margin: 0; padding: 16px 20px; color: var(--text-muted); font-size: var(--text-base-sm); }

.tk-row { display: flex; align-items: center; gap: var(--space-3); padding: 10px 14px; border-block-end: 1px solid var(--border-subtle); }
.tk-row:last-child { border-block-end: 0; }
.tk-row:hover { background: var(--bg-card); }
.tk-check { flex-shrink: 0; }
.tk-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tk-title { background: none; border: 0; padding: 0; color: var(--text-primary); font: inherit; font-weight: var(--weight-semibold); font-size: var(--text-base); text-align: start; cursor: pointer; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-title:hover { color: var(--accent-text); text-decoration: underline; }
.tk-row.is-done .tk-title { text-decoration: line-through; color: var(--text-muted); }
.tk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: var(--text-sm); color: var(--text-muted); }
.tk-meta .rel-chip { max-width: 340px; height: 22px; font-size: var(--text-xs); }
.tk-wait { display: inline-flex; align-items: center; gap: 4px; }
.tk-wait svg { width: 13px; height: 13px; }
.tk-cells { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.tk-status { border: 0; cursor: pointer; font-family: inherit; min-width: 128px; justify-content: center; }
.tk-status:hover { filter: brightness(1.08); }
.tk-status:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.tk-pri { min-width: 64px; justify-content: center; }
.tk-due { display: inline-flex; align-items: center; gap: 5px; min-width: 104px; font-size: var(--text-sm); color: var(--text-secondary); }
.tk-due svg { width: 14px; height: 14px; }
.tk-counts { display: inline-flex; gap: 10px; color: var(--text-muted); font-size: var(--text-sm); min-width: 78px; }
.tk-counts > span { display: inline-flex; align-items: center; gap: 4px; }
.tk-counts svg { width: 14px; height: 14px; }
.tk-desc { margin: 0; color: var(--text-secondary); line-height: var(--leading-normal); font-size: var(--text-base-sm); }

@container page (max-width: 900px) {
  .tk-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-row { flex-wrap: wrap; align-items: flex-start; }
  .tk-cells { flex-wrap: wrap; gap: var(--space-2); padding-inline-start: 34px; width: 100%; }
  .tk-status { min-width: 0; }
  .tk-due, .tk-counts { min-width: 0; }
}
@container page (max-width: 560px) {
  .tk-add-date { width: 130px; }
  .tk-filters, .tk-filters .input-wrap { width: 100%; }
  .tk-filters select { flex: 1; }
  .tk-meta .rel-chip { max-width: 100%; }
  .tk-by { display: none; }
}
@container page (max-width: 560px) {
  .tk-add { flex-wrap: wrap; }
  .tk-add > .input:first-of-type { flex: 1 1 100%; }
  .tk-add-date { flex: 1; }
}
