/* css/views/project.css — project split view (#/p/:pid/:tab), its tabs, drawers and flow cards.
   Rules: red = action/danger, --brand crimson = page identity, blue = positive/done, never green for status. */

/* ---------------- shell ---------------- */
.pv { height: 100%; display: flex; flex-direction: column; }
.pv-head { height: 54px; flex: none; display: flex; align-items: center; gap: 9px; padding: 0 22px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13px; color: var(--mut); white-space: nowrap; min-width: 0; }
.pv-head .crumb { display: inline-flex; align-items: center; gap: 5px; color: var(--mut); font-weight: 500; margin-right: 6px; }
.pv-head .crumb:hover { color: var(--ink); }
.pv-head .pv-title { margin: 0; line-height: inherit; white-space: nowrap; color: var(--ink); font-size: 15.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; min-width: 80px; }
.pv-head .sep { color: var(--mut3); }
.pv-head .pv-kind { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pv-head .grow { flex: 1; min-width: 8px; }
.pv-people .av { border: 0; cursor: pointer; }
.pv-people .av:hover { transform: translateY(-1px); z-index: 1; }
.pv-people .av-more { background: var(--surface); color: var(--mut); box-shadow: 0 0 0 2px var(--bg), inset 0 0 0 1.5px var(--line2); }
.pv-viewas { border: 1.5px solid rgba(0,0,0,.25); border-radius: var(--r-pill); padding: 5px 12px; font: 600 12px var(--sans); display: inline-flex; align-items: center; gap: 6px; color: var(--ink); background: transparent; }
.pv-viewas:hover { border-color: var(--ink); }
.pv .split { flex: 1; min-height: 0; }
.pv-tabs { padding: 0 22px; background: var(--bg); position: sticky; top: 0; z-index: 3; }
.pv-body { padding: 18px 22px 70px; max-width: 1060px; }
.pv-body > * + * { margin-top: 14px; }
.link { display: inline; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 2px; }
.link:hover { text-decoration-color: currentColor; }
.small { font-size: 12px; }
.lbl-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut2); font-weight: 600; }
.pv .disclaimer { margin-top: 18px; }

