/* Tasks (public/lan-tasks.js) — theme tokens only, so every theme works */
:root { --tk-todo: var(--muted); --tk-doing: var(--accent); --tk-wait: var(--warn); --tk-done: var(--ok); --tk-r: 14px; }
body.tk-dragging, body.tk-dragging * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }
.tk-n { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.tk-n.bad { color: var(--bad); background: var(--bad-soft); }
.grow { flex: 1; }
kbd { font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: var(--soft); }

/* ── Pulse strip ── */
.tk-pulse { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tk-k { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 14px 16px; border-radius: var(--tk-r);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; overflow: hidden; transition: transform .16s, border-color .16s, box-shadow .16s; }
.tk-k::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .2s; }
.tk-k.on::after, .tk-k:not([tabindex="-1"]):hover::after { opacity: .8; }
.tk-k[tabindex="-1"] { cursor: default; }
.tk-k:not([tabindex="-1"]):hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.tk-k-n { grid-row: 1; font-size: 30px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tk-k-l { grid-row: 2; font-size: 12.5px; color: var(--muted); }
.tk-k-v { grid-row: 1 / 3; grid-column: 2; display: grid; place-items: center; }
.tk-k.bad .tk-k-n { color: var(--bad); } .tk-k.warn .tk-k-n { color: var(--warn); } .tk-k.ok .tk-k-n { color: var(--ok); }
.tk-ring { transform: rotate(-90deg); }
.tk-ring circle { fill: none; stroke-width: 4; }
.tk-ring .bg { stroke: var(--soft); }
.tk-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2,.8,.2,1); }
.tk-ring.bad .fg { stroke: var(--bad); } .tk-ring.ok .fg { stroke: var(--ok); }
.tk-stack { display: flex; width: 64px; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--soft); }
.tk-stack i, .tk-load i { display: block; min-width: 0; }
.tk-stack .open, .tk-load .open { background: color-mix(in srgb, var(--tk-todo) 70%, transparent); }
.tk-stack .doing, .tk-load .doing { background: var(--tk-doing); }
.tk-stack .waiting, .tk-load .waiting { background: var(--tk-wait); }
.tk-beat, .tk-calm { width: 14px; height: 14px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 60%, transparent); animation: tk-beat 1.6s infinite; }
.tk-calm { background: var(--ok); animation: none; opacity: .6; }
@keyframes tk-beat { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tk-k-ai { color: var(--warn); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--warn-soft); }
.tk-k-ai .i { width: 18px; height: 18px; }
.tk-spark { display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.tk-spark i { width: 4px; border-radius: 2px; background: var(--ok); height: calc(3px + var(--v) * 27px); opacity: calc(.35 + var(--v) * .65); transform-origin: bottom; animation: tk-grow .5s calc(var(--i) * 25ms) both cubic-bezier(.2,.8,.2,1); }
@keyframes tk-grow { from { transform: scaleY(0); } }

/* ── Toolbar ── */
.tk-tool { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-h2 { font-size: 15px; }
.tk-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); min-width: 220px; flex: 0 1 300px; transition: border-color .15s, box-shadow .15s; }
.tk-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-search .i { width: 16px; height: 16px; color: var(--muted); }
.tk-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; height: 100%; color: var(--ink); outline: none; }
.tk-views button .tk-n { margin-left: 4px; }
.tk-askbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--gold, var(--warn)) 18%, var(--accent-soft))); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); transition: transform .15s, box-shadow .15s; }
.tk-askbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 25%, transparent); }
.tk-askbtn .i { width: 16px; height: 16px; }
.tk-askbtn kbd, .tk-newbtn kbd { margin-left: 2px; opacity: .8; }
.tk-newbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; }
.tk-newbtn .i { width: 16px; height: 16px; }
.tk-newbtn kbd { background: color-mix(in srgb, #fff 18%, transparent); color: inherit; border-color: color-mix(in srgb, #fff 25%, transparent); }

.tk-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 14px; }
.tk-faces { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-face { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 12.5px; transition: transform .12s, border-color .12s, background .12s; }
.tk-face:hover { transform: translateY(-1px); }
.tk-face.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.tk-face sup { font-size: 10.5px; font-weight: 700; top: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tk-fchip { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 12.5px; }
.tk-fchip.on { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tk-fchip.on.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.tk-fsel { height: 30px; border-radius: 99px; padding: 0 28px 0 12px; font-size: 12.5px; }
.tk-fclear { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12.5px; text-decoration: underline; }

/* ── Avatars ── */
.tk-av { --h: 220; display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, hsl(var(--h) 65% 50%) 26%, var(--surface)); color: color-mix(in srgb, hsl(var(--h) 75% 55%) 70%, var(--ink)); border: 1px solid color-mix(in srgb, hsl(var(--h) 65% 50%) 35%, transparent); }
.tk-av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.tk-av.lg { width: 40px; height: 40px; font-size: 14px; }
.tk-av.none { background: var(--soft); color: var(--muted); border: 1px dashed var(--line-2); }
.tk-av.more { background: var(--soft); color: var(--ink-2); border-color: var(--line); }
.tk-who { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; min-width: 0; }

/* ── Chips ── */
.tk-due, .tk-pri, .tk-src, .tk-st, .tk-aitag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; line-height: 1.4; }
.tk-due { color: var(--ink-2); background: var(--soft); }
.tk-due.today { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.tk-due.late { color: var(--bad); background: var(--bad-soft); font-weight: 600; }
.tk-pri { font-weight: 600; border: 0; }
.tk-pri.urgent { color: var(--bad); background: var(--bad-soft); } .tk-pri.high { color: var(--warn); background: var(--warn-soft); }
.tk-pri.low { color: var(--muted); background: var(--soft); } .tk-pri.normal { color: var(--ink-2); background: var(--soft); }
.tk-src { color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; padding-left: 0; }
.tk-src .i { width: 12px; height: 12px; flex: none; }
.tk-aitag { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent-text); background: var(--accent-soft); padding: 1px 5px; margin-left: 6px; }
.tk-st { background: var(--soft); color: var(--ink-2); border: 0; font-weight: 600; cursor: default; }
button.tk-st { cursor: pointer; } button.tk-st:hover { filter: brightness(1.15); }
.tk-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--tk-todo); }
.tk-st.doing { color: var(--accent-text); background: var(--accent-soft); } .tk-st.doing i { background: var(--tk-doing); }
.tk-st.waiting { color: var(--warn); background: var(--warn-soft); } .tk-st.waiting i { background: var(--tk-wait); }
.tk-st.done { color: var(--ok); background: var(--ok-soft); } .tk-st.done i { background: var(--tk-done); }
.tk-st.dropped { color: var(--muted); text-decoration: line-through; } .tk-st.dropped i { background: var(--line-2); }

