/* Capabilities screen (js/tc-caps.js) — Tuhi theme tokens only (css/tuhi-theme.css: light + dark). */
.tc-caps-rule{margin:-4px 0 12px;max-width:72ch}
.tc-cap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.tc-cap-card{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--bd);border-radius:12px;background:var(--surface-2);min-width:0}
.tc-cap-card.fit{border-color:var(--acc-ring);background:var(--surface)}
.tc-cap-card-h{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tc-cap-card-h b{margin-right:auto;color:var(--fg)}
.tc-cap-tools{margin:0;font-size:12.5px;color:var(--fg-2);line-height:1.45}
.tc-cap-card-f{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:4px}
.tc-cap-card-f a{font-size:12px;color:var(--acc-fg)}
.tc-cap-reach{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0 0 6px;font-size:13px;color:var(--fg-2)}
.tc-cap-picks{max-height:220px;overflow:auto;padding:6px;border:1px solid var(--bd-soft);border-radius:10px;background:var(--inset)}
.tm-why{font-size:12.5px;color:var(--mut);max-width:42ch}
@media (max-width:767px){.tc-cap-grid{grid-template-columns:1fr}.tm-why{max-width:none}}

/* THE CATALOG (js/tc-catalog.js) — one pattern for every Capabilities tab: header + count, search, filter chips, card grid, empty state */
.tc-caps-body{display:flex;flex-direction:column;gap:14px;min-width:0}
.tc-cat .db-ph{flex-wrap:wrap}
.tc-cat-r{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
.tc-cat-n{font-size:12.5px;font-variant-numeric:tabular-nums}
.tc-cat-bar{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.tc-cat-s{display:flex}
.tc-cat-q{width:100%;max-width:520px;height:36px;padding:0 12px;border-radius:10px;font-size:13.5px}
.tc-cat-f{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tc-cat-fl{font-size:11.5px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--mut);min-width:72px}
.tc-cat-f button.chip{font-size:12px;padding:3px 10px}
.tc-cat-more{display:inline-flex;gap:6px;flex-wrap:wrap}
.tc-cat-more[hidden]{display:none}
.tc-cat-body{display:flex;flex-direction:column;gap:16px;min-width:0}
.tc-cat-g{display:flex;flex-direction:column;gap:8px;min-width:0}
.tc-cat-gh{display:flex;align-items:baseline;gap:8px;padding-bottom:4px;border-bottom:1px solid var(--bd-soft)}
.tc-cat-gh h4{margin:0;font-size:13px;font-weight:650;color:var(--fg)}
.tc-cat-gn{margin:0;font-size:12.5px;color:var(--fg-2);line-height:1.5}
.tc-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;align-items:stretch}
.tc-cat-empty p{margin:0 0 4px}
.tc-cat-empty .tc-acts{margin-top:8px}
.tc-cat-more-line{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12.5px}
/* a card: title row, sub line, description, body, and a footer that always sits at the bottom (equal heights per row) */
.tc-cc{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--bd);border-radius:12px;background:var(--surface-2);min-width:0;height:100%;box-sizing:border-box}
.tc-cc.fit{border-color:var(--acc-ring);background:var(--surface)}
.tc-cc.tc-click:hover{border-color:var(--acc-ring);background:var(--surface)}
.tc-cc.tc-click:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.tc-cc-wide{grid-column:1/-1}
.tc-cc-muted{background:var(--surface)}
.tc-cc-h{display:flex;align-items:flex-start;gap:6px;min-width:0}
.tc-cc-lead{flex:none;font-size:16px;line-height:1.2}
.tc-cc-t{flex:1 1 auto;min-width:0;color:var(--fg);font-size:13.5px;line-height:1.35;overflow-wrap:anywhere}
.tc-cc-tags{display:inline-flex;gap:4px;flex-wrap:wrap;justify-content:flex-end;flex:none;max-width:55%}
.tc-cc-sub{color:var(--mut);font-size:11.5px;overflow-wrap:anywhere}
.tc-cc-d{margin:0;color:var(--fg-2);font-size:12.5px;line-height:1.5}
.tc-cc-why{color:var(--mut);font-size:11.5px;line-height:1.45}
.tc-cc-full{margin:0;color:var(--fg-2);font-size:13px;line-height:1.6;white-space:pre-wrap}
.tc-cc-chips{display:flex;gap:4px;flex-wrap:wrap}
.tc-cc-f{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:8px;border-top:1px solid var(--bd-soft)}
.tc-cc-f a{font-size:12px;color:var(--acc-fg)}
.tc-cc-acts{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.tc-cc-sw{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--fg-2)}
.tc-cc-slot{display:inline-flex}
.tc-cc-link,html.tuhi button.tc-cc-link{font-size:12px;background:none;border:0;padding:2px 0;color:var(--acc-fg);cursor:pointer;box-shadow:none}
.tc-cc-link:hover{text-decoration:underline}
.tc-cc-token,.tc-cc-url{display:flex;flex-direction:column;gap:6px}
.tc-cc-token[hidden]{display:none}
.tc-cc-token input,.tc-cc-url input,.tc-cc-fields input{width:100%;box-sizing:border-box}
.tc-cc-token button{align-self:flex-start}
.tc-cc-fields{display:flex;flex-direction:column;gap:8px}
.tc-cc-more summary{cursor:pointer;font-size:12px;color:var(--acc-fg)}
.tc-cc-more[open]{display:flex;flex-direction:column;gap:6px}
.tc-cc .tc-pre{max-height:280px}
/* the taskforce form's pickers: toggles in a searchable, grouped list (never a wall of checkboxes) */
.tc-pk{display:flex;flex-direction:column;gap:8px;border:1px solid var(--bd-soft);border-radius:10px;background:var(--inset);padding:10px}
.tc-pk-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tc-pk-top .tc-cat-q{flex:1 1 220px}
.tc-pk-n{margin-left:auto;font-size:12px}
.tc-pk-body{display:flex;flex-direction:column;gap:10px;max-height:340px;overflow:auto}
.tc-pk-g{display:flex;flex-direction:column;gap:4px}
.tc-pk-g[hidden]{display:none}
.tc-pk-gh{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--fg)}
.tc-pk-gh .muted{margin-left:auto;font-size:11.5px}
.tc-pk-all{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--fg-2);cursor:pointer}
.tc-pk-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:4px 12px}
.tc-pk-row{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:8px;padding:6px 8px;border-radius:8px;cursor:pointer;min-width:0}
.tc-pk-row:hover{background:var(--surface)}
.tc-pk-row[hidden]{display:none}
.tc-pk-row input{flex:none;margin-top:1px}
.tc-pk-t{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;font-size:13px;color:var(--fg);text-transform:none}
.tc-pk-t small{color:var(--mut);font-size:11.5px;line-height:1.4;overflow-wrap:anywhere}
@media (max-width:767px){
  .tc-cat-grid,.tc-pk-list{grid-template-columns:minmax(0,1fr)}
  .tc-cat-fl{min-width:0;width:100%}
  .tc-cat-q{max-width:none}
  .tc-cc-tags{max-width:none}
  .tc-cc-h{flex-wrap:wrap}
}

