/* Play widgets: product moments in the style of the item-discussion widget.
   Each .pw plays its timeline when on screen, with a Zenoo cursor doing the work, then offers Replay. */
.pw { --hl: #e7e5e0; --ink: #202124; --ink2: #5f6368; --ink3: #80868b; --acc: #6548e8; --acc-t: #f5f2ff; --side: #faf9f6;
  --amb: #a8650d; --amb-t: #fff3df; --grn: #1e7a46; --grn-t: #e8f3ec; --red: #c5221f; --red-t: #fde8e7;
  --mono: "JetBrains Mono", ui-monospace, monospace; position: relative; min-width: 0; font: 400 13.5px/1.5 "Inter", system-ui, sans-serif; color: var(--ink); }
.pw-frame { position: relative; background: #fff; border: 1px solid #e2e0da; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(20,12,60,.28), 0 0 0 1px rgba(20,12,60,.03); }
.pw-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hl); min-width: 0; }
.pw-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pw-sp { flex: 1; }
.pw-mono { font: 400 12px var(--mono); color: var(--ink3); white-space: nowrap; }
.pw-av { width: 24px; height: 24px; border-radius: 50%; background: #3f4249; color: #fff; display: inline-grid; place-items: center; font: 600 9.5px/1 "Inter", sans-serif; flex: none; }
.pw-av.sq { border-radius: 6px; background: #eceae4; color: #3c3f45; }
.pw-av.p { background: var(--acc); }
.pw-replay { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--hl); border-radius: 8px; background: #fff; font: 500 12.5px/1 "Inter", sans-serif; color: var(--ink); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; }
.pw.ended .pw-replay { opacity: 1; pointer-events: auto; }
.pw-replay svg, .pw .i { width: 14px; height: 14px; flex: none; }
.pw-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); min-height: 470px; }
.pw-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: var(--side); border-right: 1px solid var(--hl); }
.pw-rail span { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: var(--ink2); }
.pw-rail span.on { background: var(--acc-t); color: var(--ink); }
.pw-rail svg { width: 18px; height: 18px; }
.pw-main { position: relative; min-width: 0; padding: 16px 18px 18px; }
.pw-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--ink2); }
.pw-h b { color: var(--ink); font-size: 15px; }
.pw-k { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

/* reveal */
.pw [data-at]:not(.pw-go):not(.st) { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.pw [data-at].on:not(.pw-go):not(.st) { opacity: 1; transform: none; }
.pw .typing::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; background: var(--acc); vertical-align: -2px; animation: pw-blink .8s steps(1) infinite; }
@keyframes pw-blink { 50% { opacity: 0; } }

/* cursor */
.pw-cur { position: absolute; z-index: 30; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; transform: translate(70%, 60%); transition: transform .7s cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 2px 3px rgba(20,12,60,.35)); }
.pw-cur svg { width: 22px; height: 22px; display: block; }
.pw-cur::after { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; transform: scale(.4); }
.pw-cur.click::after { animation: pw-ping .5s ease-out; }
.pw-cur .tag { position: absolute; left: 18px; top: 18px; background: var(--acc); color: #fff; font: 600 10.5px/1 "Inter", sans-serif; padding: 4px 6px; border-radius: 5px; white-space: nowrap; }
@keyframes pw-ping { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }

/* shared bits */
.pw-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: #f1f0ed; color: #4a4d55; white-space: nowrap; }
.pw-chip.amb { background: var(--amb-t); color: var(--amb); }
.pw-chip.grn { background: var(--grn-t); color: var(--grn); }
.pw-chip.acc { background: var(--acc-t); color: var(--acc); }
.pw-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font: 500 13px/1 "Inter", sans-serif; border: 1px solid var(--hl); background: #fff; color: var(--ink); white-space: nowrap; transition: background .2s, transform .15s; }
.pw-btn.pri { background: var(--ink); border-color: var(--ink); color: #fff; }
.pw-btn.dis { background: #f1f0ed; border-color: #f1f0ed; color: #a3a6ad; }
.pw-btn.pressed { transform: scale(.96); }
.pw-ai { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 13px; background: #f7f6f3; border-radius: 10px; color: var(--ink2); }
.pw-ai .mk { width: 18px; height: 18px; margin-top: 2px; }
.pw-ai b { color: var(--ink); font-weight: 500; }
.pw-ai .act { color: var(--acc); font-weight: 500; }
.pw-ai small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink3); }
.pw-note { margin-top: 12px; font-size: 13px; color: var(--grn); display: flex; align-items: center; gap: 6px; }
.pw-note.amb { color: var(--amb); }
.pw-tick { width: 16px; height: 16px; border-radius: 50%; background: var(--grn); display: inline-grid; place-items: center; flex: none; }
.pw-tick::after { content: ""; width: 7px; height: 4px; border: 1.8px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

/* W1: inbox and two PEP hits */
.pw-list { border-top: 1px solid var(--hl); }
.pw-row { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--hl); }
.pw-row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-row .t small { color: var(--ink3); margin-left: 6px; }
.pw-sc { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid #c77a13; position: relative; }
.pw-sc::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 8.5px/1 "Inter", sans-serif; color: #c77a13; }
.pw-sc.q { border-color: #c4c2cc; }
.pw-sc.q::after { content: ""; }
.pw-row .res { display: none; }
.pw.d1 .r1 .res, .pw.d2 .r2 .res { display: inline-flex; }
.pw.d1 .r1 .due, .pw.d2 .r2 .due { display: none; }
.pw.d1 .r1 .t, .pw.d2 .r2 .t { color: var(--ink3); text-decoration: line-through; text-decoration-color: #c9c7cf; }
.pw.d1 .r1 .pw-sc, .pw.d2 .r2 .pw-sc { border-color: var(--grn); background: var(--grn); }
.pw.d1 .r1 .pw-sc::after, .pw.d2 .r2 .pw-sc::after { content: ""; width: 6px; height: 3px; border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); inset: auto; position: static; display: block; margin: 3px auto 0; }
.pw.o1 .r1, .pw.o2 .r2 { background: var(--acc-t); }
.pw-pop { position: absolute; left: 14px; right: 14px; top: 58px; z-index: 5; background: #fff; border: 1px solid var(--hl); border-radius: 14px; padding: 14px 16px 16px;
  box-shadow: 0 18px 40px -16px rgba(20,12,60,.35); display: none; }
.pw.o1:not(.d1) .pop1, .pw.o2:not(.d2) .pop2 { display: block; animation: pw-pop .35s ease both; }
@keyframes pw-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.pw-pop h4 { margin: 2px 0 10px; font: 600 16px/1.3 "Inter", sans-serif; }
.pw-cmp { width: 100%; border-collapse: collapse; margin: 10px 0 12px; font-size: 12.5px; }
.pw-cmp th { text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 6px 4px; border-bottom: 1px solid var(--hl); }
.pw-cmp td { padding: 7px 4px; border-bottom: 1px solid #f0efeb; }
.pw-cmp td.m { font-family: var(--mono); font-size: 12px; }
.pw-why { margin-top: 10px; border: 1px solid var(--hl); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.pw-why small { display: block; color: var(--ink3); font-size: 11.5px; }
.pw-why p { margin: 2px 0 0; min-height: 1.4em; }
.pw-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.pw-count { margin-top: 14px; display: flex; align-items: center; gap: 8px; color: var(--ink2); }
.pw-count b { font: 600 13px var(--mono); color: var(--ink); }

/* W2: evidence and drop */
.pw-case { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pw-case h4 { margin: 0; font: 600 16px/1.2 "Inter", sans-serif; }
.pw-tabs { display: flex; gap: 16px; margin: 12px 0 0; border-bottom: 1px solid var(--hl); font-size: 13px; color: var(--ink2); overflow: hidden; }
.pw-tabs span { padding: 0 0 9px; white-space: nowrap; }
.pw-tabs span.on { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--ink); }
.pw-sumrow { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; color: var(--ink2); flex-wrap: wrap; }
.pw-drop { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1.5px dashed #c9c5da; border-radius: 8px; color: var(--ink2); font-size: 12.5px; transition: background .25s, border-color .25s; }
.pw-drop b { color: var(--ink); font-weight: 500; }
.pw-zone { position: absolute; inset: 120px 14px 14px 14px; border: 2px dashed var(--acc); border-radius: 12px; background: rgba(245,242,255,.92); z-index: 6; display: none; place-items: center; text-align: center; padding: 20px; }
.pw.over .pw-zone { display: grid; animation: pw-pop .25s ease both; }
.pw.dropped .pw-zone { display: none; }
.pw-zone b { display: block; font: 600 16px/1.3 "Inter", sans-serif; }
.pw-zone span { display: block; margin-top: 4px; color: var(--ink2); max-width: 300px; }
.pw-files { position: absolute; z-index: 7; right: -260px; top: 230px; display: grid; gap: 6px; transition: transform 1.3s cubic-bezier(.45,.05,.25,1), opacity .3s; }
.pw.drag .pw-files { transform: translateX(-470px); }
.pw.dropped .pw-files { opacity: 0; }
.pw-files span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--hl); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: 0 8px 18px -10px rgba(20,12,60,.35); }
.pw-ft { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font: 600 7.5px/1 var(--mono); color: #fff; background: #d0463b; flex: none; }
.pw-ft.img { background: #3777d5; }
.pw-tray { display: grid; gap: 6px; margin: 4px 0 12px; }
.pw-up { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; padding: 9px 10px; border: 1px solid var(--hl); border-radius: 10px; }
.pw-up .fn { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-up .fn small { font: 400 11px var(--mono); color: var(--ink3); margin-left: 6px; }
.pw-up .st { display: none; margin-top: 3px; font-size: 12.5px; color: var(--ink2); align-items: center; gap: 6px; flex-wrap: wrap; }
.pw-up .st.on:not(:has(~ .st.on)) { display: flex; }
.pw-bar { width: 120px; height: 4px; border-radius: 2px; background: #eceae4; overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: 0; background: var(--acc); }
.pw-up .st.on .pw-bar i { animation: pw-fill .9s ease forwards; }
@keyframes pw-fill { to { width: 100%; } }
.pw-working { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--acc-t); border-top-color: var(--acc); animation: pw-spin .8s linear infinite; }
@keyframes pw-spin { to { transform: rotate(360deg); } }
.pw-up .to { color: var(--ink); }
.pw-up .warn { color: var(--amb); font-weight: 500; }
.pw-chk { border-top: 1px solid var(--hl); }
.pw-chk div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #f0efeb; font-size: 13px; }
.pw-chk .party { color: var(--ink3); font-size: 12px; }
.pw-chk .s2 { display: none; }
.pw.dropped.isfiled .pw-chk .x .s1 { display: none; }
.pw.dropped.isfiled .pw-chk .x .s2 { display: inline-flex; }

/* W3: document review */
.pw-doc { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; }
.pw-kv { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 6px 10px; margin: 12px 0; font-size: 13px; }
.pw-kv dt { color: var(--ink3); }
.pw-kv dd { margin: 0; }
.pw-cite { font: 500 10.5px/1 var(--mono); color: var(--acc); background: var(--acc-t); border-radius: 4px; padding: 2px 4px; margin-left: 4px; }
.pw-pass { border: 1px solid var(--hl); border-radius: 12px; background: linear-gradient(160deg, #f4f1fb, #eef2f7); padding: 12px; font-size: 10px; color: #4a4d55; align-self: start; }
.pw-pass .ph { width: 54px; height: 66px; border-radius: 6px; background: linear-gradient(180deg, #d9d6e3, #c9c6d6); float: left; margin: 0 10px 8px 0; }
.pw-pass p { margin: 0 0 4px; }
.pw-pass p span { display: block; color: #9a9da5; font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; }
.pw-pass .mrz { clear: both; font: 400 8.5px/1.4 var(--mono); letter-spacing: .04em; color: #6b6f76; padding-top: 6px; border-top: 1px dashed #d4d1dd; word-break: break-all; }
.pw-pass .hl { outline: 2px solid var(--acc); outline-offset: 1px; border-radius: 3px; transition: outline-color .3s; }
.pw-state { display: none; }
.pw.verified .pw-state { display: flex; }
.pw.verified .pw-acts { display: none; }

/* W4: structure from the register, then Approve */
.pw-str { width: 100%; border-collapse: collapse; font-size: 13px; }
.pw-str th { text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 7px 4px; border-bottom: 1px solid var(--hl); }
.pw-str td { padding: 9px 4px; border-bottom: 1px solid #f0efeb; vertical-align: middle; }
.pw-str td:first-child { display: flex; align-items: center; gap: 8px; }
.pw-str tr { transition: opacity .4s, transform .4s; }
.pw-str tbody tr[data-at] { opacity: 0; transform: translateY(6px); }
.pw-str tbody tr.on { opacity: 1; transform: none; }
.pw-src { margin-top: 10px; font-size: 12.5px; color: var(--ink3); }
.pw-appr { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hl); flex-wrap: wrap; }
.pw-out b { font-family: var(--mono); }
.pw .lock { display: inline-flex; }
.pw.clear .lock { display: none; }
.pw.clear .apbtn { background: var(--ink); border-color: var(--ink); color: #fff; }
.pw.clear .pw-out { background: var(--grn-t); color: var(--grn); }
.pw-clear { display: none; margin-top: 16px; text-align: center; padding: 16px 10px 4px; }
.pw.inbox0 .pw-clear { display: block; animation: pw-pop .45s ease both; }
.pw-clear svg { width: 150px; height: 105px; }
.pw-clear b { display: block; margin-top: 8px; font: 600 17px/1.3 "Inter", sans-serif; }
.pw-clear span { display: block; margin: 4px auto 0; max-width: 340px; color: var(--ink2); font-size: 13px; }

/* layout around the widget */
.pw-sec .split { align-items: center; }
@media (max-width: 860px) {
  .pw-body { grid-template-columns: 42px minmax(0, 1fr); min-height: 0; }
  .pw-rail span { width: 30px; height: 30px; }
  .pw-doc { grid-template-columns: 1fr; }
  .pw-pass { max-width: 260px; }
  .pw-main { padding: 14px 12px 14px; }
  .pw-files { top: 210px; }
  .pw.drag .pw-files { transform: translateX(-330px); }
  .pw-pop { left: 8px; right: 8px; }
  .pw-cmp th:nth-child(4), .pw-cmp td:nth-child(4) { display: none; }
  .pw-row .due { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pw *, .pw *::after { animation: none !important; transition: none !important; } .pw-cur { display: none; } }

.pw-go { display: none !important; }
.pw .mk{width:16px;height:16px;flex:none;display:block}
.pw-up>span:first-child .mk{width:18px;height:18px}
.pw-top b{white-space:nowrap}
@media (max-width:480px){.pw-top .pw-mono{display:none}}
.pw svg.mk,.cd svg.mk{padding:0;border-radius:0;display:block}
/* QA 16 Oct: narrow phones. Keep tables and tab rows inside the frame. */
@media (max-width:480px){
  .pw .pw-str th:nth-child(3),.pw .pw-str td:nth-child(3){display:none}
  .pw .pw-tabs{overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);mask-image:linear-gradient(90deg,#000 82%,transparent)}
}