/* ── Board ── */
.tk-cols { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)) minmax(200px, .7fr); gap: 14px; align-items: stretch; padding-bottom: 6px; }
.tk-col { display: flex; flex-direction: column; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); min-height: 180px; transition: background .15s, border-color .15s, box-shadow .15s; }
.tk-col-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; background: var(--soft); border-radius: 16px 16px 0 0; box-shadow: 0 6px 8px -6px color-mix(in srgb, var(--ink) 18%, transparent); }
.tk-col.tk-over .tk-col-h { background: inherit; }
/* Every column runs the full height of the board, and the Done drop zone follows the scroll — so a card can be dropped anywhere down the page */
.tk-col-b { flex: 1; }
.c-done .tk-col-b { position: sticky; top: 52px; align-self: stretch; }
.tk-col-h b { font-size: 13.5px; }
.tk-col-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tk-todo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-todo) 22%, transparent); }
.c-doing .tk-col-dot { background: var(--tk-doing); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-doing) 25%, transparent); }
.c-waiting .tk-col-dot { background: var(--tk-wait); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-wait) 25%, transparent); }
.c-done .tk-col-dot { background: var(--tk-done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-done) 25%, transparent); }
.tk-col-add { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.tk-col-add:hover { background: var(--surface); color: var(--ink); }
.tk-col-add .i { width: 15px; height: 15px; }
.tk-col-b { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; }
.tk-none { color: var(--muted); text-align: center; padding: 18px 10px; font-size: 12px; border: 1.5px dashed var(--line); border-radius: 12px; }
[data-drop].tk-over { background: color-mix(in srgb, var(--accent) 10%, var(--soft)); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) inset; }
.c-done.tk-over { background: color-mix(in srgb, var(--ok) 12%, var(--soft)); border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft) inset; }
.tk-dropdone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border: 1.5px dashed color-mix(in srgb, var(--ok) 40%, var(--line)); border-radius: 12px; color: var(--ok); font-size: 12px; }
.tk-dropdone .i { width: 20px; height: 20px; }
.tk-mini { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.tk-mini:hover { background: var(--surface); color: var(--ink-2); }
.tk-mini .i { width: 13px; height: 13px; color: var(--ok); flex: none; }
.tk-mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }

