/* Smart tasks, part 1 (2026-11-10): the Filter panel, its chips and Sort on
   the Tasks page (treelivepeople.js tasksSpace, taskfilter.js). New styles
   for the task list go here, not in style.css. */

.tp-fmenu.tk-panel { width: 340px; max-height: min(520px, 70vh); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.tk-group { display: flex; flex-direction: column; gap: 6px; }
.tk-glabel { font: 600 0.75rem var(--sans); color: var(--lab, var(--soft)); }
.tk-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-pill { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bp-line2, var(--line)); background: none; box-shadow: none; color: var(--soft, var(--ink)); font: 600 0.8125rem var(--sans); cursor: pointer; }
.tk-pill:hover { background: var(--hover, rgba(127, 127, 127, 0.1)); color: var(--ink); }
.tk-pill.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink, var(--card)); }
/* Categories, a row of pills above the list (Conner, 2026-11-16). */
.tk-catrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.tk-catrow .tk-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--pad-pill, 12px); }
.tk-cat-n { font: 500 0.75rem var(--sans); opacity: 0.7; }
.tk-pill.tk-cat-new { border-style: dashed; }
.tk-catrow .tk-cat-note { flex-basis: 100%; margin: 2px 0 0; }
.tk-cat-note { margin: -6px 0 0; }
.tk-sels { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tk-sel { display: flex; flex-direction: column; gap: 6px; }
.tk-sel select, .tk-sort select { min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--bp-line2, var(--line)); background: var(--bp-card, var(--card)); color: var(--ink); font: 500 0.875rem var(--sans); max-width: 100%; }
.tk-acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.tk-acts .td-b { margin-top: 8px; }
.tk-acts .link-btn { margin-top: 8px; }

.tp-fbtn .tk-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--on-ink, var(--card)); font: 700 0.6875rem/18px var(--sans); text-align: center; }

.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.tk-chips .tp-fchip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tk-right { display: flex; align-items: center; gap: 10px; flex: none; }
.tk-sort { display: inline-flex; align-items: center; gap: 6px; }
.tk-sort-l { font: 600 0.8125rem var(--sans); color: var(--soft); }
.tk-sort select { min-height: 30px; border-radius: 999px; font-size: 0.8125rem; }

/* A 390px phone: the panel fills the width under the box, and Sort and
   List or Calendar wrap under the tabs. */
@media (max-width: 560px) {
  .tp-fmenu.tk-panel { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-height: 75vh; overflow-y: auto; }
  .tp-tabrow { flex-wrap: wrap; row-gap: 4px; padding-bottom: 6px; }
  .tk-right { width: 100%; justify-content: space-between; padding-left: 16px; }
}

/* Needs your yes (Conner, 2026-11-16): what waits for the owner's yes, at
   the top of Tasks, outlined in the top bar's Needs you blue (#1570EF; the
   brand made --yellow sky blue, brand-app.css). Each row: its kind,
   what it is and why, then its own Yes and No. On a phone the buttons drop
   under the words. */
