/* المهام والمشاريع: the Works */
.tk-list { list-style: none; margin: 0; padding: 4px 6px; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-bottom: 1px dashed #eee4c6; cursor: pointer; border-radius: 8px; }
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover { background: #fbf7ea; }
.tk-row.late { box-shadow: inset 3px 0 0 #c98b8b; }
.tk-tick { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #bdb797; background: #fffdf8; cursor: pointer; color: #2f6b45; font-size: 12px; line-height: 1; }
.tk-tick:disabled { background: #e7efe7; border-color: #a9c4b0; cursor: default; }
.tk-t { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.tk-t b { font-size: 13.5px; font-weight: 600; }
.tk-t small { color: #8a8466; font-size: 11.5px; }
.tk-s { flex: 0 0 auto; font-size: 11.5px; color: #6f6843; border: 1px solid #e4dab8; border-radius: 99px; padding: 1px 9px; white-space: nowrap; }
.tk-w { flex: 0 0 auto; font-size: 11.5px; color: #6f6843; max-width: 26%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-d { flex: 0 0 auto; font-size: 12px; color: #8a8466; white-space: nowrap; }
.tk-d.bad { color: #9b2c2c; } .tk-d.warn { color: #8a5a20; }
.tk-n { display: inline-block; background: #efe6cc; border-radius: 99px; padding: 0 8px; font-size: 11.5px; }

/* the works, as cards */
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tk-p { display: flex; flex-direction: column; gap: 6px; background: #fffdf8; border: 1px solid #e4dab8; border-radius: 10px; padding: 12px 13px; text-decoration: none; color: inherit; }
.tk-p:hover { border-color: #bdb797; }
.tk-p-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-p-f { display: flex; gap: 10px; flex-wrap: wrap; color: #6f6843; }
.tk-p-f .bad { color: #9b2c2c; }
.tk-bar { height: 5px; background: #efe6cc; border-radius: 99px; overflow: hidden; }
.tk-bar i { display: block; height: 100%; background: #9a9265; }
.tk-bar.big { height: 8px; min-width: 160px; }

/* one commission */
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; }
.tk-head-f { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.tk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tk-cols > aside { min-width: 0; }
.tk-papers { list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* the drawer */
.tk-cl ul { list-style: none; margin: 0; padding: 0 4px; font-size: 13px; }
.tk-cl li { padding: 2px 0; }
.tk-talk { list-style: none; margin: 0; padding: 4px 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.tk-talk li { border-inline-start: 2px solid #e4dab8; padding-inline-start: 8px; }
.tk-in { list-style: none; margin: 0; padding: 6px 10px; display: flex; flex-direction: column; }
.tk-in li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed #eee4c6; font-size: 13px; cursor: pointer; }
.tk-in li.new { font-weight: 600; }

@media (max-width: 900px) { .tk-cols { grid-template-columns: 1fr; } .tk-w { display: none; } }
@media (max-width: 560px) { .se-row { grid-template-columns: 16px minmax(0, 1fr) auto; } .se-row .se-en { grid-column: 2 / 3; } }

/* what fell away from a commission: kept for the record, folded out of the way */
.tk-gone { margin: 14px 0 0; }
.tk-gone > summary { cursor: pointer; font-size: 12.5px; color: var(--ui-muted); padding: 6px 2px; }
.tk-gone[open] > summary { margin-bottom: 6px; }
.tk-gone .tk-row { opacity: .6; }

/* المخطط الزمني: the month laid out, with what falls on each day (public/js/tasks.js). */
.pl-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.pl-head span { font-size: 11.5px; color: var(--ui-muted); text-align: center; }
.pl-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pl-pad { display: block; }
.pl-day { min-height: 92px; background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 9px; padding: 8px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.pl-day.off { background: var(--ui-bg); }
.pl-day.now { border-color: var(--ui-ink); box-shadow: inset 0 0 0 1px var(--ui-ink); }
.pl-day > b { font-size: 11.5px; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.pl-day.now > b { color: var(--ui-ink); }
.pl-t, .pl-d { display: block; font-size: 11px; line-height: 1.35; padding: 3px 5px; border-radius: 5px; text-decoration: none; color: var(--ui-ink);
  background: var(--ui-cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-t i, .pl-d i { font-style: normal; color: var(--ui-muted); margin-inline-end: 4px; font-size: 10px; }
.pl-t:hover, .pl-d:hover { background: var(--ui-gold); }
.pl-t.bad { background: var(--ui-bad-bg); color: var(--ui-bad); }
.pl-d.pl-money { background: var(--ui-ok-bg); color: var(--ui-ok); }
.pl-d.pl-anchor { background: var(--ui-warn-bg); color: var(--ui-warn); }

/* عبء العمل: who carries what, day by day. */
.wl { font-variant-numeric: tabular-nums; }
.wl .wl-h { padding: 4px 2px; text-align: center; font-weight: 500; }
.wl .wl-h span { display: block; font-size: 10px; color: var(--ui-muted); font-weight: 400; }
.wl .wl-c { text-align: center; padding: 4px 2px; font-size: 11.5px; }
.wl .wl-c.off { background: var(--ui-bg); }
.wl .wl-c.some { background: var(--ui-ok-bg); }
.wl .wl-c.full { background: var(--ui-warn-bg); color: var(--ui-warn); }
.wl .wl-c.over { background: var(--ui-bad-bg); color: var(--ui-bad); font-weight: 600; }
@media (max-width: 900px) { .pl-day { min-height: 64px; } .pl-t, .pl-d { font-size: 10px; } }

/* What the office proposes about a commission: a name to give a role, a task to open, the file to close. */
.tk-props .tk-prop { list-style: none; margin: 0; padding: 0; }
.tk-props .tk-prop > li { padding: 8px 0; border-bottom: 1px solid var(--line, #e7e4de); }
.tk-props .tk-prop > li:last-child { border-bottom: 0; }
.tk-props .tk-prop .fld { margin: 4px 0 0; }

/* The portal's code of a task (BT-DES-OTH-0012), the hour of its deadline, and its files with where they came from. */
.tk-code { display: inline-block; font: 600 10.5px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .02em; color: var(--ui-muted); background: var(--ui-cream); border-radius: 4px; padding: 0 5px; margin-inline-end: 6px; vertical-align: 1px; }
.tk-t .tk-code { align-self: flex-start; margin-bottom: 2px; }
.tk-code { white-space: nowrap; }
.tk-when { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-when input[type="date"] { flex: 1 1 120px; min-width: 0; }
.tk-when input[type="time"] { flex: 1 1 116px; min-width: 0; }
.tk-files { list-style: none; margin: 4px 0 8px; padding: 0; }
.tk-files li { padding: 2px 0; font-size: 13px; word-break: break-all; }
.tk-from { margin-top: 6px; color: var(--ui-muted); }

/* The kind of job and its stages (prompt 25): the months of a monthly track, the controls behind «المزيد», the editor. */
.tk-ops { padding: 10px 14px; margin-top: 10px; }
.tk-ops > summary { cursor: pointer; font-size: 12.5px; color: var(--ui-muted); }
.tk-months { padding: 10px 14px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tk-mon-h { align-items: center; gap: 8px; }
.tk-mon-h b { text-align: center; }
.tk-cycle { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tk-cycle li { font-size: 12px; border: 1px solid #e4dab8; border-radius: 99px; padding: 2px 10px; color: #8a8466; }
.tk-cycle li.on { background: #efe6cc; color: #26231f; }
.tk-cycle li.now { border-color: #26231f; font-weight: 600; }
.tk-act { margin-top: 4px; }
.se-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#se-mid { min-height: 8px; margin: 6px 0; }
.se-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: center; gap: 4px 6px; border: 1px solid var(--ui-line); border-radius: 8px; padding: 5px 8px; background: var(--ui-card); }
.se-row select.se-part { width: auto; }
.se-row .se-x { white-space: nowrap; }
.se-cl > summary { cursor: pointer; color: var(--ui-muted); }
.se-row.fixed { background: var(--ui-bg); }
.se-row.dragging { opacity: .5; }
.se-grip { cursor: grab; color: var(--ui-muted); width: 14px; }
.se-row input[type="text"] { width: 100%; min-width: 0; }
.se-cl { grid-column: 1 / -1; }
.se-cl textarea { width: 100%; margin-top: 4px; }

/* ---------------------------------------------------------------- the Works made like ClickUp, simpler (WORKS-DESIGN §2–5) */
/* The pieces of a row's second line, each in its own tongue. */
.tk-dot { font-style: normal; color: var(--ui-gold); margin: 0 5px; }
.tk-row .tk-sel { flex: 0 0 auto; margin: 0; }
.tk-row.is-done .tk-t b { color: var(--ui-muted); text-decoration: line-through; text-decoration-color: var(--ui-line-2); }
/* The four things a row may change in place: its state, its holder, its date, its weight. */
.tk-ed { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; min-width: 0; }
.tk-pill { font: inherit; font-size: 11.5px; color: var(--ui-ink-2); background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 99px; padding: 2px 10px; cursor: pointer; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tk-pill:hover { border-color: var(--ui-gold); }
.tk-pill.bad { color: var(--ui-bad); border-color: #e3b9b2; }
.tk-pill.warn { color: var(--ui-warn); }
.tk-pill.pri-urgent { color: var(--ui-bad); background: var(--ui-bad-bg); border-color: transparent; }
.tk-pill.pri-high { color: var(--ui-warn); background: var(--ui-warn-bg); border-color: transparent; }
.tk-pill.pri-low { color: var(--ui-muted); }
.tk-ed-in select, .tk-ed-in input { font-size: 12px; padding: 2px 6px; max-width: 170px; }
.tk-mini { font-size: 12px; padding: 3px 6px; max-width: 190px; width: auto; }

/* The toolbar every page of work has. */
.tk-bar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.tk-bar-tools input[type="search"] { flex: 1 1 180px; min-width: 0; }
.tk-tl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ui-muted); }
.tk-tl select { font-size: 12.5px; padding: 3px 6px; width: auto; }
.tk-filter { padding: 12px 14px; margin: -4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tk-fg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tk-grp { margin: 0 0 10px; }
.tk-grp > summary { cursor: pointer; list-style: none; }
.tk-grp > summary::-webkit-details-marker { display: none; }
.tk-grp > summary::before { content: '▾'; color: var(--ui-muted); margin-inline-end: 6px; font-size: 11px; }
.tk-grp:not([open]) > summary::before { content: '▸'; }
/* The bar for many tasks at once, held at the bottom of the screen while it is needed. */
.tk-bulk { position: sticky; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--ui-ink); color: #fff; border-radius: 12px; padding: 10px 14px; margin-top: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.tk-bulk select, .tk-bulk input { background: #fff; }
.tk-bulk .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }

/* The Board: one column per state (or holder, or weight), a card dragged across. */
.tk-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.tk-col { background: var(--ui-bg); border: 1px solid var(--ui-line); border-radius: 12px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.tk-col > header { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.tk-col.over { border-color: #e3b9b2; background: var(--ui-bad-bg); }
.tk-col.drop { outline: 2px dashed var(--ui-gold-2); outline-offset: -4px; }
.tk-col-b { display: flex; flex-direction: column; gap: 8px; }
.tk-col-warn { padding: 0 2px; }
.tk-wip { font: inherit; font-size: 11px; color: var(--ui-muted); background: none; border: 1px solid var(--ui-line); border-radius: 6px; padding: 1px 7px; cursor: pointer; }
.tk-card { background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.tk-card[draggable="true"] { cursor: grab; }
.tk-card.dragging { opacity: .5; }
.tk-card.late { box-shadow: inset 3px 0 0 #c98b8b; }
.tk-card > b { font-size: 13px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.tk-card-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.tk-card-f { display: flex; justify-content: space-between; gap: 8px; color: var(--ui-muted); flex-wrap: wrap; }
.tk-card-f .bad { color: var(--ui-bad); } .tk-card-f .warn { color: var(--ui-warn); }

/* The Calendar of the Works (a month or a week), sharing the plan's grid. */
.tk-cal-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-cal-h b { font-family: var(--ui-serif); font-size: 18px; padding: 0 6px; }
.pl-day .tk-wd { display: none; }
.pl-day.drop { outline: 2px dashed var(--ui-gold-2); outline-offset: -3px; }
.pl-t[draggable="true"] { cursor: grab; }
.pl-t.done { opacity: .6; text-decoration: line-through; }
.pl-t, .pl-d { display: flex; align-items: baseline; gap: 4px; }
.pl-t span, .pl-d span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-t i, .pl-d i { flex: 0 0 auto; }
.tk-cal.wk .pl-day { min-height: 220px; }
.tk-cal.wk .pl-t, .tk-cal.wk .pl-d { white-space: normal; }
.tk-more-day { font: inherit; background: none; border: 0; color: var(--ui-muted); cursor: pointer; text-align: start; padding: 2px 4px; }

/* The drawer: the task on the side of the screen, its body and its right column. */
#modal.tk-drawer-on { justify-content: flex-end; align-items: stretch; padding: 0; }
#modal.tk-drawer-on .box { max-width: 940px; max-height: 100vh; height: 100vh; border-radius: 14px 0 0 14px; padding: 20px 22px 0; overflow-y: auto; }
html[dir="ltr"] #modal.tk-drawer-on .box, body.ui-en #modal.tk-drawer-on .box { border-radius: 0 14px 14px 0; }
#modal.tk-drawer-on .actions { position: sticky; bottom: 0; background: var(--ui-card); padding: 10px 0 14px; margin-top: 12px; border-top: 1px solid var(--ui-line); }
.tk-dr-h { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--ui-line); }
.tk-dr-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tk-dr-top a { color: var(--ui-ink-2); }
.tk-dr-name { font-family: var(--ui-serif); font-size: 22px; line-height: 1.35; margin: 0; width: 100%; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; background: transparent; }
input.tk-dr-name:hover, input.tk-dr-name:focus { border-color: var(--ui-line); background: var(--ui-card); }
.tk-dr-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; }
.tk-f { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ui-muted); min-width: 0; }
.tk-f select, .tk-f input { min-width: 0; width: 100%; }
.tk-dr-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tk-chip.lead { background: var(--ui-cream); font-weight: 600; }
.tk-chip b { color: var(--ui-gold-2); }
.tk-lead, .tk-x { font: inherit; background: none; border: 0; cursor: pointer; color: var(--ui-muted); padding: 0 2px; }
.tk-x:hover, .tk-lead:hover { color: var(--ui-ink); }
.tk-dr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; padding-top: 12px; align-items: start; }
.tk-dr-main textarea { width: 100%; }
.tk-dr-side { display: flex; flex-direction: column; gap: 10px; background: var(--ui-bg); border: 1px solid var(--ui-line); border-radius: 12px; padding: 12px 14px; }
.tk-dr-side .fld { margin: 0; }
.tk-dr-side input[type="number"] { width: 100%; }
.tk-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tk-kv span { color: var(--ui-muted); }
.tk-kv b { font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.tk-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tk-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.tk-add input[type="text"], .tk-add input[type="number"] { flex: 1 1 120px; min-width: 0; }
.tk-links { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-link { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tk-link > a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; color: var(--ui-ink); text-decoration: none; overflow: hidden; }
.tk-link > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tk-talk li.sys { opacity: .7; border-inline-start-color: var(--ui-line); }
.tk-talk li.open { border-inline-start-color: var(--ui-warn); }
.tk-talk .tag.small { font-size: 11px; margin-inline-start: 4px; }
.tk-say { margin-top: 8px; }
.tk-say textarea { width: 100%; }
.tk-act-all { margin-top: 12px; }
.tk-act-all > summary { cursor: pointer; color: var(--ui-muted); }
.tk-log { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-log li { display: flex; flex-wrap: wrap; gap: 4px 8px; }

/* The inbox: two drawers, each word under its task, Done · Snooze · Open. */
.tk-in-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tk-in li.tk-in-g { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; }
.tk-in li.tk-in-g.new .tk-in-t { font-weight: 600; }
.tk-in li.tk-in-g.new { font-weight: 400; box-shadow: inset 3px 0 0 var(--ui-gold-2); padding-inline-start: 10px; }
.tk-in-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-in-task { font-size: 12px; color: var(--ui-muted); display: flex; align-items: center; gap: 2px; min-width: 0; }
.tk-in-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-in-t { overflow-wrap: anywhere; }
.tk-in-r { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: 0 0 auto; max-width: 48%; }
.tk-snz { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tk-snz-m { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tk-snz-m[hidden] { display: none; }
.tk-in-more > summary { cursor: pointer; color: var(--ui-muted); }
.tk-in-more ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-dg { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.tk-dg a { color: var(--ui-ink); text-decoration: none; }
.tk-prefs td, .tk-prefs th { padding: 7px 10px; }
.tk-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }

/* The load: names that wrap, days that keep their width, and a table that scrolls inside its card. */
.wl-wrap { overflow-x: auto; }
.wl .wl-who { min-width: 130px; }
.wl .wl-h span { white-space: nowrap; }

@media (max-width: 900px) {
  .tk-dr-cols { grid-template-columns: 1fr; }
  .tk-rel { grid-template-columns: 1fr; }
  .tk-ed { width: 100%; justify-content: flex-start; padding-inline-start: 30px; }
  .tk-row { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  #modal.tk-drawer-on .box { border-radius: 0; padding: 16px; }
  .tk-in li.tk-in-g { flex-wrap: wrap; }
  .tk-in-r { max-width: 100%; width: 100%; justify-content: flex-start; padding-inline-start: 24px; }
  .tk-board { grid-auto-columns: minmax(78vw, 1fr); }
  /* A week on a phone reads down the page, a day under the other, each with its name. */
  .pl-head.wk { display: none; }
  .tk-cal.wk { grid-template-columns: 1fr; }
  .tk-cal.wk .pl-day { min-height: 0; }
  .tk-cal.wk .pl-day .tk-wd { display: inline; }
  /* The plan on a phone: one day under the other, only the days that hold something (and today). */
  .pl-grid:not(.tk-cal) { grid-template-columns: 1fr; }
  .pl-grid:not(.tk-cal) .pl-pad, .pl-head:not(.wk):not(.tk-mh) { display: none; }
  .pl-grid:not(.tk-cal) .pl-day.empty:not(.now) { display: none; }
  .pl-grid:not(.tk-cal) .pl-day { min-height: 0; }
  .pl-grid:not(.tk-cal) .pl-day .tk-wd { display: inline; }
  .pl-head.tk-mh { display: grid; }
  .pl-head.tk-mh span { font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* A key-and-value table inside a card is set in from both edges (brand.css); its width gives back what the margins take. */
.tk-cols .card > table.kv { width: calc(100% - 36px); }

/* ---------------------------------------------------------------- the review of 2026-10-24: words, rows and phones */
/*
 * The side menu on a narrower screen: one dark row («Work · My desk ▾») that opens into an even grid of two equal
 * columns — the People section's pattern (hr-reports.css), drawn here for this room's own menu so it holds whatever
 * that file does.
 */
.hrm-side.tk-side .hrm-tog { display: none; }
@media (max-width: 1000px) {
  .hrm > .hrm-side.tk-side { display: block; padding: 0; border-radius: 12px; }
  .hrm > .hrm-side.tk-side .hrm-tog { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; background: none; border: 0; color: #f6f1e3; font: inherit; font-size: 14px; cursor: pointer; text-align: start; }
  .hrm-side.tk-side .hrm-tog .hrm-tog-s { color: var(--ui-gold); font-size: 12px; letter-spacing: .04em; flex: none; }
  .hrm-side.tk-side .hrm-tog b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hrm-side.tk-side .hrm-tog i { font-style: normal; color: var(--ui-gold); transition: transform .15s; flex: none; }
  .hrm > .hrm-side.tk-side.open .hrm-tog i { transform: rotate(180deg); }
  .hrm > .hrm-side.tk-side .hrm-brand, .hrm > .hrm-side.tk-side .hrm-g { display: none; }
  .hrm > .hrm-side.tk-side.open { padding-bottom: 10px; }
  .hrm > .hrm-side.tk-side.open .hrm-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 4px; padding: 0 8px; margin: 0; }
  .hrm > .hrm-side.tk-side.open .hrm-l { font-size: 13px; padding: 8px; min-width: 0; line-height: 1.3; }
}
/* Whose desk it is and what it holds, on one line under the heading. */
.tk-me { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 16px; }
.tk-me-n { font-size: 13px; color: var(--ui-ink-2); margin-inline-end: 4px; }
.tk-me .tag { font-size: 11.5px; padding: 2px 10px; }
/* A row of choices of its own, under the heading and at the start of the page. */
.tk-toolrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
/* An empty list says so once, in the middle of a card of its own. */
.card.tk-none { padding: 28px 18px; text-align: center; color: var(--ui-muted); font-size: 14px; }
/* A notice that belongs to the page: bordered, aligned with the page, its action a real button. */
.card.tk-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; margin: 0 0 14px; font-size: 13px; line-height: 1.6; border-inline-start: 3px solid var(--ui-gold); }
.card.tk-note.warn { border-inline-start-color: var(--ui-warn); }
.card.tk-note > span { flex: 1 1 320px; min-width: 0; }

/* The toolbar of every page of work: one height and one dress for every control. */
.tk-bar-tools input[type="search"] { flex: 1 1 190px; min-width: 180px; }
.tk-bar-tools .btn.small, .tk-tl select { min-height: 32px; box-sizing: border-box; }
.tk-bar-tools .btn.ghost { background: #fffdf8; border-color: var(--ui-line-2); }
.tk-tl select { border: 1px solid var(--ui-line-2); border-radius: 999px; padding: 4px 10px; background: #fffdf8; }
@media (max-width: 760px) {
  .tk-bar-tools { gap: 8px 6px; }
  .tk-bar-tools .tk-views { order: 0; }
  .tk-bar-tools input[type="search"] { order: 1; flex: 1 1 100%; min-width: 0; }
  .tk-bar-tools > :not(.tk-views):not(input) { order: 2; }
}

/* Previous and Next: their chevrons stay where they are drawn, on the outer side. */
.tk-nav { unicode-bidi: isolate; }
/* The days a plan or a load covers: the range, Previous and Next, Today, and the exact dates behind a tap. */
.tk-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.tk-range-t { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.tk-range-pick { margin-inline-start: 6px; }
.tk-range-pick > summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--ui-ink-2); text-decoration: underline; text-decoration-color: var(--ui-gold); text-underline-offset: 3px; }
.tk-range-pick > summary::-webkit-details-marker { display: none; }
.tk-range-pick[open] { flex-basis: 100%; margin-inline-start: 0; }
.tk-range-f { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.tk-range-f label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ui-muted); }
.tk-range-f input[type="date"] { width: auto; }
.tk-foot { margin-top: 10px; }
/* The plan on a phone, with nothing in the range: the line under it says so; no lone «today» bar like a button. */
@media (max-width: 560px) { .pl-grid.is-empty:not(.tk-cal) { display: none; } }

/* The Workload: its table scrolls inside its card, so the shell's sticky heads (stuck under the page's top bar)
   must not stick inside it — they sat 150px down, over the people. Weekends are shaded from the head down. */
.wl-wrap table.grid th { position: static; top: auto; }
.wl th, .wl td { white-space: nowrap; }
.wl td.wl-who { white-space: normal; }
.wl th.wl-h.off { background: var(--ui-bg); }
.wl tr > :last-child { padding-inline-end: 12px; }
@media (max-width: 760px) {
  /* The name stays put while the days scroll beside it. */
  .wl .wl-who { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--ui-card); min-width: 150px; max-width: 170px; box-shadow: 1px 0 0 var(--ui-line); }
  .wl th, .wl td { padding: 6px; font-size: 12px; }
  .wl td.wl-who a { font-size: 12.5px; }
  [dir=rtl] .wl .wl-who { box-shadow: -1px 0 0 var(--ui-line); }
  .wl thead .wl-who { background: #fbf9f3; z-index: 2; }
}

/* The inbox: both rows of choices one height, every choice wide enough to read, the settings at the row's end. */
.tk-in-bar .seg > a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 56px; min-height: 30px; box-sizing: border-box; }
.tk-in-bar .tk-n { line-height: 18px; }
.tk-in-bar .btn.ghost { background: #fffdf8; border-color: var(--ui-line-2); }

/* A table a phone reads as cards (tasks.js cardTable): Work arrangements and Work rules. */
.tk-ctab .tk-ct-div td { background: var(--ui-bg); font-size: 11.5px; font-weight: 600; color: var(--ui-ink-2); letter-spacing: .02em; padding: 8px 10px; }
.tk-ctab .tag { white-space: nowrap; }
.tk-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tk-codeword { font: 600 11.5px/1.5 ui-monospace, Menlo, monospace; white-space: nowrap; color: var(--ui-ink-2); }
.tk-orders .tk-ct-0 { min-width: 260px; }
.tk-orders .tk-ct-4 { min-width: 240px; }
.tk-trig > summary { cursor: pointer; color: var(--ui-ink-2); }
.tk-trig ul { margin: 6px 0 2px; padding-inline-start: 18px; font-size: 12.5px; line-height: 1.55; }
.tk-sep { font-style: normal; }
.tk-rule-n { display: block; }
.tk-own { display: inline-block; margin-top: 4px; }
.tk-rules .tk-ct-1 { min-width: 200px; }
@media (max-width: 760px) {
  #view table.tk-ctab, #view table.tk-ctab tbody, #view table.tk-ctab tr, #view table.tk-ctab td { display: block; width: auto; }
  #view table.tk-ctab { overflow: visible; }
  #view table.tk-ctab thead { display: none; }
  #view table.tk-ctab tr { padding: 10px 14px; border-bottom: 1px solid var(--ui-line); }
  #view table.tk-ctab tr:last-child { border-bottom: 0; }
  #view table.tk-ctab td { border: 0; padding: 3px 0; min-width: 0; }
  #view table.tk-ctab td[data-l]:not(.tk-ct-0) { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
  #view table.tk-ctab td[data-l]:not(.tk-ct-0)::before { content: attr(data-l); flex: 0 0 104px; font-size: 11.5px; color: var(--ui-muted); }
  #view table.tk-ctab td:empty { display: none; }
  #view table.tk-ctab tr.tk-ct-div { padding: 0; }
  #view table.tk-ctab tr.tk-ct-div td { padding: 8px 14px; }
}
@media (max-width: 760px) {
  /* A work order's card: its name, then one line of what it applies to, its code, its tasks and its source, then
     the papers that open it. A rule's card: its name, when it starts, then its state and its switch on one line. */
  #view table.tk-ctab.tk-orders td[data-l].tk-ct-1, #view table.tk-ctab.tk-orders td[data-l].tk-ct-2, #view table.tk-ctab.tk-orders td[data-l].tk-ct-3, #view table.tk-ctab.tk-orders td[data-l].tk-ct-5,
  #view table.tk-ctab.tk-rules td[data-l].tk-ct-2, #view table.tk-ctab.tk-rules td[data-l].tk-ct-3 { display: inline-flex; gap: 5px; margin-inline-end: 16px; vertical-align: middle; }
  #view table.tk-ctab.tk-orders td[data-l].tk-ct-1::before, #view table.tk-ctab.tk-orders td[data-l].tk-ct-2::before, #view table.tk-ctab.tk-orders td[data-l].tk-ct-3::before,
  #view table.tk-ctab.tk-rules td[data-l].tk-ct-2::before, #view table.tk-ctab.tk-rules td[data-l].tk-ct-3::before { flex: none; }
  #view table.tk-ctab.tk-orders td[data-l].tk-ct-5::before, #view table.tk-ctab.tk-rules td[data-l].tk-ct-3::before { display: none; }
  #view table.tk-ctab.tk-orders tr:not(.tk-ct-div) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0; }
  #view table.tk-ctab.tk-orders td.tk-ct-0 { flex: 1 1 100%; }
  #view table.tk-ctab.tk-orders td[data-l].tk-ct-4 { order: 9; flex: 1 1 100%; margin-top: 2px; }
  #view table.tk-ctab td.tk-ct-0 { margin-bottom: 2px; }
}
/* A column's name stays on one line («ينطبق على» broke in two). */
.tk-ctab th { white-space: nowrap; }
/* The projects' switch fits a phone without scrolling: a little less room inside each choice. (brand.css's
   «.seg > a:not(.btn)» outranked the plain selector, so «In-house» was cut at the screen's edge.) */
@media (max-width: 760px) { .tk-toolrow .seg > a:not(.btn) { padding: 6px 8px; font-size: 13px; } }
.tk-nav { display: inline-flex; align-items: center; gap: 5px; }
.nav-ch { flex: none; display: block; }
@media (max-width: 760px) {
  .tk-range { gap: 6px; }
  .tk-range .btn.small { padding: 5px 10px; }
  .tk-range-t { font-size: 13px; padding: 0 2px; }
}

/* ---------------------------------------------------------------- the review of 2026-10-24, second pass */
/* The side menu's counts are round badges, as in People's menu; an empty one is not drawn. */
.tk-side .hrm-b:empty { display: none; }
/* The plan with nothing in it says so above its days. */
.card.tk-plan-none { padding: 16px 18px; margin: 0 0 12px; }
@media (max-width: 760px) {
  /* The toolbar on a phone: the views, the search across, then Group by and Sort side by side, then the buttons. */
  .tk-bar-tools > label.tk-tl { order: 2; flex: 1 1 calc(50% - 6px); }
  .tk-bar-tools > label.tk-tl > span { white-space: nowrap; }
  .tk-bar-tools > label.tk-tl select { flex: 1 1 auto; }
  .tk-bar-tools > button.btn { order: 3; flex: 1 1 auto; }
  /* The Workload on a phone: the table as wide as its days need, scrolling in its card; the name column wide
     enough for a name in two lines (brand.css sets every min-width in #view to 0, so these say #view). */
  #view .wl-wrap table.wl { width: max-content; min-width: 100%; }
  #view .wl th.wl-who, #view .wl td.wl-who { width: 150px; min-width: 150px; max-width: 170px; }
  /* A day's column is wide enough that its name never touches the next one's. */
  #view .wl th.wl-h, #view .wl td.wl-c { width: 34px; padding-inline: 5px; }
}
/* An English name or room inside an Arabic inbox line stays whole: where it does not fit it takes a line of its own,
   rather than tearing across lines with its brackets and the «» around it falling at the wrong ends. */
html[dir=rtl] .tk-in-t bdi, html[dir=rtl] .tk-in-more bdi { display: inline; unicode-bidi: isolate; }
@media (max-width: 560px) {
  /* An inbox row on a phone: the checkbox beside the first line, Done and Snooze under the text, on its edge. */
  .tk-in-b { flex: 1 1 0; }
  .tk-in-r { padding-inline-start: 30px; }
}
/* The Inbox's own buttons keep together: on a phone they share one row of their own under the choices, never one left alone. */
.tk-in-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 760px) { .tk-in-bar .grow { display: none; } .tk-in-acts { flex: 1 1 100%; } }
/* A toolbar choice («Status», «Date») is a value, said in the ink of text, not in the label's grey. */
.tk-tl select { color: var(--ui-ink); }
/* The bar's gap spaces its two choices; the extra start margin a second choice takes elsewhere pushed it in when it wrapped. */
.tk-in-bar .seg + .seg { margin-inline-start: 0; }

/* التقدم: how far a task, a department, a person or a project has come (2026-11-15, public/js/tasks.js). */
.tk-pg { display: inline-block; flex: none; width: 64px; height: 6px; background: #efe6cc; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.tk-pg i { display: block; height: 100%; background: #9a9265; border-radius: 99px; transition: width .2s; }
.tk-pg.full i { background: #5d8a5f; }
.tk-pg.big { width: 100%; min-width: 120px; height: 9px; }
.tk-pg.huge { width: 100%; height: 14px; }
.tk-pgr { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.tk-pgr em { font-style: normal; font-size: 12px; color: #6b6657; min-width: 34px; font-variant-numeric: tabular-nums; }
.tk-card .tk-pgr { display: flex; margin: 6px 0 2px; }
.tk-card .tk-pgr .tk-pg { flex: 1; width: auto; }
.tk-dr-pg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.tk-dr-pg .tk-pg.big { flex: 1 1 160px; width: auto; }
.tk-dr-pg b { min-width: 44px; font-variant-numeric: tabular-nums; }
.tk-dr-pg input[type="range"] { flex: 1 1 100%; accent-color: #8f8a68; }
.tk-pgall { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.tk-pgbig { flex: 1 1 260px; }
.tk-pgbig b { display: block; font-family: var(--ui-serif, Georgia, serif); font-size: 44px; line-height: 1.1; margin-bottom: 8px; }
.tk-pgfs { display: flex; gap: 22px; flex-wrap: wrap; }
.tk-pgf b { display: block; font-size: 24px; line-height: 1.2; }
.tk-pgf span { font-size: 13px; color: #6b6657; }
.tk-pgf.bad b { color: #a3352b; }
.tk-pgw { overflow-x: auto; }
.tk-pgrow { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(120px, 3fr) 52px 64px 64px 64px; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px dashed #eee4c6; min-width: 560px; }
.tk-pgrow:last-child { border-bottom: 0; }
.tk-pgrow.head { font-size: 12px; color: #6b6657; border-bottom: 1px solid #e3dabd; padding-top: 0; }
.tk-pgrow .c { text-align: center; font-variant-numeric: tabular-nums; }
.tk-pgrow .tk-pgp { font-variant-numeric: tabular-nums; }
.tk-pgrow .bad { color: #a3352b; font-weight: 600; }
@media (max-width: 640px) { .tk-row .tk-pgr .tk-pg { width: 40px; } .tk-pgbig b { font-size: 34px; } }

.tk-dr-soc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; }

/* The task's work in the platform's layout (2026-11-15). */
.tk-soc-form { display: grid; gap: 8px; }
.tk-soc-plats { display: flex; gap: 14px; flex-wrap: wrap; }
.tk-soc-form textarea { width: 100%; }
.tk-soc-prev { margin-top: 12px; }
.tk-soc-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.tk-soc-gap { flex: 1 1 12px; }
.tk-soc-host.mobile { width: min(100%, 290px); margin: 0 auto; }
.tk-soc-host.desktop { width: 100%; }
.tk-soc-note { text-align: center; }

/* The Progress page on a phone: each row is the name, its bar and figure, and under them what is done, open and late. */
@media (max-width: 640px) {
  .tk-pgrow { min-width: 0; grid-template-columns: 1fr auto; grid-template-areas: "n p" "b b" "d d"; gap: 6px 10px; padding: 12px 2px; }
  .tk-pgrow.head { display: none; }
  .tk-pgrow > .tk-pgn { grid-area: n; font-weight: 600; min-width: 0; }
  .tk-pgrow > .tk-pgp { grid-area: p; }
  .tk-pgrow > .tk-pg { grid-area: b; }
  .tk-pgrow > .c { grid-row: 3; text-align: start; font-size: 13px; color: #6b6657; }
  .tk-pgrow > .c::before { content: attr(data-l) " "; }
  .tk-pgrow { grid-template-columns: repeat(3, auto) 1fr; grid-template-areas: "n n n p" "b b b b"; }
  .tk-pgw { overflow-x: visible; }
  .tk-row .tk-pgr em { min-width: 30px; }
}
@media (max-width: 640px) { .tk-pgrow > .tk-pgp { justify-self: end; } .tk-pgrow > .c { white-space: nowrap; } }

/* The new-task form, and a task's approval (2026-11-16). */
.nt-req { color: #a3352b; font-style: normal; margin-inline-start: 3px; }
.nt-bad { border-color: #a3352b !important; box-shadow: 0 0 0 2px rgba(163, 53, 43, .18); }
#nt-pnew { margin-top: 6px; width: 100%; }
.nt-appr { margin: 10px 0 2px; align-items: flex-start; gap: 8px; }
.tk-dr-ap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; padding: 8px 10px; border-radius: 10px; background: #f6f1e0; }
.tk-dr-ap.wait { background: #f7edcf; }
.tk-dr-apb { display: inline-flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.tk-dr-aph { margin: 8px 0 2px; gap: 8px; }

/* The task as the one who does it sees it: only what moves the work on (public/js/tasks.js simplify). */
.tk-simple .tk-dr-cols { display: block; }
.tk-simple .tk-ro { background: transparent; border-color: transparent; box-shadow: none; color: inherit; opacity: 1; -webkit-text-fill-color: currentColor; padding-inline: 0; resize: none; }
.tk-simple .df-btn { display: none; }
.tk-simple-more { margin-top: 18px; text-align: center; }

/* Passing a task on to the next person (2026-11-16). */
.tk-dr-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 4px; }
.tk-pass { display: grid; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid var(--line, #d9d2bd); border-radius: 12px; background: var(--paper-2, #f6f1e2); }
.tk-pass select, .tk-pass input { width: 100%; min-height: 44px; }

/* Deleting a task: for whoever made it (2026-11-16). */
.tk-del { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 22px 0 8px; padding-top: 14px; border-top: 1px solid var(--line, #d9d2bd); }

/* A task's files, each opened inside the office and seen on the platforms (2026-11-16). */
.tk-files .tk-fi { display: grid; grid-template-columns: 52px 1fr; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line, #e4dcc6); list-style: none; }
.tk-fi-th { grid-row: span 2; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--paper-2, #f1eadb); text-decoration: none; color: inherit; font-size: 12px; font-weight: 700; }
.tk-fi-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-fi-n { overflow-wrap: anywhere; font-weight: 600; }
.tk-fi-do { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-view { position: fixed; inset: 0; z-index: 4000; background: var(--ui-card, #fffcf5); display: flex; flex-direction: column; overflow: auto; -webkit-overflow-scrolling: touch; padding: max(10px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
.tk-view-bar, .tk-view-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.tk-view-bar { position: sticky; top: 0; background: inherit; z-index: 2; border-bottom: 1px solid var(--line, #e4dcc6); }
.tk-view-n { overflow-wrap: anywhere; max-width: 100%; }
.tk-view-gap { flex: 1 1 auto; }
.tk-view-body { flex: 1 1 auto; display: grid; place-items: center; padding: 12px 0; min-height: 240px; }
.tk-view-body.plat { place-items: start center; }
.tk-view-body.plat .tk-soc-host.mobile { width: min(100%, 360px); }
.tk-view-body.plat .tk-soc-host.desktop { width: min(100%, 900px); }
.tk-view-img { max-width: 100%; max-height: 78vh; border-radius: 10px; display: block; }
.tk-view-pdf { width: 100%; height: 80vh; border: 0; }
.tk-view-note { text-align: center; }
.tk-view .btn { min-height: 40px; }

/* The viewer moves as a phone does: it rises when opened, and a change of platform or file is a swipe (2026-11-16). */
.tk-view-body { position: relative; overflow-x: clip; }
.tk-ghost { position: absolute; inset: 0; display: grid; place-items: start center; padding: 12px 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes tk-in-right { from { opacity: 0; transform: translateX(70%); } to { opacity: 1; transform: none; } }
  @keyframes tk-in-left { from { opacity: 0; transform: translateX(-70%); } to { opacity: 1; transform: none; } }
  @keyframes tk-out-left { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-70%); } }
  @keyframes tk-out-right { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(70%); } }
  @keyframes tk-fade-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
  @keyframes tk-view-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .tk-view { animation: tk-view-up .28s cubic-bezier(.22, .8, .3, 1) both; }
  .tk-in-right { animation: tk-in-right .34s cubic-bezier(.22, .8, .3, 1) both; }
  .tk-in-left { animation: tk-in-left .34s cubic-bezier(.22, .8, .3, 1) both; }
  .tk-out-left { animation: tk-out-left .3s ease-in both; }
  .tk-out-right { animation: tk-out-right .3s ease-in both; }
  .tk-fade-in { animation: tk-fade-in .22s ease-out both; }
}

/* Each piece carries its caption, where it stands and its notes, beside what is seen of it (2026-11-16). */
.tk-fi-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tk-fi-cap { overflow-wrap: anywhere; }
.tk-fi-sum { margin: 2px 0 8px; }
.tk-view-main { flex: 1 1 auto; display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.tk-view-stage { min-width: 0; }
.tk-view-side { display: grid; gap: 12px; min-width: 0; padding-bottom: 24px; }
.tk-vp { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--ui-line, #e4dcc6); border-radius: 12px; background: var(--paper-2, #f8f3e6); }
.tk-vp textarea, .tk-vp input[type="url"] { width: 100%; min-height: 44px; font: inherit; }
.tk-vp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-vp-row textarea { flex: 1 1 200px; }
.tk-vp-ck { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.tk-vp-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.tk-vp-notes li { padding: 8px 10px; border-radius: 10px; background: var(--ui-card, #fffcf5); overflow-wrap: anywhere; }
@media (min-width: 980px) {
  .tk-view-main { grid-template-columns: minmax(0, 1fr) 400px; }
  .tk-view-side { position: sticky; top: 64px; max-height: calc(100vh - 90px); overflow: auto; }
}
.tk-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 8px 0; }
.tk-vp-notes li.sys { opacity: .75; font-style: italic; }
@media (max-width: 979px) { .tk-view-body:not(.plat) .tk-view-img { max-height: 46vh; } }

/* The file chooser is a proper button for a finger, not a 22-pixel line (audit 2026-11-16). */
#tk-file { min-height: 46px; padding: 6px 0; width: 100%; font: inherit; }
#tk-file::file-selector-button { min-height: 40px; margin-inline-end: 10px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ui-line, #d9d2bd); background: var(--ui-card, #fffcf5); font: inherit; font-weight: 600; cursor: pointer; }

/* The heads' approval of each piece, said by name (2026-11-16). */
.tk-apv { border-width: 2px; border-color: #c9a646; }
.tk-apv.done { border-color: #3f7a44; background: #eef5ea; }
.tk-apv.edits { border-color: #b3392f; background: #f8e9e6; }
.tk-apv-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-apv-l li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tk-apv-n { font-weight: 700; min-width: 110px; }
.tk-apv-ask { display: grid; gap: 8px; }
.tk-apv .btn.primary { min-height: 46px; }
.tk-apc { white-space: nowrap; }
.tk-apc-me { font-weight: 700; }
.tk-fi-ap { min-height: 40px; }