.tk-card { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 12px 12px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; outline: none; animation: tk-in .28s cubic-bezier(.2,.8,.2,1) both; transition: transform .14s, box-shadow .14s, border-color .14s, opacity .2s; touch-action: manipulation; }
.tk-card[data-drag] { cursor: grab; }
.tk-card::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.tk-card.p-urgent::before { background: var(--bad); } .tk-card.p-high::before { background: var(--warn); }
.tk-card:hover, .tk-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.tk-card:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.tk-card.late { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 28%, var(--line)); }
.tk-ct { font-weight: 600; font-size: 14px; line-height: 1.38; padding-right: 4px; }
.tk-cm { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.tk-cm:empty { display: none; }
.tk-cf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk-qa { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .14s, transform .14s; }
.tk-card:hover .tk-qa, .tk-card:focus-within .tk-qa { opacity: 1; transform: none; pointer-events: auto; }
.tk-qa button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.tk-qa button:hover { background: var(--soft); color: var(--ink); }
.tk-qa button[data-qa="done"]:hover { background: var(--ok-soft); color: var(--ok); }
.tk-qa .i { width: 15px; height: 15px; }
.tk-card.tk-lifted, .tk-row.tk-lifted { animation: none; opacity: .3; transform: scale(.98); outline: 2px dashed var(--line-2); outline-offset: -2px; }
.tk-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent); border-color: var(--accent); animation: none !important; transition: none !important; background: linear-gradient(var(--surface), var(--surface)), var(--bg) !important; }
.tk-ghost .tk-qa { display: none; }
.tk-poof { animation: tk-poof .28s ease forwards; }
@keyframes tk-poof { to { opacity: 0; transform: scale(.94) translateX(14px); } }
@keyframes tk-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── List ── */
.tk-tw { border-radius: var(--tk-r); border: 1px solid var(--line); overflow: auto; background: var(--surface); }
.tk-table { width: 100%; border-collapse: collapse; }
.tk-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; user-select: none; }
.tk-table th.on { color: var(--ink); }
.tk-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tk-table tbody tr { cursor: pointer; transition: background .1s; }
.tk-table tbody tr:hover { background: var(--hover, var(--soft)); }
.tk-table tr.sel { background: var(--accent-soft); }
.tk-table tr.late td:nth-child(2) { box-shadow: inset 3px 0 0 var(--bad); }
.tk-cb { width: 36px; text-align: center; }
.tk-bulk { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); animation: tk-in .2s both; }
.tk-bulk b { margin-right: 6px; font-size: 13px; }
.tk-bulk button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); background: transparent; color: inherit; cursor: pointer; font-size: 12.5px; }
.tk-bulk button:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.tk-bulk button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.tk-bulk .i { width: 14px; height: 14px; }