.td-card-s.tl-yes, .tl-shell .td-card-s.tl-yes, html.dark .tl-shell .td-card-s.tl-yes { margin: 14px 0 16px; padding: 14px 18px; border: 1.5px solid #1570EF; border-radius: 16px; }
.tl-yes-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.tl-yes-head b { font: 700 16px var(--head); color: var(--ink); }
.tl-yes-note { margin-left: auto; }
.tl-yes-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl-yes-list > .tl-yes-row:first-child { border-top: 0; }
.tl-yes-tag { flex: none; width: 78px; margin-top: 3px; font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tl-yes-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tl-yes-t { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tl-yes-acts { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* The Needs you count beside Tasks in the sidebar, the top bar's blue. */
.rail-btn .rail-need { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 999px; background: #1570EF; color: #fff; font: 600 11px/18px var(--sans); text-align: center; }
.rail.shell:not(.open) .rail-btn .rail-need { display: none; }

@media (max-width: 760px) {
  .tl-yes { padding: 12px 14px; }
  .tl-yes-note { margin-left: 0; flex-basis: 100%; }
  .tl-yes-row { flex-wrap: wrap; gap: 6px 12px; }
  .tl-yes-tag { width: auto; }
  .tl-yes-b { flex-basis: 100%; }
  .tl-yes-acts { justify-content: flex-start; }
}

/* Kept short (Conner, 2026-11-16): the rows scroll inside the box at a
   fixed height, and a card's list of which ones opens on See which, two
   lines each, in its own scrolling list. */
.tl-yes-list { max-height: min(56vh, 460px); overflow-y: auto; overscroll-behavior: contain; margin-right: -8px; padding-right: 8px; }
.tl-yes-why { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-yes-see { align-self: flex-start; margin-top: 2px; font-size: 13px; }
.tl-yes-items { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; overscroll-behavior: contain; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--hover, rgba(127, 127, 127, 0.08)); }
.tl-yes-item { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .tl-yes-list { max-height: 60vh; } }

/* Three at a time (2026-11-16): Show all opens the rest in the same box. */
.tl-yes-more { align-self: flex-start; margin-top: 6px; padding-top: 10px; width: 100%; text-align: left; border-top: 1px solid var(--line); font-weight: 600; }

/* Profile home (Conner, 2026-11-16, "Yes, build it" on the aligned mockup):
   the greeting is the page's opening line with no card; Needs your yes sits
   beside Today and Since yesterday, the two columns ending level; the tiles
   follow. One column on a phone. */
.tl-shell .td-home > .td-greet.tl-greet-plain, html.dark .tl-shell .td-home > .td-greet.tl-greet-plain {
  background: none; border: 0; box-shadow: none; min-height: 0; padding: 4px 2px; }
.tl-home-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.tl-home-grid > .td-card-s.tl-yes, .tl-shell .tl-home-grid > .td-card-s.tl-yes, html.dark .tl-shell .tl-home-grid > .td-card-s.tl-yes { margin: 0; min-width: 0; }
/* Both columns stretch to the taller one and end level: Today grows to
   fill the right, and Needs your yes keeps Show all at its bottom. */
.tl-home-grid > .td-card-s.tl-yes { display: flex; flex-direction: column; }
.tl-home-grid > .td-card-s.tl-yes > .tl-yes-more { margin-top: auto; }
.tl-home-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tl-home-side > .tl-today { flex: 1 1 auto; display: flex; flex-direction: column; }
.tl-home-side > .tl-today > .tl-today-all, .tl-brief > .tl-today > .tl-today-all { flex: none; margin: auto 24px 16px; padding-top: 10px; align-self: flex-start; font-weight: 600; }
.tl-home-side > .tl-since { flex: none; }
@media (max-width: 900px) {
  .tl-home-grid { grid-template-columns: minmax(0, 1fr); }
  .tl-home-side > .tl-today { flex: none; }
}

/* Held incoming writes (Datum change 122): pick who it was about. */
.tl-held-src { align-self: flex-start; }
.tl-held-items { margin: 2px 0 0; padding-left: 18px; color: var(--muted); }
.tl-held-items li { margin: 2px 0; }
.tl-held-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tl-held-opt { display: flex; align-items: flex-start; gap: 8px; padding: 8px var(--pad-pill); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink); }
.tl-held-opt input[type="radio"] { flex: none; width: auto; height: auto; margin: 3px 0 0; padding: 0; accent-color: #1570EF; }
.tl-held-opt.on { border-color: #1570EF; }
.tl-yes-b:has(.tl-held-pick) > .tl-yes-why { display: block; -webkit-line-clamp: unset; overflow: visible; }
/* A who card needs the width for its picker: its buttons go underneath. */
.tl-yes-row:has(.tl-held-pick) { flex-wrap: wrap; }
.tl-yes-row:has(.tl-held-pick) > .tl-yes-b { flex: 1 1 calc(100% - 92px); }
.tl-yes-row:has(.tl-held-pick) > .tl-yes-acts { margin-left: 92px; justify-content: flex-start; }
.tl-held-opt > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .tl-yes-row:has(.tl-held-pick) > .tl-yes-b { flex-basis: 100%; } .tl-yes-row:has(.tl-held-pick) > .tl-yes-acts { margin-left: 0; } }

/* Repeating tasks, reminders and snooze (Datum change 133, 2026-11-21). */
.tp-rep-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 var(--pad-pill); border-radius: 999px; background: #EFF4FF; color: #175CD3; font: 600 12px var(--sans); white-space: nowrap; }
.tp-rep-chip.tp-gray { background: transparent; color: var(--muted); padding: 0; }
html.dark .tp-rep-chip:not(.tp-gray) { background: rgba(21, 112, 239, 0.18); color: #84ADFF; }
.tp-rep { display: flex; flex-direction: column; gap: 10px; }
.tp-rep-every { display: flex; align-items: center; gap: 6px; }
.tp-rep-every .tp-rep-n { flex: none; width: 64px; }
.tp-rep-every select { flex: 1 1 auto; min-width: 0; }
.tp-rep-how { align-self: end; padding-bottom: 10px; }
.tp-rep-hist { margin: 0; }
.tp-snooze-open { flex: none; font-size: 13px; margin-right: 8px; }
.tp-snooze { display: inline-flex; gap: 6px; flex: none; margin-right: 8px; }
.tp-snooze-b { min-height: 30px; padding: 0 var(--pad-pill); font-size: 13px; }
@media (max-width: 760px) {
  .tp-rep-how { padding-bottom: 0; }
}
