/* Task templates in the console (task-table.js tt- in- tk- tl- cal-, templates.js te-; docs/TASK-TEMPLATES.md
   §22). Flat, as the rest: hairlines between rows, a rule on the left for a state or a group, no boxed cards and no
   thick rounded borders. Every screen works at 375 px and 1280 px; on a phone a table row becomes a short block. */

/* `hidden` wins over every display rule below. */
.tt-page [hidden], .te-page [hidden] { display: none !important; }

/* The composer on a project's page (quick-entry.js, styled by composer.css as cz-; its old qe- rules went with the
   rewrite, tt-gap-tasks). */
.tt-quick { margin: 0 0 22px; }
.tt-page .linkbtn, .te-page .linkbtn, .in-acts .linkbtn { background: none; border: 0; color: var(--canopy-2); padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 12.5px; }

/* ---------- pages: Tasks, Intake, a task, Templates ---------- */
.tt-sub { margin-bottom: 18px; }
.tt-h { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 8px 0 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tt-none { padding: 12px 0; margin: 0; color: var(--text-3); font-size: 13.5px; border-top: var(--hair); border-bottom: var(--hair); }
.tt-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; }
.tt-sp { flex: 1; }
.tt-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); min-width: 0; }
.tt-f input, .tt-f select, .tt-f textarea, .te-l input, .te-l select, .te-l textarea, .te-kid input, .te-kid select, .te-part input, .te-part select {
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 9px; color: var(--text); font: 13.5px var(--sans); outline: 0; min-width: 0; box-sizing: border-box; }
.tt-f input:focus, .tt-f select:focus, .tt-f textarea:focus, .te-l input:focus, .te-l select:focus, .te-l textarea:focus, .te-kid input:focus, .te-part input:focus { border-color: var(--canopy); }
.tt-q { flex: 1 1 220px; max-width: 360px; }
.tt-q input { width: 100%; }
.tt-check, .te-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); }
.tt-check input, .te-check input, .te-radio input { accent-color: var(--canopy); }
.tt-more { flex-basis: 100%; }
.tt-more summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 4px 0; width: max-content; }
.tt-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding: 8px 0 4px 12px; border-left: 2px solid var(--line-2); }
.tt-range > span { display: flex; gap: 6px; align-items: center; }
.tt-range input { width: 140px; }
.tt-range input[type=number] { width: 90px; }
.tt-scroll { overflow-x: auto; border-top: var(--hair); }
.tt-t { min-width: 100%; }
.tt-t th { white-space: nowrap; padding: 9px 14px 9px 0 !important; }
.tt-t td { padding: 9px 14px 9px 0 !important; vertical-align: top; max-width: 280px; overflow-wrap: anywhere; }
.tt-t tbody tr { cursor: pointer; }
.tt-t tbody tr:hover td, .tt-t tbody tr:focus td { background: var(--ink-2); }
.tt-t tbody tr:focus { outline: 0; }
.tt-t td.tt-title b { font-weight: 600; }
.tt-t td.tt-ref { white-space: nowrap; color: var(--text-3); }
.tt-count { font-size: 12px; margin: 8px 0 0; }
.tt-out, .tt-in { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding-left: 6px; border-left: 2px solid var(--warn); color: var(--warn); line-height: 1.4; white-space: nowrap; }
.tt-in { border-left-color: var(--line-2); color: var(--text-3); font-weight: 500; }
.tt-row-out td:first-child { box-shadow: inset 2px 0 0 var(--warn); padding-left: 8px !important; }
.kbd { font: 12px var(--mono); color: var(--text-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; }
.mono { font-family: var(--mono); }

/* On a phone, each row is a block of label and value: nothing scrolls sideways. */
@media (max-width: 780px) {
  .tt-scroll { overflow: visible; }
  .tt-t, .tt-t tbody, .tt-t tr, .tt-t td { display: block; width: 100%; max-width: none; }
  .tt-t thead { display: none; }
  .tt-t tr { border-bottom: var(--hair); padding: 8px 0; display: flex; flex-direction: column; }
  .tt-t td { border: 0 !important; padding: 2px 0 !important; display: flex; gap: 10px; }
  .tt-t td::before { content: attr(data-label); flex: 0 0 38%; color: var(--text-3); font-size: 12px; overflow-wrap: anywhere; }
  .tt-t td:empty { display: none; }
  /* console.css hides every table's third column on a phone; here that is Template or Version, which a row needs. */
  table.t.tt-t th:nth-child(3) { display: none; }
  table.t.tt-t td:nth-child(3):not(:empty) { display: flex; }
  .tt-t td.tt-title { order: -1; }
  .tt-row-out td:first-child { box-shadow: none; padding-left: 0 !important; }
  .tt-row-out { box-shadow: inset 2px 0 0 var(--warn); padding-left: 10px !important; }
  .tt-range input { width: 120px; }
  .tt-q { max-width: none; }
}

/* The Intake */
.in-list { border-top: var(--hair); }
.in-row { padding: 12px 0 12px 12px; border-bottom: var(--hair); border-left: 2px solid var(--warn); }
.in-row.unproven { border-left-color: var(--bad); }
.in-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.in-top b { font-size: 14.5px; overflow-wrap: anywhere; }
.in-proof { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.in-proof.yes { color: var(--ok); } .in-proof.no { color: var(--bad); }
.in-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.in-sub a { color: var(--canopy-2); }
.in-caps { margin: 0 0 10px; font-size: 12.5px; overflow-wrap: anywhere; }
.in-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; }
.in-copy { margin-top: 10px; }
.in-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.in-form p { margin: 0; font-size: 12.5px; }

/* A task's own page */
.tk-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
/* A task's header (task-table.js): one item per part, the dots drawn here, so an empty part leaves no "· ·" (tt-fix-tour). */
.tk-meta.tk-parts { gap: 4px 0; }
.tk-parts .tk-m { display: inline-flex; align-items: baseline; white-space: nowrap; }
.tk-parts .tk-m + .tk-m::before { content: "·"; color: var(--text-3); margin: 0 7px; }
/* In a sentence of parts, inside or outside is a word, not a rule: the bar would read as one more separator. */
.tk-parts .tt-in, .tk-parts .tt-out { border-left: 0; padding-left: 0; }
.tk-meta a { color: var(--canopy-2); }
.tk-sec { margin-top: 18px; }
.tk-v { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; color: var(--text-2); }
.tk-v a { color: var(--canopy-2); font-family: var(--mono); font-size: 12.5px; }
.tk-note { font-size: 12.5px; margin: 0 0 8px; }
.tk-fix { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.tk-hist { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.tk-hist summary { cursor: pointer; }
.tk-hist ul, .tk-kids { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.tk-hist li, .tk-kids li { margin: 3px 0; overflow-wrap: anywhere; }
.tt-exp { display: inline-flex; gap: 6px; }
.tk-brief { white-space: pre-wrap; color: var(--text-2); max-width: 680px; }

/* Templates: the list, a template's page */
.te-list { border-top: var(--hair); }
.te-row { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: var(--hair); color: var(--text); text-decoration: none; }
.te-row:hover { background: var(--ink-2); }
.te-row.archived { opacity: .6; }
.te-row-t { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.te-row-t b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.te-row-s { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.te-chip { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding-left: 6px; border-left: 2px solid var(--line-2); color: var(--text-2); line-height: 1.4; }
.te-chip.live { border-left-color: var(--ok); color: var(--ok); }
.te-chip.wait { border-left-color: var(--warn); color: var(--warn); }
.te-chip.off { color: var(--text-3); }
.te-prop { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.te-prop-acts { display: inline-flex; gap: 12px; align-items: center; }
.te-tabs { margin-bottom: 14px; }
.te-vers { border-top: var(--hair); }
.te-ver { border-bottom: var(--hair); padding: 10px 0; }
.te-ver summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.te-ver summary .dim { font-size: 12.5px; overflow-wrap: anywhere; }
.te-ver-body { padding: 8px 0 4px 12px; border-left: 2px solid var(--line-2); margin-top: 8px; }
.te-diff-h { margin: 0 0 4px; font-size: 12px; color: var(--text-3); }
.te-diff { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.te-hold { font-size: 13.5px; }
.te-err, .te-ferr p { color: var(--warn); font-size: 12.5px; margin: 6px 0 0; padding-left: 8px; border-left: 2px solid var(--warn); }

/* The editor: the definition beside its preview on a desktop; a toggle between them on a phone */
.te-toggle { display: none; }
.te-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.te-pre { position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow-y: auto; padding-left: 20px; border-left: var(--hair); }
.te-sec { border-top: var(--hair); padding: 14px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.te-h { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 0; }
.te-h3 { font-size: 13px; font-weight: 600; margin: 8px 0 0; }
.te-small { font-size: 12.5px; margin: 0; }
.te-l { display: block; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.te-l input, .te-l select, .te-l textarea { display: block; width: 100%; margin-top: 4px; }
.te-narrow { max-width: 260px; }
.te-prof { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.te-prof legend { font-size: 12.5px; color: var(--text-2); padding: 0; margin-bottom: 4px; }
.te-radio { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.te-radio input { margin-top: 3px; }
.te-radio span { display: flex; flex-direction: column; gap: 1px; }
.te-radio .dim { font-size: 12.5px; }
.te-fields { border-top: var(--hair); }
.te-field { border-bottom: var(--hair); padding: 6px 0; border-left: 2px solid transparent; }
.te-field.open { border-left-color: var(--canopy); padding-left: 10px; }
.te-field.refused { border-left-color: var(--warn); padding-left: 10px; }
.te-field.dragging { opacity: .45; }
.te-field.over { box-shadow: inset 0 2px 0 var(--canopy); }
.te-fhead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.te-grip { cursor: grab; color: var(--text-3); font-size: 12px; letter-spacing: -2px; padding: 4px 2px; user-select: none; }
.te-ftitle { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; background: none; border: 0; color: var(--text); text-align: left; padding: 6px 0; cursor: pointer; font: inherit; }
.te-ftitle b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.te-ftitle .dim { font-size: 12px; }
.te-fbtns { display: inline-flex; gap: 2px; }
.iconbtn.sm { width: 28px; height: 28px; font-size: 13px; }
.iconbtn.sm svg { width: 14px; height: 14px; }
.te-fbody { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 10px; }
.te-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.te-row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.te-req { padding-bottom: 7px; }
.te-parts { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.te-part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) auto; gap: 6px; align-items: center; }
.te-pl { font-size: 12.5px; color: var(--text-2); }
.te-add { display: flex; flex-direction: column; gap: 8px; }
.te-add > .btn { align-self: flex-start; }
.te-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); border-top: var(--hair); }
.te-kind { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; border-bottom: var(--hair); padding: 9px 8px; color: var(--text); cursor: pointer; font: inherit; border-left: 2px solid transparent; }
.te-kind:hover, .te-kind:focus { background: var(--ink-2); border-left-color: var(--canopy); outline: 0; }
.te-kind b { font-size: 13.5px; font-weight: 600; }
.te-kind .dim { font-size: 12px; }
.te-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.te-pick .te-pl { flex-basis: 100%; }
.te-ref { font-size: 12.5px; padding-left: 7px; border-left: 2px solid var(--line-2); }
.te-kids { display: flex; flex-direction: column; gap: 6px; }
.te-kid { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
.te-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.te-what { margin: 0; font-size: 13.5px; color: var(--text); padding-left: 10px; border-left: 2px solid var(--sky); }
.te-saveway { font-size: 12.5px; color: var(--warn); }
.te-save .btn[disabled] { opacity: .5; cursor: not-allowed; }

@media (max-width: 860px) {
  .te-toggle { display: flex; gap: 18px; border-bottom: var(--hair); margin: 0 0 12px; }
  .te-toggle button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-2); padding: 8px 0; font: 600 13px var(--sans); cursor: pointer; }
  .te-toggle button.on { color: var(--text); border-bottom-color: var(--canopy); }
  .te-two { grid-template-columns: minmax(0, 1fr); }
  .te-two[data-showing="def"] .te-pre { display: none; }
  .te-two[data-showing="pre"] .te-def { display: none; }
  .te-pre { position: static; max-height: none; padding-left: 0; border-left: 0; }
  .te-row2 { grid-template-columns: minmax(0, 1fr); }
  .te-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .te-kid { grid-template-columns: minmax(0, 1fr) auto; }
  .te-kid [data-k="title"], .te-kid [data-k="spec"] { grid-column: 1 / -1; }
  .te-kid [data-k="spec"] { grid-row: 3; }
  .te-part { grid-template-columns: minmax(0, 1fr) minmax(0, 120px) auto; }
}
@media (max-width: 860px) { .te-kid [data-kdel] { grid-row: 1; grid-column: 2; } }

/* Step 3's options: units by kind, a row's columns, one condition, a person's work, the preview's audience. */
.te-units { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.te-udim { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 4px 0; border-top: var(--hair); }
.te-udim.off { opacity: .45; }
.te-uset { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.te-uset .te-check { font-size: 12.5px; }
.te-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px) auto auto auto; gap: 6px; align-items: center; padding: 4px 0; border-top: var(--hair); }
.te-col .te-copts { grid-column: 1 / -1; }
.te-col input, .te-col select { background: var(--ink-2); border: 1px solid var(--control); border-radius: 4px; padding: 6px 8px; color: var(--text); font: 13px var(--sans); min-width: 0; width: 100%; box-sizing: border-box; }
.te-col .te-check input { width: auto; }
.te-when { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; padding-left: 10px; border-left: 2px solid var(--sky); }
.te-wv { display: flex; gap: 8px; align-items: center; }
.te-wv > span:first-child { font-size: 12.5px; color: var(--text-2); }
.te-wv select { margin-top: 0 !important; }
.te-wvals { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.te-kid.person { padding: 6px 0 8px; border-left: 2px solid var(--sky); padding-left: 8px; }
.te-kid2 { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.te-kid .te-err { grid-column: 1 / -1; }
.te-as { margin: 6px 0 10px; }
.te-pre-r:not(:empty) { margin-top: 18px; }
.te-pre-h { margin: 0 0 8px; }
@media (max-width: 860px) {
  .te-col { grid-template-columns: minmax(0, 1fr) auto auto; }
  .te-col [data-c="kind"] { grid-column: 1 / -1; grid-row: 2; }
  .te-when { grid-template-columns: minmax(0, 1fr); }
  .te-udim { grid-template-columns: minmax(0, 1fr); }
}
.chips.tk-as, .chips.te-as { flex-wrap: wrap; row-gap: 0; }

/* ---------------------------------------------------------------- the Tasks area (CONSOLE-REDESIGN §1.1, steps 4–5) */
/* All: one list of every task, in the list pane (task-table.js taskList). Hairlines between rows, a dot for the state,
   the chosen row marked by a rule on its left; no boxed cards. */
.tl-search { padding: 10px 16px 0; }
.tl-search[hidden] { display: none; }
.tl-search input { width: 100%; height: 34px; background: var(--ink-2); border: 1px solid var(--control); border-radius: 5px; padding: 0 10px; color: var(--text); font: 14px var(--sans); }
/* A chip row wraps inside its pane (tt-fix-tour): a list pane narrowed by a detail panel never hides a chip, a select
   or the List/Calendar/Table switch behind its edge; each control stays whole. */
.tl-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.tl-sp { flex: 1; min-width: 4px; }
.fchip { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); white-space: nowrap; font: 12.5px var(--sans);
  display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer; }
.fchip:hover { color: var(--text); border-color: var(--control); }
.fchip[aria-pressed="true"] { color: var(--text); border-color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--text); }
.fchip .c { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.fchip .c:empty { display: none; }
.fsel { display: inline-flex; flex: none; max-width: 100%; }
/* In the Tasks toolbar the three selects give up width before List · Calendar · Table wrap to a second line (tour r4:
   at 1280 with the messaging rail pinned): each shrinks to 92px, its chosen words cut with an ellipsis. */
.tl-filters .fsel { flex: 1 1 92px; max-width: 160px; } /* a line is broken on 92px (a wrapping row breaks before it shrinks), grown to 160 */
.tl-filters .fsel select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.fsel select { height: 28px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 12.5px var(--sans); padding: 0 8px; max-width: 160px; }
.fsel .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tl-view { display: inline-flex; gap: 4px; flex: none; }
.tl-rows { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative; min-width: 0; }
.tl-row:hover { background: var(--ink-2); }
.tl-row[aria-selected="true"] { background: var(--ink-2); }
.tl-row[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--canopy); }
.tl-row:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: -2px; }
.tl-row .dot { margin-top: 7px; }
.tl-row .m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tl-row .t1 b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row .t2 { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row .t3 { color: var(--text-3); font-size: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
/* background: none — the old prototype's global .side (styles.css, the agent view's column) painted --ink-0 behind the dates */
.tl-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; background: none; min-height: 0; }
.tl-row .when { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-none p { margin: 0 0 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.acc { background: var(--canopy); }
.tag { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tag.ok { color: var(--ok); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad-2); }
.origin { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--canopy-2); border-left: 2px solid var(--canopy); padding-left: 5px; }
.tl .tt-table { margin: 0; }
/* tt-gap-tasks: who a row is given to, its tags (flat words with a #, no boxes) */
.tl-who { color: var(--text-2); }
.tl-tag { font-size: 11.5px; color: var(--k-tag, var(--text-2)); white-space: nowrap; }
.tl-tag + .tl-tag { margin-left: -2px; }

/* Tasks › All › Calendar (tt-gap-tasks): a week of day columns where there is room, a list of days on a phone */
.cal { padding: 0 0 16px; container-type: inline-size; }
.cal-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 10px 16px 0; }
.cal-nav { display: inline-flex; gap: 4px; align-items: center; }
.cal-nav .iconbtn { width: 28px; height: 28px; font-size: 18px; line-height: 1; }
.cal-label { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-zone { margin: 4px 16px 8px; font-size: 12px; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-days.one { grid-template-columns: minmax(0, 1fr); }
.cal-day { min-width: 0; border-right: 1px solid var(--line); padding: 0 0 8px; }
.cal-day:last-child { border-right: 0; }
.cal-dh { margin: 0; padding: 8px 10px 6px; font-size: 12px; font-weight: 500; color: var(--text-3); display: flex; gap: 6px; align-items: baseline; border-bottom: 1px solid var(--line); }
.cal-dh b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-dh .c { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-dh b { color: var(--accent-text, var(--canopy-2)); }
.cal-day.today .cal-dh { box-shadow: inset 0 2px 0 var(--accent, var(--canopy)); }
.cal-it { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; border-left: 2px solid var(--k-date, var(--line-2)); min-width: 0; }
.cal-it.k-call { border-left-color: var(--k-person, var(--sky)); }
.cal-it.k-due { border-left-color: var(--line-2); }
.cal-it:hover, .cal-it[aria-selected="true"] { background: var(--ink-2); }
.cal-it:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: -2px; }
.cal-t { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-m { display: flex; flex-direction: column; min-width: 0; }
.cal-m b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-s { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-none { margin: 0; padding: 8px 10px; color: var(--text-3); font-size: 12px; }
.cal-days.one .cal-it { flex-direction: row; gap: 12px; align-items: baseline; padding: 8px 16px; }
.cal-days.one .cal-t { min-width: 96px; }
.cal-days.one .cal-dh { padding: 8px 16px 6px; }
/* the week as columns only where seven fit (the list pane's own width, not the window's) */
@container (max-width: 899px) {
  .cal-days { grid-template-columns: minmax(0, 1fr); }
  .cal-day { border-right: 0; }
  .cal-it { flex-direction: row; gap: 12px; align-items: baseline; padding: 8px 16px; }
  .cal-t { min-width: 84px; }
  .cal-dh { padding: 10px 16px 6px; }
  .cal-none { padding: 6px 16px; }
}

/* a task's own fields (tt-gap-tasks): who, tags, place, a call's terms — label and value rows on hairlines */
.tk-x { display: flex; flex-direction: column; }
.tk-xrow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.tk-xk { color: var(--text-3); font-size: 12.5px; }
.tk-xv { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.tk-who { white-space: nowrap; }
.tk-pt { font: 12px var(--mono); color: var(--text-2); }
.tk-tagin { height: 30px; min-width: 0; flex: 1 1 200px; background: var(--ink-2); border: 1px solid var(--control); border-radius: 5px; padding: 0 8px; color: var(--text); font: 14px var(--sans); }
.tk-small { font-size: 12px; }
.tk-x .tt-h { margin-top: 14px; }
@media (max-width: 780px) {
  .tk-xrow { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* the task in the detail pane: its own page, drawn compact */
.tk-panel.page { padding: 14px 16px 28px; max-width: none; margin: 0; }
.tk-panel .page-head { margin-bottom: 12px; }
.tk-panel .page-head h1 { font-size: 18px; letter-spacing: -.01em; }
.tk-panel .page-head .actions { margin-left: 0; width: 100%; flex-wrap: wrap; }

/* the Templates pages under the Tasks area's tabs */
.tt-area { margin: -26px -28px 22px; }
.tt-area .pn-tabs { padding: 0 28px; }
.te-area .tt-tools { align-items: center; }
/* Tasks › Templates as a tab of Tasks (tt-r4-polish2): its tools are the other tabs' filter bar, its rows run the pane's
   width at 16 px like Tasks › All's, with the same hover. */
.te-tab .tt-tools { padding: 10px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.te-tab .te-list { border-top: 0; }
.te-tab .te-row { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.te-tab .te-row:hover { background: var(--ink-2); }
.te-tab #tpList > p { margin: 12px 16px; }
@media (max-width: 780px) { .te-tab .tt-tools, .te-tab .te-row { padding-left: 14px; padding-right: 14px; } }
.rp-embed .rp-filters { align-items: flex-end; }
.rp-embed .rp-csv { align-self: flex-end; }
@media (max-width: 780px) {
  .tt-area { margin: -18px -14px 16px; }
  .tt-area .pn-tabs { padding: 0 14px; }
  .tl-row { padding: 10px 14px; }
  .tl-filters { padding: 10px 14px; }
}