/* ---------------- chat pane ---------------- */
.pv-chat .elpis-thread { padding: 18px 20px 10px; }
.pv-greet .body { border-color: var(--line2) !important; background: var(--soft2) !important; }
.pv-quick { margin-top: 10px; }
.pv-quick .chip { font-size: 12.5px; padding: 5px 12px; }
.pv-acts { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--pink-2); background: var(--pink-t); color: var(--red-d); border-radius: var(--r-pill); padding: 4px 11px; font: 700 12.5px var(--sans); }
.pv-acts b { background: var(--red); color: #fff; border-radius: 20px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font: 700 10.5px var(--mono); }
.pv-acts:hover, .pv-acts.on { border-color: var(--red); }
.pv-acts svg { width: 12px; height: 12px; }
.pv-tray { margin: 0 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; animation: rise .2s var(--ease) both; }
.pv-tray-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.pv-tray-row:first-child { border-top: 0; }
.pv-tray-row .ic { color: var(--ai); text-align: center; }
.pv-tray-row.flag .ic { color: var(--red); }
.pv-ev { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.pv-ev > svg { margin-top: 3px; color: var(--bblue); flex: none; }
.pv-ev.undone { color: var(--mut2); font-size: 12.5px; align-items: center; }
.pv-ev a { color: var(--bblue); }

/* ---------------- flow cards (chase, doc dock) ---------------- */
.pvf { margin: 0 4px 10px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; animation: rise .24s var(--ease) both; }
.pvf-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 6px; flex-wrap: wrap; }
.pvf .eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-d); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pvf-steps { display: flex; gap: 10px; font-size: 11.5px; color: var(--mut3); }
.pvf-steps span { display: inline-flex; align-items: center; gap: 4px; }
.pvf-steps b { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font: 700 9px var(--mono); }
.pvf-steps .on { color: var(--ink); font-weight: 600; }
.pvf-steps .done { color: var(--bblue); }
.pvf-bd { padding: 4px 14px 10px; max-height: 42vh; overflow-y: auto; }
.pvf-lbl { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut2); font-weight: 600; margin: 2px 0 8px; }
.pvf-item { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 6px; font-size: 13.5px; }
.pvf-item:hover { border-color: var(--line2); }
.pvf-item.on { border-color: var(--red); background: #FFF8F7; }
.pvf-item .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pvf-item.on .box { background: var(--red); border-color: var(--red); }
.pvf-item .t small { display: block; font-size: 11.5px; color: var(--mut2); }
.pvf-item .due { font: 500 11px var(--mono); color: var(--mut2); }
.pvf-item .due.late { color: var(--red-d); } .pvf-item .due.today { color: var(--emph); }
.pvf-seg { margin-top: 2px; }
.pvf-hint { font-size: 12px; color: var(--mut2); margin-top: 8px; }
.pvf-meta { padding: 0 0 8px; grid-template-columns: 58px 1fr; align-items: center; }
.pvf-subj { width: 100%; padding: 6px 10px; font-size: 13.5px; font-weight: 600; }
.pvf-body { width: 100%; min-height: 190px; font-size: 13.5px; }
.pvf-ft { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--soft2); flex-wrap: wrap; }
.pvf-ft .grow, .pvd-ft .grow { flex: 1; }
.pvf-mini { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top-color: var(--brand); font-size: 13px; }
.pvf-mini .eyebrow { color: var(--brand); }
.pvf-mini b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- overview ---------------- */
.pv-status { grid-template-columns: 104px 1fr; }
.pv-status.h-danger, .pv-status.h-overdue { border-top-color: var(--red); }
.pv-status .pv-who { color: var(--red); font-weight: 600; text-decoration: none; }
.pv-status em .pv-who { color: inherit; }
.pv-status .steplink { color: inherit; text-decoration: underline; text-decoration-color: rgba(0,0,0,.2); }
.pv-summary { font-size: 14px; line-height: 1.6; color: var(--ink2); }
.pv-details .pv-who { text-decoration: none; font-weight: 600; }
.pv-details a { color: var(--bblue); font-weight: 600; }
.pv-fine { font-size: 12.5px; color: var(--mut); margin-top: 8px; line-height: 1.5; }
.pv-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-links .chip { font-size: 12.5px; padding: 5px 12px; }
.pv-plan .card-hd h3 { font-size: 15px; }
.pv-plan-rows { border-top: 1px solid var(--line); }
.pv-plan-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pv-plan-row .k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.pv-plan-ft { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.pv-plan-ft .mut { flex: 1; min-width: 200px; }
.pv-reviews { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.pv-rev { display: grid; grid-template-columns: 10px minmax(0,1.4fr) minmax(0,1fr) auto 112px; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.pv-rev:first-child { border-top: 0; }
.pv-rev:hover { background: var(--soft2); }
.pv-rev .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-d); }
.pv-rev.h-done .dot { background: var(--bblue); } .pv-rev.h-danger .dot { background: var(--emph); } .pv-rev.h-overdue .dot { background: var(--red); }
.pv-rev .t small { display: block; color: var(--mut2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-rev .o { color: var(--mut); font-size: 12.5px; }
.pv-rev .d { text-align: right; font-size: 11px; }
.pv-tl { list-style: none; margin: 0; padding: 4px 0 0 0; position: relative; }
.pv-tl li { display: grid; grid-template-columns: 92px 14px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; }
.pv-tl .when { font-size: 11px; color: var(--mut2); text-align: right; }
.pv-tl .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bblue); position: relative; top: 1px; box-shadow: 0 0 0 3px var(--bg); }
.pv-tl li.warn .dot { background: var(--red); } .pv-tl li.elpis .dot { background: var(--brand); } .pv-tl li.fact .dot { background: var(--teal-d); }
.pv-tl a { color: inherit; }
.pv-tl a:hover { color: var(--bblue); }
/* lean (requester) */
.pv-lean-card h2 { font-size: 21px; font-weight: 800; margin: 4px 0 12px; }
.pv-prog { height: 8px; background: var(--nested); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.pv-prog span { display: block; height: 100%; background: var(--bblue); border-radius: 10px; transition: width .4s var(--ease); }
.pv-next { margin: 0; padding-left: 20px; }
.pv-next li { padding: 6px 0; font-size: 14px; }
.pv-next li .mut { display: block; font-size: 12.5px; }
.pv-last { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; }
.pv-fallback { background: rgba(255,255,255,.5); border-radius: var(--r-lg); border: 1.5px dashed var(--line2); }

/* ---------------- health pills (shared) ---------------- */
.pvs-health { display: inline-flex; align-items: center; gap: 5px; font: 600 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; white-space: nowrap; background: var(--teal-t); color: var(--teal-d); }
.pvs-health.h-done { background: var(--blue-t); color: var(--bblue); }
.pvs-health.h-danger { background: var(--emph-t); color: var(--emph); }
.pvs-health.h-overdue { background: var(--danger-bg); color: var(--danger-fg); }
.pvs-health.h-queued { background: var(--graphite-t); color: var(--graphite); }
.h-danger > b { color: var(--emph); } .h-overdue > b { color: var(--red); }

/* ---------------- workflow ---------------- */
.wf-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 8px; }
.wf-kind { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line2); background: var(--surface); border-radius: 10px; padding: 7px 13px; font-weight: 700; font-size: 13px; }
.wf-kind:hover { border-color: var(--ink); }
.wf-kind.on { border-color: var(--brand); background: var(--brand-t); color: var(--brand); }
.wf-kind .tag { font-size: 9px; padding: 0 6px; }
.wf-note { font-size: 12.5px; color: var(--mut); }
.wf-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--mut); padding: 8px 0 2px; }
.wf-bar b { font-family: var(--mono); color: var(--ink); }
.wf-bar .grow { flex: 1; }
.wf-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; }
.wf-legend .lg { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 6px; background: var(--teal-d); }
.wf-legend .lg.done { background: var(--bblue); } .wf-legend .lg.danger { background: var(--emph); } .wf-legend .lg.overdue { background: var(--red); }
.wf-graph { display: flex; flex-direction: column; align-items: stretch; padding: 10px 0 6px; }
.wf-wire { display: block; width: 100%; height: 28px; overflow: visible; }
.wf-wire path { fill: none; stroke: #9C968E; stroke-width: 1.5; }
.wf-wire-1 { height: 16px; }
.wf-graph > .wf-wire-1 { width: 100%; }
.wf-par .wf-wire-1 { height: 12px; }
.wf-node { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--blue-2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); transition: box-shadow var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.wf-node.wide { max-width: 540px; margin: 0 auto; }
.wf-node:hover { box-shadow: var(--shadow-2); border-color: var(--bblue); transform: translateY(-1px); }
.wf-node .wf-t { min-width: 0; }
.wf-node .wf-t b { display: block; font-size: 13.5px; line-height: 1.3; }
.wf-node .wf-t small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mut); margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wf-node .wf-t small .av { width: 16px; height: 16px; font-size: 7.5px; }
.wf-node .wf-when { font-family: var(--mono); font-size: 10.5px !important; color: var(--mut2) !important; }
.wf-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--teal-d); color: var(--teal-d); background: var(--surface); }
.wf-ic svg { width: 15px; height: 15px; }
.wf-ring { width: 10px; height: 10px; border-radius: 50%; background: var(--teal-d); animation: pulse 1.6s infinite; }
.wf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut3); }
.wf-node.st-done { border-color: var(--line2); }
.wf-node.st-done .wf-ic { border-color: var(--bblue); color: var(--bblue); background: var(--blue-t); }
.wf-node.st-todo .wf-ic, .wf-node.queued .wf-ic { border: 2px dashed var(--mut3); color: var(--mut3); }
.wf-node.st-todo, .wf-node.queued { border-style: dashed; border-color: var(--line2); box-shadow: none; background: rgba(255,255,255,.7); }
.wf-node.h-danger { border-color: var(--emph); } .wf-node.h-danger .wf-ic { border-color: var(--emph); color: var(--emph); } .wf-node.h-danger .wf-ring { background: var(--emph); }
.wf-node.h-overdue, .wf-node.st-waiting { border-color: var(--red); } .wf-node.h-overdue .wf-ic, .wf-node.st-waiting .wf-ic { border-color: var(--red); color: var(--red); background: var(--pink-t); }
.wf-node.focus { box-shadow: 0 0 0 3px rgba(15,58,133,.18), var(--shadow-2); }
.wf-node.tmpl { opacity: .92; }
.wf-subs { display: flex; align-items: center; gap: 3px; margin-top: 5px; }
.wf-subs i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--mut3); }
.wf-subs i.d { background: var(--bblue); border-color: var(--bblue); }
.wf-subs i.l { border-color: var(--red); }
.wf-subs b { font: 600 10px var(--mono); color: var(--mut2); margin-left: 4px; }
.wf-par { display: grid; grid-template-columns: repeat(var(--n), minmax(0,1fr)); align-items: start; }
.wf-col { padding: 0 5px; display: flex; flex-direction: column; min-width: 0; }
.wf-col .wf-node { grid-template-columns: 18px minmax(0,1fr); gap: 4px 7px; padding: 8px 9px; align-items: start; border-radius: 10px; }
.wf-col .wf-node .pvs-health { grid-column: 2; justify-self: start; font-size: 9px; padding: 1px 6px; }
.wf-col .wf-ic { width: 18px; height: 18px; border-width: 1.5px; margin-top: 1px; }
.wf-col .wf-ic svg { width: 10px; height: 10px; }
.wf-col .wf-ring { width: 7px; height: 7px; } .wf-col .wf-dot { width: 6px; height: 6px; }
.wf-col .wf-node .wf-t b { font-size: 12.5px; }
.wf-col .wf-node .wf-t small { font-size: 11px; white-space: normal; }
.wf-col .wf-subs i { width: 6px; height: 6px; }
.wf-colhd { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--teal-d); border-radius: 12px 12px 4px 4px; padding: 8px 10px; margin-bottom: 6px; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 3px 8px; align-items: center; }
.wf-colhd .wf-colic { grid-row: span 3; align-self: start; width: 22px; height: 22px; border-radius: 6px; background: var(--blue-t); color: var(--bblue); display: inline-flex; align-items: center; justify-content: center; }
.wf-colhd .wf-colic svg { width: 13px; height: 13px; }
.wf-colhd b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-colhd small { grid-column: 2; font-size: 10px; color: var(--mut2); }
.wf-colhd .wf-colst { grid-column: 2; grid-row: 3; justify-self: start; font: 700 9px var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 20px; background: var(--teal-t); color: var(--teal-d); }
.wf-colhd.h-done { border-top-color: var(--bblue); } .wf-colhd.h-done .wf-colst { background: var(--blue-t); color: var(--bblue); }
.wf-colhd.h-danger { border-top-color: var(--emph); } .wf-colhd.h-danger .wf-colst { background: var(--emph-t); color: var(--emph); }
.wf-colhd.h-overdue { border-top-color: var(--red); } .wf-colhd.h-overdue .wf-colst { background: var(--danger-bg); color: var(--danger-fg); }
.wf-colhd.h-queued { border-top-color: var(--mut3); } .wf-colhd.h-queued .wf-colst { background: var(--graphite-t); color: var(--graphite); }
.wf-col.focus .wf-colhd { box-shadow: 0 0 0 3px rgba(15,58,133,.18); }
.wf-gate { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; max-width: 540px; width: 100%; margin: 0 auto; background: var(--emph-t); border: 1.5px solid var(--emph); border-radius: 12px; padding: 10px 14px; }
.wf-gate.clear { background: var(--blue-t); border-color: var(--bblue); }
.wf-dia { width: 30px; height: 30px; transform: rotate(45deg); border: 2px solid var(--emph); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--emph); background: var(--surface); margin-left: 4px; }
.wf-dia svg { transform: rotate(-45deg); width: 14px; height: 14px; }
.wf-gate.clear .wf-dia { border-color: var(--bblue); color: var(--bblue); }
.wf-gate b { display: block; font-size: 13.5px; }
.wf-gate small { display: block; font-size: 12px; color: var(--mut); }
.wf-skip { align-self: center; display: inline-flex; align-items: center; gap: 7px; border: 1.5px dashed var(--line2); border-radius: var(--r-pill); padding: 5px 14px; font-size: 12.5px; color: var(--mut); background: rgba(255,255,255,.5); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------- documents ---------------- */
.pv-docs-hd, .pv-comms-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pv-docs-hd > div:first-child { flex: 1; }
.pv-comms-hd .grow { flex: 1; }
.pv-docrow { grid-template-columns: minmax(0, 1fr) 150px 112px 74px auto; padding: 7px 12px; }
.pv-docrow.mine { background: #FFFBF3; }
.pv-docrow.drafting { box-shadow: inset 3px 0 0 var(--brand); }
.pv-docmain { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 0; min-width: 0; }
.pv-docmain .t b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-docmain .t small { font-size: 10.5px; color: var(--mut2); }
.pv-docmain:hover b { color: var(--bblue); }
.pv-docic { width: 30px; height: 30px; border-radius: 8px; background: var(--nested); display: inline-flex; align-items: center; justify-content: center; color: var(--mut); }
.pv-docic svg { width: 15px; height: 15px; }
.pv-docown { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* doc drawer: preview + editor */
.pvdoc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.pvdoc-sum { margin: 10px 0; color: var(--ink2); font-size: 13.5px; }
.pvdoc > * + * { margin-top: 10px; }
.pvdoc-body, .pvd-doc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 18px; font-family: var(--serif); }
.pvd-cl { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pvd-cl:last-child { border-bottom: 0; }
.pvd-clh { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 13px; margin-bottom: 4px; }
.pvd-clh .btn-text { margin-left: auto; font-size: 12px; }
.pvd-clb { font-size: 14.5px; line-height: 1.55; color: var(--ink2); }
.pvd-cl.marked { background: linear-gradient(90deg, var(--pink-t), transparent 70%); margin: 0 -18px; padding: 10px 18px; }
.pvd-cl.edited { background: linear-gradient(90deg, var(--brand-t), transparent 75%); margin: 0 -18px; padding: 10px 18px; }
.pvd-cl.just { animation: flashin 1.2s var(--ease) both; }
@keyframes flashin { from { box-shadow: inset 4px 0 0 var(--brand); } to { box-shadow: inset 4px 0 0 transparent; } }
.pvd-cled { width: 100%; min-height: 120px; font-family: var(--serif); font-size: 14.5px; }
.pvd > * + * { margin-top: 12px; }
.pvd-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pvd-hd .eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; margin-right: auto; }
.pvd-instr { display: flex; gap: 8px; align-items: flex-end; }
.pvd-instr .textarea { flex: 1; min-height: 46px; resize: none; font-size: 14px; }
.pvd-chips .chip { font-size: 12px; padding: 4px 11px; }
.pvd-chips .chip:disabled { opacity: .5; }
.pvd-log { list-style: none; margin: 0; padding: 0; background: var(--soft2); border-radius: 10px; border: 1px solid var(--line); max-height: 220px; overflow-y: auto; }
.pvd-log li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.pvd-log li:first-child { border-top: 0; }
.pvd-log .n { grid-row: span 2; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 10px var(--mono); display: inline-flex; align-items: center; justify-content: center; }
.pvd-log li.none .n { background: var(--mut3); }
.pvd-log .q { font-weight: 600; }
.pvd-log .a { color: var(--mut); }
.pvd-log .a .md p { margin: 0; }
.pvd-log .spin { display: inline-block; width: 10px; height: 10px; border: 1.6px solid var(--line2); border-top-color: var(--ai); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.pvd-ft { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; }

/* step drawer */
.pvs > * + * { margin-top: 12px; }
.pvs-top { display: flex; align-items: center; gap: 8px; }
.pvs-kv > div { grid-template-columns: 110px 1fr; padding: 8px 14px; }
.pvs-kv .late { color: var(--red-d); font-weight: 600; } .pvs-kv .emph { color: var(--emph); font-weight: 600; }
.pvs-desc { font-size: 13.5px; color: var(--ink2); line-height: 1.55; }
.pvs-subs { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.pvs-subs li { display: grid; grid-template-columns: 20px 1fr auto 110px; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.pvs-subs li:first-child { border-top: 0; }
.pvs-subs .ck { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pvs-subs li.done .ck { background: var(--bblue); border-color: var(--bblue); }
.pvs-subs li.done .nm { color: var(--mut); }
.pvs-subs li.late .due { color: var(--red-d); }
.pvs-subs .due { font-size: 10.5px; color: var(--mut2); text-align: right; }
.pvs-need { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 700; color: var(--amber-d); background: var(--amber-t); border-radius: 20px; padding: 2px 9px; }
.pvs-ready { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 700; color: var(--bblue); background: var(--blue-t); border-radius: 20px; padding: 2px 9px; }
.pvs-feed { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pvs-feed + .pvs-feed { margin-top: 8px; }
.pvs-feedhd { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--soft2); border-bottom: 1px solid var(--line); font-size: 13px; }
.pvs-feedhd .tag { margin-left: auto; }
.pvs-field { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.pvs-field:first-of-type { border-top: 0; }
.pvs-field .k { color: var(--mut); font-size: 12px; }
.pvs-field.needed { background: var(--warn-bg); }
.pv-prov { font: 700 9px var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 20px; border: 1px solid currentColor; }
.prov-extracted { color: var(--bblue); } .prov-derived { color: var(--teal-d); } .prov-internal { color: var(--graphite); } .prov-supplier { color: var(--brand); }
.prov-needed { color: var(--amber-d); background: var(--surface); }
.pvs-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

/* ---------------- communications ---------------- */
.pv-comm { grid-template-columns: 30px minmax(0,1fr) auto 44px; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
.pv-comm:hover { background: var(--bg); }
.pv-comm.elpis { box-shadow: inset 3px 0 0 var(--brand); }
.pv-comm .t { min-width: 0; }
.pv-comm .t b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-comm .t small { display: block; font-size: 12px; color: var(--mut2); }
.pv-comm .snip { display: block; font-size: 12.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.pv-comm .tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pv-chic { width: 28px; height: 28px; border-radius: 50%; background: var(--nested); color: var(--mut); display: inline-flex; align-items: center; justify-content: center; }
.pv-chic.ch-email { background: var(--blue-t); color: var(--bblue); }
.pv-chic.ch-teams { background: #E7E4F3; color: #4B3F8C; }
.pv-chic.ch-portal { background: var(--brand-t); color: var(--brand); }
.pvc > * + * { margin-top: 12px; }
.pvc .draft-meta { padding: 0; }
.pvc .draft-body { margin: 0; }
.pvc-tags { display: flex; gap: 6px; }

/* narrow right pane: compress tables */
@container (max-width: 640px) { .pv-docrow { grid-template-columns: minmax(0,1fr) 104px auto; } .pv-docown, .pv-docrow > .mono { display: none; } }
.split-right { container-type: inline-size; }
@container (max-width: 560px) { .pv-rev { grid-template-columns: 10px minmax(0,1fr) auto; } .pv-rev .o, .pv-rev .d { display: none; } .wf-colhd small { display: none; } }

@media (prefers-reduced-motion: reduce) { .wf-ring { animation: none; } .pvd-cl.just { animation: none; } }


.wf-col .wf-node.solo { border-top-width: 3px; border-top-style: solid; border-top-color: var(--teal-d); border-radius: 12px; }
.wf-col .wf-node.solo.st-done { border-top-color: var(--bblue); }
.wf-col .wf-node.solo.h-danger { border-top-color: var(--emph); }
.wf-col .wf-node.solo.h-overdue, .wf-col .wf-node.solo.st-waiting { border-top-color: var(--red); }
.wf-col .wf-node.solo.queued, .wf-col .wf-node.solo.st-todo { border-top-color: var(--mut3); border-top-style: dashed; }
.wf-node .wf-eb { display: block; font: 600 9.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mut2); margin-bottom: 2px; }
.wf-col.focus .wf-node.solo { box-shadow: 0 0 0 3px rgba(15,58,133,.18), var(--shadow-2); }

.pv-ov .sechd .act, .pv-body .sechd .act { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.pv-body .sechd .mono { letter-spacing: .04em; }