/* ── People lanes ── */
.tk-people { display: flex; flex-direction: column; gap: 12px; }
.tk-lane { border-radius: 16px; background: var(--soft); border: 1px solid var(--line); padding: 12px; transition: background .15s, border-color .15s, box-shadow .15s; }
.tk-lane-h { display: grid; grid-template-columns: auto 180px 1fr; align-items: center; gap: 12px; margin-bottom: 10px; }
.tk-lane-h small { display: block; color: var(--muted); font-size: 12px; } .tk-lane-h em { color: var(--bad); font-style: normal; font-weight: 600; }
.tk-load { display: flex; height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; gap: 2px; }
.tk-load i { transition: width .6s cubic-bezier(.2,.8,.2,1); }
.tk-lane-b { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.tk-lane-b .tk-card { flex: 0 0 260px; scroll-snap-align: start; }
.tk-lane-b .tk-none { flex: 1; }

/* ── Closed ── */
.tk-closed-h { display: flex; align-items: flex-end; gap: 22px; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--tk-r); background: var(--surface); border: 1px solid var(--line); }
.tk-closed-h > div:last-child b { display: block; font-size: 30px; color: var(--ok); font-variant-numeric: tabular-nums; }
.tk-closed-h > div:last-child span { color: var(--muted); font-size: 12.5px; }
.tk-bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.tk-bar-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.tk-bar-c i { width: 100%; max-width: 26px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--ok), color-mix(in srgb, var(--ok) 45%, transparent)); transform-origin: bottom; animation: tk-grow .6s both cubic-bezier(.2,.8,.2,1); }
.tk-bar-c small { font-size: 10px; color: var(--muted); height: 12px; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tk-card.closed { cursor: pointer; }
.tk-card.closed .tk-ct { color: var(--ink-2); }
.tk-card.closed.s-done .tk-ct { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.tk-reopen { height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 12px; }
.tk-reopen:hover { background: var(--soft); color: var(--ink); }

/* ── My tasks ── */
.tk-mine { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.tk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tk-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .14s, border-color .14s, background .14s; }
.tk-day:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tk-day small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tk-day b { font-size: 20px; font-variant-numeric: tabular-nums; }
.tk-day.today { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tk-day.today small { color: var(--accent-text); font-weight: 700; }
.tk-day.on { background: var(--accent-soft); border-color: var(--accent); }
.tk-dots { display: flex; gap: 3px; height: 6px; align-items: center; font-size: 10px; color: var(--muted); }
.tk-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tk-dayon { font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; } .tk-dayon button { background: none; border: 0; color: var(--accent-text); cursor: pointer; text-decoration: underline; }
.tk-bucket { border-radius: 14px; padding: 4px 6px 6px; margin-bottom: 10px; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.tk-bucket h3 { display: flex; align-items: center; gap: 8px; margin: 6px 6px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tk-bucket h3 span { font-size: 11px; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 0 7px; letter-spacing: 0; }
.tk-bucket.b-late h3 { color: var(--bad); }
.tk-bucket.b-today h3 { color: var(--accent-text); }
.tk-bucket .tk-none { padding: 10px; }
.tk-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; animation: tk-in .25s both; transition: transform .12s, box-shadow .12s, border-color .12s, opacity .2s; outline: none; }
.tk-row[data-drag] { cursor: grab; }
.tk-row:hover, .tk-row:focus-visible { border-color: var(--line-2); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.tk-row.late { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.tk-row-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; line-height: 1.35; }
.tk-row-m { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tk-check { flex: none; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; transition: border-color .15s, background .15s; }
.tk-check i { width: 10px; height: 6px; border: solid transparent; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); transition: border-color .15s; }
.tk-check:hover { border-color: var(--ok); background: var(--ok-soft); } .tk-check:hover i { border-color: var(--ok); }
.tk-check.off { opacity: .4; cursor: default; }
.tk-row.s-doing .tk-check { border-color: var(--accent); }
.tk-row.tk-ghost { box-shadow: var(--shadow-lg); }
.tk-focus { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tk-focus-ring { position: relative; display: grid; place-items: center; }
.tk-focus-ring .tk-ring circle { stroke-width: 3; }
.tk-focus-ring > div { position: absolute; text-align: center; }
.tk-focus-ring b { display: block; font-size: 30px; font-variant-numeric: tabular-nums; color: var(--ok); line-height: 1; }
.tk-focus-ring span { font-size: 11.5px; color: var(--muted); }
.tk-focus-sub { text-align: center; font-size: 12.5px; color: var(--ink-2); }
.tk-next small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.tk-next button { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; cursor: pointer; color: var(--ink);
  background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tk-next button span { display: flex; gap: 5px; }
.tk-focus-ai { display: flex; flex-direction: column; gap: 6px; }
.tk-focus-ai button { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink-2); cursor: pointer; font-size: 13px; }
.tk-focus-ai button:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tk-focus-ai .i { width: 15px; height: 15px; color: var(--accent-text); }

/* ── Pop-up menus and the smart composer ── */
.tk-pop { background: linear-gradient(var(--surface), var(--surface)), var(--bg) !important; position: fixed; z-index: 1200; min-width: 200px; max-width: calc(100vw - 16px); max-height: 60vh; overflow: auto; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: tk-pop .14s cubic-bezier(.2,.8,.2,1); }
.tk-pop.wide { width: min(520px, calc(100vw - 16px)); padding: 0; }
@keyframes tk-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.tk-menu { display: flex; flex-direction: column; gap: 1px; }
.tk-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px; }
.tk-menu button:hover, .tk-menu button:focus-visible { background: var(--soft); outline: none; }
.tk-menu button small { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.tk-menu-q { margin: 2px 2px 6px; height: 32px; }
.tk-menu-date { padding: 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; } .tk-menu-date input { width: 100%; }
.tk-compose { padding: 10px; }
.tk-compose-in { width: 100%; height: 44px; font-size: 15px; border-radius: 10px; }
.tk-compose-chips { display: flex; gap: 5px; flex-wrap: wrap; min-height: 6px; margin: 8px 2px 0; }
.tk-chip { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); animation: tk-pop .15s both; }
.tk-chip.due { background: var(--ok-soft); color: var(--ok); } .tk-chip.pri { background: var(--warn-soft); color: var(--warn); } .tk-chip.grp, .tk-chip.st { background: var(--soft); color: var(--ink-2); }
.tk-compose-hint { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.tk-compose-hint kbd { margin-right: 3px; }

/* ── The drawer ── */
.tk-drawer-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0); transition: background .22s; }
.tk-drawer-wrap.on { background: rgba(0,0,0,.38); }
.tk-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2); box-shadow: var(--shadow-lg); color: var(--ink);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.tk-drawer-wrap.on .tk-drawer { transform: none; }
.tk-dr-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tk-steps { display: flex; gap: 0; border-radius: 10px; background: var(--soft); padding: 3px; }
.tk-steps button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; font-weight: 600; transition: background .15s, color .15s; }
.tk-steps button i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; }
.tk-steps button.past { color: var(--ink-2); } .tk-steps button.past i { background: currentColor; }
.tk-steps button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tk-steps button.on.s-doing { color: var(--accent-text); } .tk-steps button.on.s-waiting { color: var(--warn); } .tk-steps button.on.s-done { color: var(--ok); }
.tk-steps button.on i { background: currentColor; }
.tk-steps button:disabled { cursor: default; }
.tk-icon { height: 32px; min-width: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 12.5px; }
.tk-icon:hover { background: var(--soft); color: var(--ink); }
.tk-icon .i { width: 17px; height: 17px; }
[data-dr-ask] { color: var(--accent-text); }
.tk-dr-body { flex: 1; overflow: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 16px; }
.tk-dr-title { width: 100%; resize: none; overflow: hidden; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; border: 1px solid transparent !important; background: transparent !important; box-shadow: none !important; padding: 4px 6px !important; margin: 0 -6px; border-radius: 8px; color: var(--ink); }
.tk-dr-title:not(:disabled):hover { border-color: var(--line) !important; }
.tk-dr-title:focus { border-color: var(--accent) !important; }
.tk-props { display: flex; flex-direction: column; gap: 4px; }
.tk-prop-r { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; min-height: 36px; }
.tk-prop-r > span { font-size: 12.5px; color: var(--muted); }
.tk-prop-r > button, .tk-dueset > button:first-child { display: inline-flex; align-items: center; gap: 8px; justify-self: start; height: 32px; padding: 0 10px 0 6px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.tk-prop-r > button:not(:disabled):hover, .tk-dueset > button:first-child:not(:disabled):hover { background: var(--soft); border-color: var(--line); }
.tk-dueset { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tk-dueset > button:first-child { padding-left: 10px; font-weight: 600; }
.tk-dueset > button.late { color: var(--bad); }
.tk-dueset small { color: var(--muted); font-weight: 400; }
.tk-mini-chip { height: 26px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 11.5px; }
.tk-mini-chip:hover, .tk-mini-chip.on { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.tk-pris { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-pris .tk-pri { height: 28px; padding: 0 10px; cursor: pointer; opacity: .55; border: 1px solid transparent; transition: opacity .12s; }
.tk-pris .tk-pri.on { opacity: 1; border-color: currentColor; }
.tk-pris .tk-pri:not(:disabled):hover { opacity: 1; }
.tk-from { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; }
.tk-from .i { width: 14px; height: 14px; color: var(--muted); }
.tk-dr-detail { width: 100%; min-height: 76px; resize: none; overflow: hidden; border-radius: 10px; line-height: 1.5; }
.tk-note { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 9px 12px; }
.tk-wa h4, .tk-act h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tk-wa h4 .i { width: 14px; height: 14px; }
.tk-wa { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--soft); }
.tk-bub { align-self: flex-start; max-width: 88%; display: flex; flex-direction: column; gap: 2px; padding: 7px 10px 6px; border-radius: 4px 12px 12px 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.tk-bub b { font-size: 11.5px; color: var(--accent-text); }
.tk-bub span { white-space: pre-wrap; line-height: 1.45; }
.tk-bub time { align-self: flex-end; font-size: 10.5px; color: var(--muted); }
.tk-bub.me { align-self: flex-end; border-radius: 12px 4px 12px 12px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.tk-bub.it { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink); }
.tk-noteadd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-noteadd input { flex: 1; height: 36px; border-radius: 99px; padding: 0 14px; }
.tk-tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tk-tl li { position: relative; display: flex; gap: 12px; padding: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.tk-tl li::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.tk-tl li:last-child::before { display: none; }
.tk-tl li > i { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--line-2); }
.tk-tl li.k-status > i { background: var(--accent); } .tk-tl li.k-note > i { background: var(--warn); } .tk-tl li.k-open > i { background: var(--ok); } .tk-tl li.k-assign > i { background: var(--accent-deep, var(--accent)); }
.tk-tl b { color: var(--ink); font-weight: 600; }
.tk-tl time { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.tk-notetxt { display: block; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--ink); white-space: pre-wrap; }

/* ── Ask AI panel ── */
.tk-ai { position: fixed; z-index: 1100; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line-2)); box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; transition: opacity .2s, transform .24s cubic-bezier(.2,.8,.2,1); }
.tk-ai.on { opacity: 1; transform: none; pointer-events: auto; }
.tk-ai-h { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.tk-ai-h small { display: block; font-size: 11.5px; color: var(--muted); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ai-orb { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; flex: none;
  background: conic-gradient(from 200deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--gold, var(--warn))), var(--accent-deep, var(--accent)), var(--accent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.tk-ai-orb .i { width: 17px; height: 17px; }
.tk-ai-orb.big { width: 52px; height: 52px; border-radius: 16px; animation: tk-float 3s ease-in-out infinite; } .tk-ai-orb.big .i { width: 26px; height: 26px; }
.tk-ai-orb.sm { width: 24px; height: 24px; border-radius: 7px; } .tk-ai-orb.sm .i { width: 13px; height: 13px; }
@keyframes tk-float { 50% { transform: translateY(-4px); } }
.tk-ai-b { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tk-ai-hello { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 0 20px; }
.tk-ai-hello b { color: var(--ink); font-size: 16px; }
.tk-ai-q { align-self: flex-end; max-width: 85%; padding: 9px 12px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 13.5px; white-space: pre-wrap; animation: tk-in .2s both; }
.tk-ai-a { align-self: flex-start; max-width: 94%; padding: 11px 13px; border-radius: 14px 14px 14px 4px; background: var(--soft); color: var(--ink); font-size: 13.5px; line-height: 1.5; animation: tk-in .25s both; }
.tk-ai-a.wait { display: flex; gap: 5px; padding: 14px 16px; }
.tk-ai-a.wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: tk-dot 1s infinite ease-in-out; }
.tk-ai-a.wait i:nth-child(2) { animation-delay: .15s; } .tk-ai-a.wait i:nth-child(3) { animation-delay: .3s; }
@keyframes tk-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.tk-ref { display: inline; padding: 0 6px; margin: 0 1px; border-radius: 6px; border: 0; background: var(--accent-soft); color: var(--accent-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tk-ai-tasks { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.tk-ai-tasks button { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font-size: 12.5px; }
.tk-ai-tasks button span:not(.tk-due) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-ai-tasks button:hover { border-color: var(--line-2); }
.tk-ai-ch { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.tk-ai-ch h5 { margin: 0 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tk-ai-c { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; }
.tk-ai-c > span { flex: 1; min-width: 0; }
.tk-ai-c small { display: block; color: var(--muted); margin-top: 2px; }
.tk-chg { color: var(--accent-text); font-weight: 600; }
.tk-ai-c button, .tk-ai-all { height: 28px; padding: 0 11px; border-radius: 8px; border: 0; background: var(--accent); color: var(--accent-ink, #fff); font-weight: 600; cursor: pointer; font-size: 12px; }
.tk-ai-all { align-self: flex-end; margin-top: 2px; }
.tk-ai-c.done { opacity: .55; } .tk-ai-c em { color: var(--ok); } .tk-ai-c em .i { width: 16px; height: 16px; }
.tk-ai-sug { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: none; }
.tk-ai-sug button { flex: none; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 12px; }
.tk-ai-sug button:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--accent-text); }
.tk-ai-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.tk-ai-in textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; border-radius: 12px; padding: 10px 12px; line-height: 1.4; }
.tk-ai-in .btn { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 12px; }

/* ── From the groups ── */
.tk-inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.tk-queue { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 290px); overflow: auto; padding-right: 2px; }
.tk-qi { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.tk-qi b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-qi small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
.tk-qi .tk-conf { grid-column: 1 / -1; width: 100%; }
.tk-qi:hover { border-color: var(--line-2); }
.tk-qi.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-op { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: 6px; padding: 2px 7px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.tk-op.close { background: var(--ok-soft); color: var(--ok); } .tk-op.update { background: var(--warn-soft); color: var(--warn); } .tk-op.reopen { background: var(--bad-soft); color: var(--bad); }
.tk-conf { display: inline-block; width: 70px; height: 5px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.tk-conf i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--warn), var(--ok)); }
.tk-review { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: tk-in .25s both; transition: transform .24s, opacity .24s; }
.tk-review.yes { transform: translateX(40px) rotate(1.5deg); opacity: 0; } .tk-review.no { transform: translateX(-40px) rotate(-1.5deg); opacity: 0; }
.tk-rv-h { display: flex; align-items: center; gap: 8px; } .tk-rv-h small { color: var(--muted); font-size: 12px; }
.tk-rv-title { width: 100%; resize: none; overflow: hidden; font-size: 20px; font-weight: 700; line-height: 1.3; border: 1px solid transparent !important; background: transparent !important; box-shadow: none !important; padding: 4px 6px !important; margin: 0 -6px; border-radius: 8px; color: var(--ink); }
.tk-rv-title:hover, .tk-rv-title:focus { border-color: var(--line-2) !important; }
.tk-rv-title.ro { padding: 0 !important; margin: 0; }
.tk-rv-was { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-rv-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tk-rv-props label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.tk-why { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.tk-why .i { width: 14px; height: 14px; color: var(--accent-text); }
.tk-rv-a { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.tk-rv-a .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; }
.tk-rv-a kbd { opacity: .75; }
.tk-keys { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.tk-qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.tk-qc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); animation: tk-in .25s both; transition: opacity .2s, transform .2s; }
.tk-qc.gone { opacity: 0; transform: scale(.97); }
.tk-qc-h { display: flex; gap: 10px; align-items: flex-start; } .tk-qc-h b { font-size: 14px; line-height: 1.4; }
.tk-qc .tk-bub { max-width: 100%; }
.tk-qc-a { display: flex; gap: 6px; align-items: center; } .tk-qc-a input { flex: 1; min-width: 0; height: 34px; }

/* ── Groups ── */
.tk-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tk-gc { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); animation: tk-in .25s both; }
.tk-gc.in { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.tk-gc-h { display: flex; align-items: center; gap: 12px; } .tk-gc-h small { display: block; font-size: 12px; color: var(--muted); }
.tk-gc.in .tk-gc-h small { color: var(--ok); }
.tk-shield { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); flex: none; }
.tk-gc.in .tk-shield { background: var(--ok-soft); color: var(--ok); }
.tk-shield .i { width: 20px; height: 20px; }
.tk-keys3 { display: flex; flex-direction: column; gap: 5px; }
.tk-keys3 span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.tk-keys3 span .i { width: 15px; height: 15px; padding: 2px; border-radius: 50%; }
.tk-keys3 .ok .i { color: var(--ok); background: var(--ok-soft); } .tk-keys3 .no .i { color: var(--bad); background: var(--bad-soft); }
.tk-keys3 em { font-style: normal; }
.tk-gc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-gc-stats > div { padding: 8px 10px; border-radius: 10px; background: var(--soft); }
.tk-gc-stats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; } .tk-gc-stats b.warn { color: var(--warn); }
.tk-gc-stats small { font-size: 11px; color: var(--muted); }
.tk-gc-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-stack-av { display: flex; } .tk-stack-av .tk-av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); } .tk-stack-av .tk-av:first-child { margin-left: 0; }
.btn.spin .i { animation: tk-spin .8s linear infinite; } @keyframes tk-spin { to { transform: rotate(360deg); } }
.btn .i { width: 15px; height: 15px; }
.tk-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.tk-set { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tk-set h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; } .tk-set h3 .i { width: 16px; height: 16px; color: var(--accent-text); }
.tk-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); user-select: none; }
.tk-sw.big { align-items: flex-start; gap: 12px; }
.tk-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.tk-sw > i { position: relative; flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); transition: background .18s; }
.tk-sw > i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.tk-sw input:checked + i { background: var(--ok); } .tk-sw input:checked + i::after { transform: translateX(14px); }
.tk-sw input:focus-visible + i { box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-sw input:disabled + i { opacity: .4; }
.tk-sw.big span b { display: block; color: var(--ink); font-size: 13.5px; } .tk-sw.big small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.45; }
.tk-num { font-size: 13px; color: var(--ink-2); } .tk-num input { width: 70px; margin: 0 6px; }
.tk-follow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-left: 46px; transition: opacity .2s; } .tk-follow.off { opacity: .45; pointer-events: none; }
.tk-follow label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.tk-daypick { display: flex; gap: 4px; }
.tk-daypick button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 12px; }
.tk-daypick button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }

