/* public/assets/task/task-page.css — the task page
   ---------------------------------------------------------------------------
   One elevated paper (.tkPaper, a .ct-paper) painted by the link's look: every
   colour inside it is a --look-* variable (ct-looks.css), so a Blueprint list
   is navy with white type on the page as on the card, and the default look
   resolves to the site tokens (light and dark). It is deliberately NOT a
   .section-card: that class's site background would sit under a dark look's
   light type. Rows are the same markup on the server and the client
   (tasklink-view-core.js). Phone first: 16px inputs (no iOS zoom), 44px
   targets, one scroller, nothing sideways. */

.tkPaper {
  /* Urgency colours, pulled toward the look's ink so they read on light and
     dark papers alike. */
  --tk-rose: color-mix(in oklab, #d42a6c 80%, var(--look-head));
  --tk-rose-soft: color-mix(in srgb, #c8336f 14%, transparent);
  --tk-amber: color-mix(in oklab, #b87306 80%, var(--look-head));
  --tk-amber-soft: color-mix(in srgb, #c07d0b 16%, transparent);
  /* Small type needs 4.5:1; a look's own muted and accent tints are tuned for
     30px card type, so the page pulls them toward the ink. */
  --tk-muted: color-mix(in oklab, var(--look-muted) 72%, var(--look-head));
  --tk-accent: color-mix(in oklab, var(--look-accent-text) 76%, var(--look-head));
  --tk-ring: color-mix(in srgb, var(--look-head) 26%, transparent);
  --tk-hover: color-mix(in srgb, var(--look-head) 4.5%, transparent);
  --tk-soft: color-mix(in srgb, var(--look-mark) 13%, transparent);
  --ct-paper-pad-top: 18px;
  position: relative;
  margin: 14px 0 0;
  padding: 18px 16px 10px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--look-border);
  background-color: var(--look-paper);
  color: var(--look-text);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* The generic paper spine reads as a stray bar beside a task list. */
.tkPaper.ct-paper::before { display: none; }
.tkPaper .sr-only, .tkSheet .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tkPaper .tkIc { width: 1em; height: 1em; flex-shrink: 0; display: block; }
.tkPaper p { margin: 0; }
.tkPaper button { font-family: inherit; }

/* ---- Summary: ring · where things stand · the crew ---- */
.tkSummary { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.tkDial { position: relative; width: 56px; height: 56px; }
.tkDialSvg { width: 56px; height: 56px; display: block; }
.tkDialTrack { fill: none; stroke: var(--look-track); stroke-width: 6; }
.tkDialFill { fill: none; stroke: var(--look-bar); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray var(--t-slow); }
.tkDialPct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .86rem; font-weight: 800; color: var(--look-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tkDialPct small { font-size: .62rem; font-weight: 700; margin-left: 1px; opacity: .7; }
.tkSumText { min-width: 0; }
.tkProgText { font-size: 1.12rem; font-weight: 800; color: var(--look-head); letter-spacing: -.02em; line-height: 1.2; }
.tkSumSub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px !important; font-size: .8rem; color: var(--tk-muted); }
.tkFact { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 750; background: var(--tk-soft); color: var(--tk-accent); }
.tkFact::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tkFact.is-overdue { background: var(--tk-rose-soft); color: var(--tk-rose); }
.tkFact[hidden], .tkOpen[hidden] { display: none; }
.tkOpen { font-weight: 650; color: var(--look-text); }
.tkUpdated { white-space: nowrap; }
.tkCrew { display: flex; align-items: center; padding-left: 8px; }
.tkCrew:empty { display: none; }
.tkCrew .tkAv { width: 30px; height: 30px; font-size: .7rem; margin-left: -8px; box-shadow: 0 0 0 2.5px var(--look-paper); }
.tkActivity { margin-top: 12px !important; font-size: .8rem; color: var(--tk-muted); display: flex; align-items: center; gap: 6px; }
.tkActivity::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--look-bar); box-shadow: 0 0 0 3px var(--tk-soft); flex-shrink: 0; }
.tkActivity[hidden] { display: none; }

/* ---- Avatars: one colour per person, the same everywhere ---- */
.tkAv {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: #067a5d; line-height: 1;
}
.tkAv[data-c="1"] { background: #1d6fd6; }
.tkAv[data-c="2"] { background: #6d4bd8; }
.tkAv[data-c="3"] { background: #c23b7a; }
.tkAv[data-c="4"] { background: #d4543b; }
.tkAv[data-c="5"] { background: #a86e08; }
.tkAv--more { background: var(--look-code-bg); color: var(--look-head); }
.tkAv--open { background: transparent; color: var(--tk-accent); box-shadow: inset 0 0 0 1.5px currentColor; }
.tkAv--open .tkIc { width: 55%; height: 55%; }
.tkAv--lg { width: 34px; height: 34px; font-size: .78rem; }

/* ---- Composer ---- */
.tkAdd { margin: 16px 0 0; }
.tkAddRow {
  display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px;
  border: 1px solid var(--look-ring); border-radius: 14px; background: var(--look-code-bg);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.tkAddRow:focus-within { border-color: var(--look-mark); box-shadow: 0 0 0 4px var(--look-track); background: var(--look-paper); }
.tkAddIco { width: 20px; height: 20px; color: var(--tk-muted); flex-shrink: 0; font-size: 20px; }
.tkAddRow:focus-within .tkAddIco { color: var(--tk-accent); }
.tkPaper .tkAddInput {
  flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; outline: none;
  padding: 9px 0; margin: 0; font-size: 16px; line-height: 1.3; color: var(--look-head); -webkit-text-fill-color: var(--look-head); border-radius: 0;
}
.tkPaper .tkAddInput::placeholder { color: var(--tk-muted); -webkit-text-fill-color: var(--tk-muted); opacity: 1; }
.tkPaper .tkAddInput:focus { border: 0; box-shadow: none; outline: none; }
.tkAddBtn {
  all: unset; box-sizing: border-box; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  display: grid; place-items: center; font-size: 18px; background: var(--look-mark); color: var(--look-box-check);
  opacity: .32; transition: opacity var(--t), transform var(--t-fast);
}
.tkAddRow.has-text .tkAddBtn { opacity: 1; }
.tkAddBtn:active { transform: scale(.94); }
.tkAddBtn:focus-visible { outline: 2px solid var(--look-mark); outline-offset: 2px; }
.tkAddHint { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0 0 4px; font-size: .76rem; color: var(--tk-muted); }
.tkAddHint:empty { display: none; }
.tkAddHint .tkChip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--tk-soft); color: var(--tk-accent); font-weight: 650; }
.tkAddHint .tkChip--section { background: var(--look-code-bg); color: var(--look-head); }
.tkAddHint .tkChip--tip { background: transparent; color: var(--tk-muted); font-weight: 500; padding: 0; }
.tkAddHint kbd { font: inherit; font-weight: 700; color: var(--look-text); padding: 1px 5px; border-radius: 5px; background: var(--look-code-bg); border: 1px solid var(--look-ring); }

/* ---- Tools: the view switch, then who you are and Only mine ---- */
.tkTools { margin: 16px 0 6px; }
.tkSegs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px;
  border-radius: 12px; background: var(--look-code-bg); border: 1px solid var(--look-ring);
}
.tkSeg {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  padding: 8px 4px; border-radius: 9px; font-size: .82rem; font-weight: 650; color: var(--tk-muted); white-space: nowrap;
  transition: background var(--t), color var(--t), box-shadow var(--t); -webkit-tap-highlight-color: transparent;
}
.tkSeg .tkIc { font-size: 16px; }
.tkSeg:hover { color: var(--look-head); }
.tkSeg[aria-selected="true"] { background: var(--look-paper); color: var(--look-head); box-shadow: 0 1px 2px rgba(14, 31, 26, .08), 0 0 0 1px var(--look-ring); }
.tkSeg[aria-selected="true"] .tkIc { color: var(--tk-accent); }
.tkSeg:focus-visible { outline: 2px solid var(--look-mark); outline-offset: 1px; }
.tkFilters { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.tkWho {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; min-width: 0;
  padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--look-ring); -webkit-tap-highlight-color: transparent;
  transition: background var(--t), border-color var(--t);
}
.tkWho:hover { background: var(--tk-hover); }
.tkWho:focus-visible { outline: 2px solid var(--look-mark); outline-offset: 2px; }
.tkWho .tkAv { width: 30px; height: 30px; font-size: .7rem; }
.tkAv--me { background: transparent; color: var(--tk-muted); box-shadow: inset 0 0 0 1.5px var(--tk-ring); }
.tkAv--me .tkIc { width: 55%; height: 55%; }
.tkWhoText { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tkWhoLabel { font-size: .68rem; font-weight: 600; color: var(--tk-muted); }
.tkWhoName { font-size: .86rem; font-weight: 700; color: var(--look-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.tkWho:not(.is-set) .tkWhoName { color: var(--tk-accent); }
.tkMine {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 7px 4px;
  font-size: .84rem; font-weight: 650; color: var(--look-text); -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.tkMine[hidden] { display: none; }
.tkMineKnob { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--tk-ring); transition: background var(--t); flex-shrink: 0; }
.tkMineKnob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t); }
.tkMine[aria-pressed="true"] .tkMineKnob { background: var(--look-mark); }
.tkMine[aria-pressed="true"] .tkMineKnob::after { transform: translateX(14px); }
.tkMine:focus-visible { outline: 2px solid var(--look-mark); outline-offset: 2px; border-radius: 8px; }

/* ---- Rows ---- */
.tkPaper .tkList, .tkSheet .tkSubList { list-style: none; margin: 0; padding: 0; }
/* ui.css gives every li in a section card an accent dot and a left inset. */
.tkPaper .tkList > li { position: relative; padding: 0; margin: 0; line-height: inherit; }
.tkPaper .tkList > li::before { content: none; display: none; }
.tkPaper .tkRow {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; align-items: start; gap: 0 2px;
  padding: 4px 0; border-radius: 12px; transition: background var(--t-fast), opacity var(--t);
}
.tkPaper .tkList > .tkRow + .tkRow::after { content: ""; position: absolute; left: 46px; right: 8px; top: 0; height: 1px; background: var(--look-rule); }
.tkPaper .tkRow:hover { background: var(--tk-hover); }
.tkPaper .tkRow:hover + .tkRow::after, .tkPaper .tkRow:hover::after { opacity: 0; }
.tkRow.is-saved { background: var(--tk-soft); }
.tkRow.is-dragging { opacity: .45; }
.tkRow.is-over { box-shadow: inset 0 2px 0 var(--look-mark); }
.tkTick {
  all: unset; box-sizing: border-box; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.tkTick:disabled { cursor: default; }
.tkTick:focus-visible { outline: 2px solid var(--look-mark); outline-offset: -4px; }
.tkRing {
  width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--tk-ring);
  display: grid; place-items: center; color: var(--look-box-check); font-size: 14px;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.tkRing .tkIc { opacity: 0; transform: scale(.5); transition: opacity var(--t-fast), transform var(--t-fast); }
.tkTick:not(:disabled):hover .tkRing { border-color: var(--look-box); background: var(--tk-soft); }
.tkTick:not(:disabled):hover .tkRing .tkIc { opacity: .5; transform: scale(1); color: var(--look-box); }
.tkTick:active .tkRing { transform: scale(.88); }
.tkRow[data-status="todo"]:has(.tkPr--high) .tkRing { border-color: var(--tk-rose); }
.tkRow[data-status="todo"]:has(.tkPr--med) .tkRing { border-color: var(--tk-amber); }
.tkRow.isDone .tkRing { background: var(--look-box); border-color: var(--look-box); }
.tkRow.isDone .tkRing .tkIc, .tkRow.isDone .tkTick:hover .tkRing .tkIc { opacity: 1; transform: scale(1); color: var(--look-box-check); }
.tkRow.isDoing .tkRing { border-color: var(--look-box); background: conic-gradient(var(--look-box) 0 50%, transparent 50% 100%); }
.tkRow.isBlocked .tkRing { border-color: var(--tk-rose); background: linear-gradient(135deg, transparent 44%, var(--tk-rose) 44% 56%, transparent 56%); }
.tkRow.is-ticking .tkRing { animation: tkPop .36s cubic-bezier(.22, 1, .36, 1); }
@keyframes tkPop { 0% { transform: scale(.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tkMain { min-width: 0; padding: 11px 4px 10px 2px; cursor: pointer; border-radius: 8px; outline: none; }
.tkMain:focus-visible { box-shadow: 0 0 0 2px var(--look-mark); }
.tkText { display: block; font-size: .98rem; line-height: 1.38; font-weight: 550; color: var(--look-head); overflow-wrap: anywhere; }
.tkRow.isDone .tkText { color: var(--tk-muted); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--tk-muted) 55%, transparent); }
.tkMeta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: .78rem; line-height: 1.2; color: var(--tk-muted); }
.tkMeta > * { display: inline-flex; align-items: center; gap: 5px; }
.tkMeta .tkIc { font-size: 14px; }
.tkOwner { font-weight: 650; color: var(--look-text); }
.tkOwner .tkAv { width: 20px; height: 20px; font-size: .56rem; }
.tkOwnerName { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkDue { font-weight: 600; }
.tkDue.is-week { color: var(--look-text); }
.tkDue.is-soon, .tkDue.is-today { color: var(--tk-accent); font-weight: 700; }
.tkDue.is-overdue { color: var(--tk-rose); font-weight: 700; }
/* The look's faint ink is decoration, not type (2.3:1 on Paper, Warm, Candy):
   a done date and "Done by" read in the derived muted ink, set lighter. */
.tkDue.is-done { color: var(--tk-muted); font-weight: 500; }
.tkPr { font-weight: 700; }
.tkPr--high { color: var(--tk-rose); }
.tkPr--med { color: var(--tk-amber); }
.tkTag { padding: 3px 8px; border-radius: 6px; font-size: .7rem; font-weight: 750; letter-spacing: .01em; }
.tkTag.is-doing { background: var(--tk-soft); color: var(--tk-accent); }
.tkTag.is-blocked { background: var(--tk-rose-soft); color: var(--tk-rose); }
.tkSub.is-all { color: var(--tk-accent); }
.tkDoneBy { color: var(--tk-muted); font-weight: 500; }
.tkClaim {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .76rem; font-weight: 750;
  color: var(--tk-accent); background: var(--tk-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--look-mark) 35%, transparent);
  -webkit-tap-highlight-color: transparent; transition: background var(--t-fast);
}
.tkClaim:hover { background: color-mix(in srgb, var(--look-mark) 22%, transparent); }
.tkClaim:focus-visible { outline: 2px solid var(--look-mark); outline-offset: 2px; }
.tkClaim--static { cursor: default; }
.tkMore {
  all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  color: var(--tk-muted); font-size: 20px; -webkit-tap-highlight-color: transparent; transition: color var(--t-fast), background var(--t-fast), opacity var(--t-fast);
}
.tkMore:hover { color: var(--look-head); background: var(--tk-hover); }
.tkMore:focus-visible { outline: 2px solid var(--look-mark); outline-offset: -4px; opacity: 1; }
@media (hover: hover) { .tkRow .tkMore { opacity: .4; } .tkRow:hover .tkMore { opacity: 1; } }

/* Section and date headings */
.tkPaper .tkHead, .tkPaper .tkBand { display: flex; align-items: center; gap: 8px; padding: 20px 6px 6px; }
.tkPaper .tkList > .tkHead:first-child, .tkPaper .tkList > .tkBand:first-child { padding-top: 8px; }
.tkHeadText { font-weight: 800; font-size: .84rem; color: var(--look-head); letter-spacing: -.005em; border-radius: 6px; cursor: text; }
.tkHeadCount, .tkBandCount { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tkBandCount { padding: 2px 8px; border-radius: 999px; background: var(--look-code-bg); }
.tkBandDot { width: 8px; height: 8px; border-radius: 50%; background: var(--tk-ring); flex-shrink: 0; }
.tkBandText { font-weight: 800; font-size: .84rem; color: var(--look-head); }
.tkBand--overdue .tkBandDot { background: var(--tk-rose); box-shadow: 0 0 0 3px var(--tk-rose-soft); }
.tkBand--overdue .tkBandText { color: var(--tk-rose); }
.tkBand--today .tkBandDot { background: var(--look-bar); box-shadow: 0 0 0 3px var(--tk-soft); }
.tkBand--today .tkBandText { color: var(--tk-accent); }
.tkBand--tomorrow .tkBandDot { background: var(--look-bar); }
.tkBand--nodate .tkBandText, .tkBand--later .tkBandText { color: var(--tk-muted); }

/* Empty and all-done */
.tkPaper .tkEmpty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 34px 16px 30px; }
.tkEmptyIc { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--look-code-bg); color: var(--tk-muted); font-size: 24px; margin-bottom: 8px; }
.tkEmpty--alldone .tkEmptyIc { background: var(--tk-soft); color: var(--tk-accent); }
.tkEmptyTitle { font-size: .98rem; font-weight: 750; color: var(--look-head); }
.tkEmptySub { font-size: .84rem; color: var(--tk-muted); }
.tkPaper .tkEmpty--tile, .tkPaper .tkEmpty--col { display: block; text-align: left; padding: 8px 12px 12px; font-size: .84rem; color: var(--look-faint); }

/* Done fold */
.tkDone { margin-top: 6px; border-top: 1px solid var(--look-rule); }
.tkDoneSum {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 6px 10px;
  font-weight: 700; font-size: .84rem; color: var(--tk-muted); user-select: none; -webkit-tap-highlight-color: transparent;
}
.tkDoneSum::-webkit-details-marker { display: none; }
.tkDoneSum > .tkIc { font-size: 17px; color: var(--tk-accent); }
.tkDoneChev { display: inline-grid; font-size: 14px; transition: transform var(--t); }
.tkDone[open] .tkDoneChev { transform: rotate(90deg); }
.tkDoneSum:hover { color: var(--look-head); }
.tkDoneSum:focus-visible { outline: 2px solid var(--look-mark); outline-offset: -2px; border-radius: 8px; }

/* People: one group per person */
.tkTiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 4px; }
.tkTile { border: 1px solid var(--look-surface-line); border-radius: 16px; background: var(--look-surface); padding: 14px 8px 4px; min-width: 0; }
.tkTile.isMine { border-color: var(--look-mark); box-shadow: 0 0 0 1px var(--look-mark); }
.tkTileHead { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.tkTileWho { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.tkTileName { font-weight: 800; font-size: .98rem; color: var(--look-head); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkYou { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--tk-soft); color: var(--tk-accent); font-size: .64rem; font-weight: 800; vertical-align: 2px; }
.tkTileCount { font-size: .76rem; color: var(--tk-muted); font-weight: 600; }
.tkTile--open .tkTileCount { color: var(--tk-accent); }
.tkTilePct { font-size: .8rem; font-weight: 800; color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tkTile .tkBar { height: 5px; border-radius: 999px; background: var(--look-track); overflow: hidden; margin: 12px 6px 6px; }
.tkTile .tkBar > span { display: block; height: 100%; border-radius: 999px; background: var(--look-bar); transition: width var(--t-slow); }
.tkTile .tkRow .tkOwner { display: none; }
.tkTile .tkDone { border-top-color: var(--look-surface-line); }
@media (min-width: 700px) { .tkTiles { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Board: stacked groups on a phone, three columns from 760px */
.tkCols { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 4px; }
.tkCol { border: 1px solid var(--look-surface-line); border-radius: 16px; background: var(--look-surface); padding: 12px 6px 6px; min-width: 0; }
.tkColHead { display: flex; align-items: center; gap: 8px; padding: 0 8px 6px; }
.tkColDot { width: 9px; height: 9px; border-radius: 50%; background: var(--tk-ring); }
.tkCol[data-status="doing"] .tkColDot { background: var(--look-bar); box-shadow: 0 0 0 3px var(--tk-soft); }
.tkCol[data-status="done"] .tkColDot { background: var(--look-box); }
.tkColName { font-weight: 800; font-size: .88rem; color: var(--look-head); }
.tkColCount { margin-left: auto; font-size: .72rem; font-weight: 750; color: var(--tk-muted); background: var(--look-code-bg); padding: 2px 8px; border-radius: 999px; }
.tkCol.is-over { border-color: var(--look-mark); box-shadow: 0 0 0 1px var(--look-mark); }
.tkCol .tkRow .tkTag.is-doing { display: none; }
.tkColAdd {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; margin: 2px 0 4px; padding: 10px 12px; border-radius: 10px;
  color: var(--tk-muted); font-weight: 650; font-size: .84rem; -webkit-tap-highlight-color: transparent;
}
.tkColAdd .tkIc { font-size: 16px; }
.tkColAdd:hover { color: var(--look-head); background: var(--tk-hover); }
.tkColAdd:focus-visible { outline: 2px solid var(--look-mark); outline-offset: -2px; }
@media (min-width: 760px) { .tkCols { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }

/* Live update flash */
.tkPaper.is-live { animation: tkLive 1.2s ease; }
@keyframes tkLive { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--look-mark) 45%, transparent), var(--shadow-soft); } 100% { box-shadow: var(--shadow-soft); } }

.tkHint { margin: 12px 6px 0; font-size: .8rem; }

@media (min-width: 720px) {
  .tkPaper { padding: 24px 24px 14px; }
  .tkSummary { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; }
  .tkDial, .tkDialSvg { width: 64px; height: 64px; }
  .tkProgText { font-size: 1.28rem; }
}
@media (max-width: 380px) {
  .tkPaper { padding: 16px 12px 8px; }
  .tkSeg .tkIc { display: none; }
  .tkCrew .tkAv:nth-child(n+3):not(.tkAv--more) { display: none; }
  .tkOwnerName { max-width: 9ch; }
  .tkWhoName { max-width: 11ch; }
}

/* ---- Sheets and toast (site surfaces, outside the paper) ---- */
.tkSheetBack {
  position: fixed; inset: 0; z-index: 60; background: rgba(14, 31, 26, .45); display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.tkSheetBack[hidden] { display: none; }
.tkSheetBack.is-open { opacity: 1; }
.tkSheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-sizing: border-box; overscroll-behavior: contain;
  background: var(--card); color: var(--text); border-radius: 22px 22px 0 0; padding: 8px 20px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-elevated); transform: translateY(24px); transition: transform .24s cubic-bezier(.22, 1, .36, 1);
  --tk-rose: #b42d68;
}
.tkSheetBack.is-open .tkSheet { transform: translateY(0); }
.tkSheetHandle { display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--ring-strong); margin: 6px auto 14px; }
.tkSheetHead { margin-bottom: 4px; }
.tkSheetTitle { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.015em; }
.tkSheetSub { margin: 3px 0 0; font-size: .82rem; color: var(--muted); }
.tkSheetSub:empty { display: none; }
.tkSheetForm { display: flex; flex-direction: column; gap: 16px; }
.tkField { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.tkFieldLabel { font-size: .76rem; font-weight: 750; color: var(--muted); letter-spacing: .01em; }
.tkSheet input:not([type=checkbox]), .tkSheet select, .tkSheet textarea { font-size: 16px; padding: 11px 12px; margin: 0; border-radius: 10px; }
.tkField--text input { font-size: 1.12rem !important; font-weight: 650; padding: 13px 14px !important; }
.tkField--check { flex-direction: row; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--ring); border-radius: 10px; font-weight: 600; font-size: .9rem; align-self: end; }
.tkField--check input { width: 20px !important; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.tkFieldRow { display: flex; gap: 8px; align-items: stretch; }
.tkFieldRow > input { flex: 1; min-width: 0; }
.tkFieldRow .tkTimeInput { flex: 0 0 34%; }
.tkFieldRow--split { gap: 10px; align-items: end; }
.tkFieldRow--split > .tkField { flex: 1; }
.tkMeBtn, .tkMiniBtn {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; padding: 0 16px; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--ring); font-weight: 700; font-size: .9rem; color: var(--accent); white-space: nowrap;
}
.tkMeBtn:hover, .tkMiniBtn:hover { background: var(--accent-soft); }
.tkMeBtn:focus-visible, .tkMiniBtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Segmented choices (status, priority) */
.tkOpts { display: flex; gap: 6px; flex-wrap: wrap; }
.tkOpts--seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 12px; background: var(--card-soft); border: 1px solid var(--ring); }
.tkOpt {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 650; font-size: .82rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.tkOpt:hover { color: var(--text); }
.tkOpt[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(14, 31, 26, .08), 0 0 0 1px var(--ring); }
.tkOpt[data-status="doing"][aria-pressed="true"], .tkOpt[data-status="done"][aria-pressed="true"] { color: var(--accent); }
.tkOpt[data-status="blocked"][aria-pressed="true"], .tkOpt[data-priority="high"][aria-pressed="true"] { color: var(--tk-rose); }
.tkOpt[data-priority="med"][aria-pressed="true"] { color: #9a6406; }
.tkOpt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Pickable chips (people, date shortcuts) */
.tkPick { display: flex; gap: 6px; flex-wrap: wrap; }
.tkPick:empty { display: none; }
.tkChipBtn, .tkPerson {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--ring); font-size: .84rem; font-weight: 650; color: var(--text); background: var(--card); -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.tkPerson { padding: 4px 12px 4px 4px; }
.tkPerson .tkAv { width: 26px; height: 26px; font-size: .64rem; }
.tkChipBtn:hover, .tkPerson:hover { border-color: var(--ring-strong); }
.tkChipBtn[aria-pressed="true"], .tkPerson[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tkChipBtn:focus-visible, .tkPerson:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tkSheet .tkAv { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: #067a5d; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.tkSheet .tkAv[data-c="1"] { background: #1d6fd6; } .tkSheet .tkAv[data-c="2"] { background: #6d4bd8; } .tkSheet .tkAv[data-c="3"] { background: #c23b7a; } .tkSheet .tkAv[data-c="4"] { background: #d4543b; } .tkSheet .tkAv[data-c="5"] { background: #a86e08; }
/* Steps */
.tkSubList { display: flex; flex-direction: column; gap: 2px; }
.tkSubRow { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; }
.tkSubRow input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.tkSubRow span { flex: 1; font-size: .92rem; }
.tkSubRow.is-done span { text-decoration: line-through; color: var(--muted); }
.tkSubDel { all: unset; cursor: pointer; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.tkSubDel:hover { background: var(--card-soft); color: var(--text); }
.tkSubAdd { display: flex; gap: 8px; }
.tkSubAdd input { flex: 1; min-width: 0; }
.tkSheetActions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px -20px 0; padding: 12px 20px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ring); background: var(--card); }
.tkSheetActions .btn-primary, .tkSheetActions .btn-ghost { width: auto; margin: 0; padding-inline: 20px; }
.tkSheetGrow { flex: 1; }
.tkSheetMore { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-weight: 650; font-size: .86rem; color: var(--muted); }
.tkSheetMore:hover { background: var(--card-soft); color: var(--text); }
.tkSheetMore[hidden] { display: none; }
.tkSheetDanger { color: var(--error); }
.tkWhoChoices { display: flex; gap: 8px; flex-wrap: wrap; }
.tkWhoChoices:empty { display: none; }
.tkWhoChoice {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px;
  border: 1px solid var(--ring); font-weight: 650; font-size: .92rem;
}
.tkWhoChoice .tkAv { width: 30px; height: 30px; font-size: .7rem; }
.tkWhoChoice:hover { border-color: var(--accent); background: var(--accent-soft); }
.tkWhoChoice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.tk-sheet-open { overflow: hidden; }
@media (min-width: 641px) {
  .tkSheetBack { align-items: center; padding: 24px; }
  .tkSheet { border-radius: 22px; transform: translateY(12px) scale(.98); max-height: 88vh; }
  .tkSheetHandle { display: none; }
  .tkSheet { padding-top: 22px; }
}
@media (max-width: 380px) { .tkSheet { padding-left: 16px; padding-right: 16px; } .tkSheetActions { margin: 4px -16px 0; padding-left: 16px; padding-right: 16px; } .tkOpt { font-size: .76rem; } }

.tkToast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 12px);
  display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg);
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-elevated); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
/* The toast never blocks a row under it; only its Undo button takes taps. */
.tkToast.is-open { opacity: 1; transform: translate(-50%, 0); }
.tkToast.is-open .tkToastBtn { pointer-events: auto; }
.tkToast[hidden] { display: none; }
.tkToastBtn { all: unset; cursor: pointer; font-weight: 800; color: var(--mark-b); padding: 4px 8px; border-radius: 8px; }
.tkToastBtn:focus-visible { outline: 2px solid var(--mark-b); }
.tkToastBtn[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tkRing, .tkRing .tkIc, .tkDialFill, .tkBar > span, .tkSheetBack, .tkSheet, .tkToast, .tkRow, .tkMineKnob, .tkMineKnob::after, .tkDoneChev { transition: none; }
  .tkRow.is-ticking .tkRing, .tkPaper.is-live { animation: none; }
}

/* ---- Owner panel extras (the panel itself is activity-core's) ---- */
#ct-admin-panel .ctap-people { display: flex; flex-direction: column; gap: 6px; }
#ct-admin-panel .ctap-people-label { font-size: .82rem; font-weight: 600; color: var(--text); }
#ct-admin-panel .ctap-group-title { margin-top: 6px; font-size: .82rem; font-weight: 700; color: var(--text); }
