/* Review workspace: spacious layout + persistent item strip. */
#review-workspace .rw-current-item{display:none;}
#review-workspace .rw-canvas-bar{justify-content:flex-end;min-height:64px;padding:9px 20px;}
#review-workspace .rw-preview-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%;}
#review-workspace .rw-version-control{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:650;color:#757681;padding:0 9px 0 0;}
#review-workspace .rw-version-control select,
#review-workspace .rw-compare-options select{
  padding:8px 24px 8px 10px;border-radius:9px;
  border:1px solid #e2dfe4;background:#f6f4f2;color:#434652;
  font-size:12px;font-weight:600;max-width:165px;
}
#review-workspace .rw-compare-options{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
#review-workspace .rw-compare-options[hidden]{display:none!important;}
#review-workspace #rw-opacity-wrap[hidden]{display:none!important;}
#review-workspace .rw-canvas-scroll{height:calc(100dvh - 314px);min-height:340px;}
#review-workspace .rw-proof-wrap.tablet-mode{width:min(100%,650px);}
#review-workspace .rw-item-strip{
  display:flex;align-items:center;gap:11px;flex:none;
  padding:12px 18px;
  overflow-x:auto;overscroll-behavior-x:contain;
  white-space:nowrap;
  background:#fbfaf8;
  border-top:1px solid #e8e5e2;
  scrollbar-width:thin;
}
#review-workspace .rw-item-strip button{
  flex:none;
  border:1px solid #e7e3df;
  border-radius:11px;
  background:#f6f4f2;color:#696b74;
  padding:9px 15px;
  font-size:12px;font-weight:600;
  cursor:pointer;
}
#review-workspace .rw-item-strip button[aria-current="true"]{
  border-color:#8b65db;color:#6737c9;background:#f0eafb;
}
#review-workspace .rw-item-strip button:hover{background:#eee8f7;color:#5d39a9;}
#review-workspace .rw-rail-tab{width:40px;height:43px;}
#review-workspace .rw-vertical-nav{gap:11px;padding-top:23px;}
#review-workspace .rw-panel-body{padding:23px 20px;max-height:calc(100dvh - 263px);scrollbar-width:thin;}
#review-workspace .rw-panel-header{padding:21px 19px 19px;}
#review-workspace .rw-task-pill{display:inline-block;margin:7px 0 4px;padding:4px 9px;font-size:10px;font-weight:650;color:#90591c;background:#fff1dc;border-radius:20px;}
/* Stage overview. Only active stage is expanded; prior and upcoming stay compact. */
#review-workspace .rwf-panel{display:flex;flex-direction:column;gap:20px;min-width:0;}
#review-workspace .rwf-preview-role{border:1px solid #ebe7e5;background:#fbfaf8;border-radius:13px;padding:14px;display:grid;gap:11px;}
.rwf-preview-role>span{font-size:11px;font-weight:700;color:#4e5360;}
.rwf-preview-role>div{display:flex;gap:4px;flex-wrap:wrap;}
#review-workspace .rwf-preview-role button{flex:1;border:1px solid #e1dce7;border-radius:8px;background:transparent;padding:9px 5px;color:#74717d;font-size:11px;cursor:pointer;}
#review-workspace .rwf-preview-role button[aria-pressed="true"]{border-color:#a18adf;background:#eee8fa;color:#5b2eac;font-weight:700;}
.rwf-preview-role small,.rwf-hint{font-size:11px;color:#98949e;line-height:1.6;margin:0;}
.rwf-summary{display:grid;gap:5px;padding:0 1px;}
.rwf-summary strong{font-size:15px;color:#303342;}
.rwf-summary small{font-size:11px;color:#96949c;}
.rwf-stage{background:#f8f6f4;border:1px solid #ebe7e2;border-radius:13px;position:relative;overflow:visible;}
.rwf-stage.is-expanded{background:#fff;border-color:#dfd6e9;}
.rwf-stage-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:63px;background:transparent;border:0;padding:13px 12px;cursor:pointer;text-align:left;}
.rwf-stage-toggle>span:first-child{display:grid;gap:4px;flex:1;min-width:0;}
.rwf-stage-toggle strong{font-size:12px;font-weight:700;color:#303544;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rwf-stage-toggle small{font-size:10px;color:#868995;}
.rwf-stage-toggle>.icon{width:14px;height:14px;color:#898791;transition:transform .12s;}
.rwf-stage.is-expanded .rwf-stage-toggle>.icon{transform:rotate(90deg);}
.rwf-stage-head-faces{display:flex;align-items:center;gap:5px;flex:none;max-width:122px;}
.rwf-stage-head-faces .rwf-person{width:24px;height:24px;}
.rwf-stage-head-faces .rwf-person-role,.rwf-stage-head-faces .rwf-person-status{display:none;}
.rwf-stage-head-faces .rwf-extra{font-size:10px;color:#8d8d96;font-weight:650;}
.rwf-vertical-flow{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 12px 24px;}
.rwf-owner,.rwf-gate-row{display:flex;justify-content:center;min-height:51px;}
.rwf-reviewer-row{display:flex;justify-content:center;flex-wrap:wrap;align-items:center;gap:16px;min-height:51px;}
.rwf-line{display:block;width:1px;height:27px;flex:none;background:#d0c8dc;position:relative;opacity:.66;}
.rwf-line::after{content:"";position:absolute;width:6px;height:6px;bottom:0;left:-3px;transform:rotate(45deg);border-bottom:1px solid #ac9fbf;border-right:1px solid #ac9fbf;}
.rwf-decision{position:relative;display:flex;justify-content:center;gap:32px;margin-top:3px;}
.rwf-decision::before{content:"";position:absolute;top:-5px;left:26%;right:26%;height:1px;background:#d1c8dc;}
.rwf-decision>div{display:flex;align-items:center;flex-direction:column;gap:4px;color:#a18c9b;font-size:10px;}
.rwf-decision>div:last-child{color:#72a18c;}
.rwf-decision .icon{height:15px;width:15px;stroke-width:1.2;}
.rwf-decision small{font-size:10px;}
.rwf-empty-person{font-size:10px;color:#96949a;border-radius:20px;border:1px dashed #d4ccd8;padding:8px 12px;}
.rwf-person{display:inline-grid;place-items:center;position:relative;width:31px;height:31px;flex:none;cursor:default;border-radius:50%;outline:none;}
.rwf-person.rwf-large{width:48px;height:48px;}
.rwf-person-photo{width:100%;height:100%;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:#e7e0f1;color:#755da7;border:1px solid #fff;font-size:11px;font-weight:700;}
.rwf-person-photo img{display:block;width:100%;height:100%;object-fit:cover;}
.rwf-person-role,.rwf-person-status{position:absolute;top:-4px;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:#fcf9ff;color:#7250af;border:1px solid #e9e0f6;}
.rwf-person-role{left:-5px;}
.rwf-person-status{right:-5px;color:#7c95a8;background:#f4f9fb;}
.rwf-person-status.complete{color:#258665;background:#eaf9ef;}
.rwf-person-status.current{color:#7d57b0;background:#f0eafb;}
.rwf-person-role .icon,.rwf-person-status .icon{width:10px;height:10px;stroke-width:1.6;}
.rwf-person-popover{position:absolute;top:calc(100% + 9px);left:50%;transform:translateX(-50%);z-index:70;display:none;flex-direction:column;gap:5px;padding:11px 13px;min-width:160px;background:#101114;color:#fff;border-radius:10px;box-shadow:0 12px 32px #15141c30;white-space:nowrap;}
.rwf-person-popover strong{font-size:12px;}
.rwf-person-popover small{font-size:10px;color:#bdc0c8;}
.rwf-person:hover,.rwf-person:focus-within{z-index:71;}
.rwf-person:hover .rwf-person-popover,.rwf-person:focus .rwf-person-popover{display:flex;}
.rwf-stage-actions{display:grid;gap:9px;padding:0 14px 17px;}
.rwf-stage-actions button,.rwf-edit-toggle,.rwf-editor button,.rwf-qa-actions button,.rwf-qa-panel>.rwf-primary{border:1px solid #e2dde8;border-radius:9px;padding:10px 12px;font-size:11px;font-weight:650;cursor:pointer;background:#faf8fc;color:#6b43aa;}
.rwf-stage-actions .rwf-primary,.rwf-qa-panel>.rwf-primary,.rwf-editor .rwf-primary{background:#7542d9;color:#fff;border-color:#7542d9;}
.rwf-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.rwf-stage-actions .rwf-action-grid button{min-height:44px;line-height:1.3;}
.rwf-task-list{display:grid;gap:11px;border-top:1px solid #efebee;padding-top:15px;margin-top:6px;}
.rwf-task-list>strong{font-size:12px;color:#555768;}
.rwf-task-list>div{display:flex;align-items:center;gap:12px;}
.rwf-task-list>div>span{flex:1;overflow-wrap:anywhere;font-size:11px;color:#555e68;line-height:1.5;}
.rwf-task-list>div>button{font-size:10px;padding:7px 9px;}
.rwf-task-list .icon{width:12px;height:12px;}
.rwf-task-list>p{font-size:11px;color:#9a96a2;margin:0;}
.rwf-return-form,.rwf-warning{display:grid;gap:10px;margin-top:6px;padding:14px;border:1px solid #eadde9;border-radius:12px;background:#f9f5fb;}
.rwf-return-form p,.rwf-warning p{font-size:11px;line-height:1.5;color:#77717f;margin:0;}
.rwf-warning{background:#fff3ef;border-color:#f0d7d1;}
.rwf-warning strong{font-size:12px;color:#ae4e46;}
.rwf-warning>.icon{width:17px;height:17px;color:#b64d51;}
.rwf-checkbox{display:flex;align-items:center;gap:9px;font-size:11px;color:#4f5663;padding:5px 0;}
.rwf-checkbox input{accent-color:#7340d5;}
.rwf-checkbox>.rwf-person{width:25px;height:25px;}
.rwf-checkbox>.rwf-person .rwf-person-role,.rwf-checkbox>.rwf-person .rwf-person-status{display:none;}
.rwf-field{display:grid;gap:8px;font-size:11px;color:#595867;font-weight:650;}
.rwf-field input,.rwf-field textarea{background:#fff;border:1px solid #e4dee8;padding:10px 12px;border-radius:9px;color:#242637;min-width:0;width:100%;font-size:12px;}
.rwf-edit-toggle{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;}
.rwf-edit-toggle .icon,.rwf-editor button .icon{width:14px;height:14px;}
.rwf-editor{display:grid;gap:18px;border:1px solid #e8e2e9;border-radius:13px;padding:15px;background:#faf8fb;}
.rwf-editor>p{margin:0;color:#85828a;font-size:11px;line-height:1.6;}
.rwf-edit-stage{display:grid;gap:12px;padding:13px;border:1px solid #ece6ed;background:#fff;border-radius:11px;}
.rwf-edit-tools{display:flex;gap:8px;justify-content:flex-end;}
.rwf-edit-tools button{padding:7px 10px;}
.rwf-edit-person{display:flex;align-items:center;gap:9px;font-size:11px;color:#575966;}
.rwf-edit-person>span:nth-child(2){flex:1;}
.rwf-edit-person button{padding:7px;}
.rwf-member-picker{display:grid;gap:12px;border-radius:11px;padding:12px;background:#f1ecf8;}
.rwf-member-picker p{font-size:11px;margin:0;color:#5d536c;}
.rwf-member-picker>div:first-of-type{display:flex;flex-wrap:wrap;gap:7px;}
.rwf-member-picker button{font-size:10px;padding:6px;}
.rwf-member-picker .rwf-person{width:23px;height:23px;}
.rwf-member-picker .rwf-person-role,.rwf-member-picker .rwf-person-status{display:none;}
.rwf-choice-row{display:flex;gap:7px;}
.rwf-choice-row button[aria-pressed="true"]{background:#6c44c9;color:#fff;}
.rwf-history{border-top:1px solid #eee9f0;padding:15px 3px;}
.rwf-history summary{cursor:pointer;font-size:11px;font-weight:650;color:#6e6875;}
.rwf-history p{font-size:11px;color:#5d6070;line-height:1.5;}
.rwf-history p small{color:#9c97a6;margin-right:7px;}
/* QA mascots are lightweight animated visual prototypes, not connected AI agents. */
.rwf-qa-panel{display:grid;gap:19px;}
.rwf-mascots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
.rwf-mascot{display:flex;align-items:center;flex-direction:column;gap:5px;border-radius:13px;padding:15px 4px;background:#f7f3fb;text-align:center;}
.rwf-mascot>img,.rwf-mascot>span:first-child{width:47px;height:47px;object-fit:contain;display:grid;place-items:center;font-size:31px;animation:rwf-float 3s ease-in-out infinite;}
.rwf-mascot:nth-child(2)>span:first-child{animation-delay:.4s;}
.rwf-mascot:nth-child(3)>span:first-child{animation-delay:.8s;}
.rwf-mascot>span:nth-child(2){font-size:12px;font-weight:750;color:#4c3c65;}
.rwf-mascot small{font-size:9px;color:#88828f;line-height:1.4;}
.rwf-qa-list{display:grid;gap:15px;}
.rwf-qa-finding{background:#f8f6f9;border:1px solid #ebe5ed;border-radius:12px;padding:15px;display:grid;gap:9px;}
.rwf-qa-source{font-size:11px;font-weight:700;color:#7245c2;}
.rwf-qa-finding p{font-size:12px;line-height:1.55;color:#363b46;margin:0;}
.rwf-qa-finding>small{font-size:10px;color:#92909a;line-height:1.5;}
.rwf-qa-actions{display:flex;flex-wrap:wrap;gap:7px;}
.rwf-qa-actions button{padding:8px;font-size:10px;}
.rwf-rule-queue{background:#f6f4f2;padding:15px;border-radius:12px;display:grid;gap:8px;}
.rwf-rule-queue strong{font-size:11px;color:#5f576e;}
.rwf-rule-queue small{font-size:10px;color:#9693a0;line-height:1.5;}
.rwf-empty{font-size:12px;color:#99959e;}
@keyframes rwf-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@media(max-width:1100px){
 #review-workspace .rw-shell{grid-template-columns:45px minmax(0,1fr) 45px minmax(240px,295px);}
 #review-workspace .rw-panel-body{padding:18px 13px;}
 #review-workspace .rw-canvas-bar{padding:10px;}
}
@media(max-width:700px){
 #review-workspace .rw-preview-actions{justify-content:flex-end;}
 #review-workspace .rw-canvas-bar{padding:10px;min-height:68px;}
 #review-workspace .rw-item-strip{padding:9px 12px;}
 #review-workspace .rw-panel-body{padding:18px 14px;max-height:none;}
 #review-workspace .rw-version-control{padding:0;}
}
@media(prefers-reduced-motion:reduce){.rwf-mascot>img,.rwf-mascot>span:first-child{animation:none!important;}}

/* Narrow screens: preserve the original two-column, stacked review panels. */
@media(max-width:940px){
 #review-workspace .rw-shell{
   grid-template-columns:52px minmax(0,1fr);
   grid-template-rows:minmax(500px,1fr) auto;
 }
 #review-workspace .rw-shell.rw-panel-collapsed{
   grid-template-columns:52px minmax(0,1fr);
 }
 #review-workspace .rw-vertical-nav{grid-column:1;grid-row:2;flex-direction:column;}
 #review-workspace .rw-right-panel{grid-column:2;grid-row:2;min-height:240px;}
 #review-workspace .rw-panel-body{max-height:none;}
}
@media(max-width:700px){
 #review-workspace .rw-shell,
 #review-workspace .rw-shell.rw-panel-collapsed{grid-template-columns:46px minmax(0,1fr);}
 #review-workspace .rw-canvas-scroll{height:400px;min-height:340px;}
}

/* Re-reviewer identity selection is deliberately a demo control. */
.rwf-acting{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:9px 0;}
.rwf-acting>small{width:100%;font-size:10px;color:#92909b;}
#review-workspace .rwf-acting button{
  display:flex;align-items:center;gap:7px;min-width:0;
  padding:6px 8px;border:1px solid #e4dce8;background:#f8f5fa;
  color:#696473;border-radius:10px;font-size:10px;
}
#review-workspace .rwf-acting button[aria-pressed="true"]{
  border-color:#a88adf;color:#6b42af;background:#eee6fb;
}
.rwf-acting .rwf-person{width:24px;height:24px;}
.rwf-acting .rwf-person-role,.rwf-acting .rwf-person-status{display:none;}

/* Exactly one sidebar toggle visible: right-panel collapse OR rail expand. */
#review-workspace .rw-shell:not(.rw-panel-collapsed) #rw-expand-panel{display:none!important;}
#review-workspace .rw-shell.rw-panel-collapsed #rw-expand-panel{
  display:grid!important;
  color:#6e3abd;font-weight:800;
  border-bottom:1px solid #e7e2eb;
  border-radius:0;margin-bottom:9px;
}