/* ── Empty, snackbar ── */
.tk-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 54px 16px; text-align: center; color: var(--muted); font-size: 13px; border: 1.5px dashed var(--line); border-radius: 18px; }
.tk-empty b { color: var(--ink); font-size: 15px; }
.tk-empty-art { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; margin-bottom: 6px; background: var(--ok-soft); color: var(--ok); animation: tk-float 3s ease-in-out infinite; }
.tk-empty-art .i { width: 26px; height: 26px; }
.tk-snack { position: fixed; z-index: 1300; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .2s; max-width: calc(100vw - 32px); }
.tk-snack span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-snack.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.tk-snack button { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 6px; filter: brightness(1.4); }

/* ── Phones and tablets ── */
@media (max-width: 1100px) {
  .tk-mine { grid-template-columns: 1fr; }
  .tk-focus { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .tk-focus-ring { flex: none; } .tk-focus-ring svg { width: 84px; height: 84px; } .tk-focus-ring b { font-size: 22px; }
  .tk-next, .tk-focus-ai { flex: 1 1 220px; }
  .tk-inbox { grid-template-columns: 1fr; } .tk-queue { flex-direction: row; overflow-x: auto; max-height: none; } .tk-qi { flex: 0 0 240px; }
}
@media (max-width: 900px) {
  .tk-pulse { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-left: -2px; padding: 2px; }
  .tk-k { scroll-snap-align: start; }
  .tk-cols { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 8px; }
  .tk-cols .tk-col { flex: 0 0 82%; scroll-snap-align: center; }
  .tk-lane-h { grid-template-columns: auto 1fr; } .tk-load { grid-column: 1 / -1; }
  .tk-qa { opacity: 1; transform: none; pointer-events: auto; position: static; align-self: flex-start; box-shadow: none; }
  .tk-askbtn kbd, .tk-newbtn kbd, .tk-search kbd, .tk-rv-a kbd, .tk-keys { display: none; }
}
@media (max-width: 600px) {
  .tk-search { flex: 1 1 100%; min-width: 0; order: -1; }
  .tk-askbtn span { display: none; }
  .tk-week { gap: 4px; } .tk-day { padding: 8px 0; } .tk-day b { font-size: 16px; }
  .tk-row { flex-wrap: wrap; } .tk-row-m { width: 100%; justify-content: flex-start; padding-left: 34px; }
  .tk-drawer { width: 100vw; }
  .tk-steps button { padding: 0 8px; font-size: 12px; }
  .tk-prop-r { grid-template-columns: 70px 1fr; }
  .tk-ai { right: 0; bottom: 0; width: 100vw; height: 92vh; border-radius: 20px 20px 0 0; }
  .tk-qs, .tk-groups, .tk-sets { grid-template-columns: 1fr; }
  .tk-follow { padding-left: 0; }
  .tk-closed-h { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-card, .tk-row, .tk-review, .tk-qc, .tk-gc, .tk-spark i, .tk-bar-c i, .tk-ai-orb.big, .tk-empty-art, .tk-beat, .tk-chip, .tk-pop { animation: none !important; }
  .tk-drawer, .tk-ai, .tk-snack { transition: none; }
}

/* Floating layers sit on a solid base, whatever the theme's surface alpha */
.tk-drawer, .tk-ai { background: linear-gradient(var(--surface), var(--surface)), var(--bg); }
.tk-from { padding-left: 6px; }
.tk-dueset > button:first-child { padding-left: 6px; }

/* Tasks → Groups: the picker of the groups Tasks works in */
.tk-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tk-pick-h { display: flex; flex-direction: column; gap: 2px; padding-right: 18px; border-right: 1px solid var(--line); }
.tk-pick-h small { color: var(--muted); font-size: 11.5px; }
.tk-pick .tk-sw { font-size: 13px; color: var(--ink); }
.tk-pick-out { font-style: normal; font-size: 11px; color: var(--warn); }
.tk-tool .btn.on { border-color: var(--accent); color: var(--accent-text, var(--ink)); }
/* The Task groups wall (Nov 2026): what the whole group may hear */
.tk-floor { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); }
.tk-floor .i { width: 18px; height: 18px; flex: none; }
.tk-floor b { display: block; font-size: 12.5px; color: var(--ink); } .tk-floor small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.tk-floor.shut { background: var(--bad-soft); color: var(--bad); }

/* Duplicates (Nov 2026): the same work twice on the list → one task */
.tk-dupes { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 24px; max-width: 920px; }
.tk-dupes-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--card, var(--bg-2)); border: 1px solid var(--line); }
.tk-dupes-h > div { flex: 1; } .tk-dupes-h b { display: block; font-size: 14px; } .tk-dupes-h span { font-size: 12px; color: var(--muted); }
.tk-dupe { border: 1px solid var(--line); border-left: 3px solid var(--warn, #e0a030); border-radius: 12px; padding: 10px 12px; background: var(--card, var(--bg-2)); display: flex; flex-direction: column; gap: 6px; }
.tk-dupe.sure { border-left-color: var(--ok); }
.tk-dupe-top { display: flex; gap: 8px; align-items: center; font-size: 11.5px; }
.tk-dupe-tag { font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--warn-soft, rgba(224,160,48,.15)); color: var(--warn, #c88a1a); }
.tk-dupe.sure .tk-dupe-tag { background: var(--ok-soft); color: var(--ok); }
.tk-dupe-g { color: var(--muted); } .tk-dupe-warn { color: var(--bad); font-weight: 600; }
.tk-dupe-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.tk-dupe-row:hover { background: var(--hover, rgba(127,127,127,.08)); }
.tk-dupe-row:has(input:checked) { background: var(--accent-soft, rgba(127,127,127,.12)); }
.tk-dupe-t { flex: 1; min-width: 0; } .tk-dupe-t b { display: block; font-size: 13px; font-weight: 600; } .tk-dupe-t small { color: var(--muted); font-size: 11.5px; }
.tk-dupe-open { font-size: 11.5px; color: var(--accent-text); background: none; border: 0; cursor: pointer; }
.tk-dupe-act { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.tk-dupe-act select { height: 30px; } .tk-dupe-act .grow { flex: 1; }

/* ── More than one person on a task (Nov 2026) ── */
.tk-card .tk-stack-av .tk-av { box-shadow: 0 0 0 2px var(--surface); }
.tk-whomenu { min-width: 240px; }
.tk-whohint { font-size: 11px; color: var(--muted); padding: 0 6px 6px; }
.tk-whomenu .tk-tick { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); color: transparent; flex: none; font-style: normal; }
.tk-whomenu .tk-tick .i { width: 12px; height: 12px; }
.tk-whomenu button.on .tk-tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.tk-whomenu button em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; color: var(--muted); border: 1px solid var(--line); visibility: hidden; }
.tk-whomenu button.on em { visibility: visible; }
.tk-whomenu button.on:not(.lead) em:hover { color: var(--ink); border-color: var(--line-2); }
.tk-whomenu button.lead em { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.tk-menu-f { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.tk-menu-f button { width: auto !important; }
.tk-menu-f .tk-btn-pri { background: var(--accent) !important; color: #fff !important; font-weight: 600; padding: 6px 14px !important; }
