/* H1 Work: styles for this module only. Tokens from tokens.css only (no raw hex). */

/* priority dot, small facts under a title */
.tk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--mute); flex: none; }
.tk-dot.high { background: var(--err-fill); }
.tk-dot.normal { background: var(--brand); }
.tk-dot.low { background: var(--mute); opacity: .6; }
.tk-m { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; color: var(--ink-3); }
.tk-m .i { width: 13px; height: 13px; }
.tk-m.dim { color: var(--ink-4); }
.tk-row .pt small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; white-space: normal; overflow: visible; min-width: 0; }
.tk-row .pt { min-width: 0; }
.tk-row .pr { flex-wrap: nowrap; }
.tk-row.review, .tk-row.done { opacity: .88; }
.tk-state { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.tk-state.done { background: var(--ok-soft); color: var(--ok); }
.tk-state .i { width: 14px; height: 14px; }
.plates.review .pl-tag { background: var(--warn-fill); }
.hm-main > .plates + .plates, .hm-main > .btools + .plates { margin-top: 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 13px; }

/* select several */
.tk-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-l); background: var(--brand-soft); border: 1px solid var(--brand-line); position: sticky; top: 8px; z-index: 5; }
.tk-bulk b { font-weight: 640; color: var(--info); margin-right: 4px; }
.tk-bulk-g { display: inline-flex; align-items: center; gap: 6px; }
.tk-bulk .in.mini { height: 34px; width: auto; max-width: 160px; }

/* team */
.tk-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tk-person, .tp-late, .tp-h { min-width: 0; }
.tk-person { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.tk-people > .tk-person:first-child { border-top: 0; padding-top: 2px; }
.tp-h { display: flex; align-items: center; gap: 12px; }
.tp-n { display: grid; min-width: 0; flex: 1; }
.tp-n small { color: var(--ink-3); font-size: 13px; }
.tp-f { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tp-f .fig b { font-size: 20px; }
.tp-late { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.tp-late a em { flex: none; }
form[hidden] { display: none !important; }
.tk-stl { margin-top: 4px; justify-self: end; }
.tp-late a { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: var(--r-s); color: var(--ink); font-size: 14px; }
.tp-late a:hover { background: var(--hover); text-decoration: none; }
.tp-late a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-late a em { font: 600 12px var(--mono); font-style: normal; }

/* board: four columns */
.kan.k4 { grid-auto-columns: minmax(250px, 1fr); }
.tk-card .kfoot { gap: 8px; }
.tk-card .kfoot .tk-m { margin-right: 0; }
.tk-card .kmore { margin-left: auto; }

/* calendar */
.tk-cal-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.tk-cal-h b { font-size: 18px; font-weight: 640; min-width: 150px; text-align: center; }
.tk-cal-h .gsp { flex: 1; }
.tk-cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; }
.tk-wds, .tk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tk-wds { background: var(--panel-sunk); border-bottom: 1px solid var(--line); }
.tk-wd { padding: 8px 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.tk-day { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 104px; padding: 6px; text-align: left; border: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background var(--t-1); min-width: 0; }
.tk-day:nth-child(7n + 1) { border-left: 0; }
.tk-grid > .tk-day:nth-child(-n + 7) { border-top: 0; }
.tk-day:hover { background: var(--hover); }
.tk-day.out { background: var(--panel-sunk); color: var(--ink-4); }
.tk-day .dn { font: 560 13px var(--mono); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.tk-day.today .dn { background: var(--brand); color: var(--brand-ink); }
.tk-evs { display: grid; gap: 2px; min-width: 0; }
.tk-ev { display: block; padding: 1px 6px; border-radius: 5px; font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--info-soft); color: var(--info); }
.tk-ev.high { background: var(--err-soft); color: var(--err); }
.tk-ev.low { background: var(--mute-soft); color: var(--mute); }
.tk-ev.done { text-decoration: line-through; opacity: .65; }
.tk-more { font-size: 12px; color: var(--ink-3); padding-left: 6px; }
.tk-pips { display: none; gap: 3px; flex-wrap: wrap; }
.tk-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.tk-pips i.high { background: var(--err-fill); }
.tk-pips i.low { background: var(--mute); }
.tk-cal-note { margin-top: 10px; }
.tk-daylist .plate { grid-template-columns: 28px minmax(0, 1fr) auto; }

/* task sheet */
.stbtns { margin: 4px 0 12px; }
.tk-prog-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 600 12.5px var(--mono); color: var(--ink-3); }
.tk-prog-h .bar { flex: 1; }
.tk-check { display: grid; }
.tk-ci { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.tk-ci:first-child { border-top: 0; }
.tk-ci > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tk-ci.done > span { color: var(--ink-3); text-decoration: line-through; }
.tk-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.tk-inline .in, .tk-inline .fld { flex: 1 1 160px; min-width: 0; width: auto; }
.tk-flip { transform: rotate(180deg); }
.tk-inline .fld > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tk-at { color: var(--info); font-weight: 560; }
.tk-ment { margin: -4px 0 0; }
.tk-w { gap: 6px; padding-left: 3px; height: 28px; }
.tk-w .av { width: 20px; height: 20px; font-size: 11px; }
.tk-w .ibtn.sm { width: 22px; height: 22px; }
.tk-review { margin: 8px 0 14px; }
.tk-review form { margin-top: 8px; }
.ibtn.sm { width: 28px; height: 28px; }
.ibtn.sm .i { width: 14px; height: 14px; }

/* attachments */
.att-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.att-i { position: relative; display: grid; gap: 3px; align-content: start; min-width: 0; }
.att-th { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--r-m); overflow: hidden; background: var(--panel-sunk); border: 1px solid var(--line); color: var(--ink-3); }
.att-th img { width: 100%; height: 100%; object-fit: cover; }
.att-th.pdf { gap: 2px; align-content: center; }
.att-th.pdf .i { width: 28px; height: 28px; }
.att-n { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-i small { color: var(--ink-3); font-size: 12px; }
.att-x { position: absolute; top: 4px; right: 4px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 50%; }
.att-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

/* templates and calendar link */
.tk-tpl { padding: 12px 0; border-top: 1px solid var(--line); }
.tk-tpl:first-child { border-top: 0; }
.tk-tpl.off { opacity: .6; }
.tpl-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.tpl-h .gsp { flex: 1; }
.tk-tpl ol { margin: 0 0 0 20px; padding: 0; display: grid; gap: 2px; color: var(--ink-2); font-size: 14px; }
.tk-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.tk-steps li { display: flex; gap: 12px; align-items: flex-start; }
.tk-steps b { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--info); font: 600 13px var(--mono); }

@media (max-width: 640px) {
  .tk-row .pt b { white-space: normal; overflow-wrap: anywhere; }
  .tk-row { padding-left: 12px; padding-right: 12px; }
  .tk-day { min-height: 56px; padding: 4px; align-items: center; }
  .tk-evs { display: none; }
  .tk-pips { display: flex; justify-content: center; }
  .tk-cal-h b { min-width: 0; flex: 1; font-size: 16px; }
  .tp-f { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tk-bulk { top: 4px; }
  .tk-bulk .in.mini { max-width: 130px; }
  .kan.k4 { grid-auto-columns: 82%; }
  .tk-m { margin-right: 8px; }
}

.tk-hm > .hm-main, .tk-hm > .hm-side { grid-template-columns: minmax(0, 1fr); }