/* Capabilities → Library: a template body is plain text, kept readable and bounded */
.tc-pre{ white-space:pre-wrap; word-break:break-word; font:12.5px/1.55 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); background:var(--surface-2, var(--surface)); border:1px solid var(--bd); border-radius:10px; padding:12px 14px; max-height:420px; overflow:auto; margin:0; }

/* Tasks screen (js/tc-tasks.js): the step-by-step replay and the row actions */
.tc-replay{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.tc-replay .tc-pre{max-height:320px}
.tm-acts{white-space:nowrap}
.tm-acts .ghost{padding-left:8px;padding-right:8px}
@media (max-width:767px){.tm-acts{white-space:normal}}

/* PLANS & USAGE (tc-plans.js) */
.pl-usage{display:flex;flex-direction:column;gap:12px}
.pl-row{display:flex;flex-direction:column;gap:4px}.pl-row-t{display:flex;justify-content:space-between;gap:8px}
.pl-open{background:repeating-linear-gradient(90deg,var(--bd) 0 6px,transparent 6px 10px)}
.pl-cats{display:flex;flex-wrap:wrap;gap:6px}.pl-cats span{font-size:12px;padding:3px 9px;border-radius:999px;border:1px solid var(--bd)}
.pl-spark{display:flex;align-items:flex-end;gap:2px;height:48px}.pl-spark i{flex:1;background:var(--acc,#6d5cff);opacity:.75;border-radius:2px 2px 0 0;min-height:2px}
.pl-limits{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.pl-lim{display:flex;flex-direction:column;gap:3px;font-size:12px}.pl-lim input{width:110px}
.pl-editrow td{padding-top:0;border-top:0}.pl-edit{padding:6px 0 10px}
.pl-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:12px}
.pl-kpi{display:flex;flex-direction:column;gap:4px}.pl-kpi b{font-size:22px}
.pl-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.pl-rates{font-size:12px;margin-top:8px}
.pl-spark-lg{height:90px}.pl-spark i.pl-has-fail{box-shadow:inset 0 3px 0 #dc2626}
.pl-kpi.pl-attn{border-color:#f59e0b}

/* ADMIN → CAPABILITIES (PLATFORM) (tc-platform-caps.js) — theme tokens only; one column at phone width */
.tc-pc-form{max-width:640px;width:100%}
.tc-pc-form .tc-field textarea{min-height:220px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px}
.tc-pc-steps{margin:6px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:12.5px}
.tc-pc-steps code{font-size:12px;padding:1px 6px;border-radius:6px;border:1px solid var(--bd);overflow-wrap:anywhere}
.tc-pc-make .si{margin:0}
@media (max-width:767px){.tc-pc-form{max-width:100%}}
