/* Converter Desk. Owner: Converter agent. Uses rd.css tokens only. Flow-tool look: panel left, Stage right. */
html:has(.cv-page),.cv-page{overflow:hidden}
.cv{display:grid;grid-template-columns:380px minmax(0,1fr);height:calc(100vh - 61px);height:calc(100dvh - 61px)}
.cv-side{border-inline-end:var(--line);overflow-y:auto;background:var(--white);min-width:0}
.cv-phead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:var(--line)}
.cv-wm{font:400 24px/1 var(--f-title);margin:0}
.cv-wm em{font:300 italic 24px var(--f-body);color:var(--taupe)}
.cv-phead .btn{gap:6px}
.cv-phead .btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.cv-step{padding:16px 20px;border-bottom:var(--hair)}
.cv-step:last-child{border-bottom:0}
.cv-step h2{display:flex;align-items:center;gap:10px;margin:0 0 12px;font:400 19px/1.2 var(--f-sub)}
.cv-step h2 b{font:400 13px var(--f-title);border:var(--line);border-radius:var(--r);min-width:24px;height:24px;display:grid;place-items:center;background:var(--white)}

.cv-drop{display:grid;justify-items:center;gap:6px;text-align:center;padding:18px 14px;border:1px dashed var(--mineral);border-radius:var(--r);background:var(--frost);transition:border-color .15s}
.cv-drop svg{fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;color:var(--slate)}
.cv-drop b{font:400 15px var(--f-body)}
.cv-drop.is-over{border-color:var(--taupe);border-style:solid}
.cv-drop .small{max-width:30ch}
.cv-btns{display:flex;gap:8px;margin-top:6px}
.cv-model{margin-top:12px}
.cv-model-name{margin:0;font-weight:400;overflow-wrap:anywhere}
.cv-model .small{margin:2px 0 0}
.note{margin-top:12px;font-size:15px}

.cv-in{width:100%;min-height:44px;border:1px solid var(--mist);border-radius:var(--r);background:var(--white);color:var(--ink);padding:8px 12px;font:300 15px/1.5 var(--f-body)}
textarea.cv-in{min-height:76px;resize:vertical}
.cv-in::placeholder{color:var(--mineral);font-style:italic}
.cv-in:focus{outline:none;border-color:var(--taupe);box-shadow:0 0 0 1px var(--taupe)}
.cv-fld{display:block;margin-bottom:12px}
.cv-fld:last-child{margin-bottom:0}
.cv-fld>span,.cv-lbl{display:block;font-size:14px;color:var(--slate);margin-bottom:4px}
.cv-chips{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.cv-chips .chip{border-color:var(--mist)}
.cv-chips .chip[aria-pressed="true"]{border-color:var(--ink)}
.cv-hint{margin:8px 0 0}

.cv-exp{display:grid;gap:8px}
.cv-exp .btn{justify-content:center;width:100%}
.cv-exp .btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}
.cv-exp .btn .cv-lock{margin-inline-start:auto;width:18px;height:18px}
.cv-exp .btn.is-locked{opacity:1}
.cv-exp .btn.is-locked:not(.secondary){background:var(--frost);color:var(--ink);border-color:var(--ink)}
.cv-exp .btn:disabled{opacity:.5;cursor:not-allowed}
.cv-status{margin:10px 0 0;min-height:20px}
.cv-lock-note{display:flex;gap:8px;align-items:center;margin:10px 0 0;color:var(--slate)}
.cv-lock-note svg{flex:none;fill:none;stroke:currentColor;stroke-width:1.5}
.cv-out{margin-top:12px;padding-top:12px;border-top:var(--hair)}
.cv-copyrow{display:flex;gap:8px;align-items:flex-start}
.cv-copyrow .cv-in{flex:1;min-width:0}
.cv-copyrow textarea.cv-in{min-height:76px;font:300 12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
.cv-copyrow .btn{flex:none;min-height:44px}
.cv-meta{margin:6px 0 12px}
.cv-bar{height:4px;background:var(--haze);border-radius:2px;overflow:hidden;margin-top:12px}
.cv-bar span{display:block;height:100%;width:0;background:var(--taupe);transition:width .2s}
.cv-bar-lg{width:min(280px,70vw);margin:12px auto 0}

/* stage */
.cv-stagewrap{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.cv-shead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 20px;border-bottom:var(--hair);background:var(--white);flex-wrap:wrap}
.cv-shead b{font:400 17px var(--f-sub)}
.cv-acts{display:flex;gap:8px;flex-wrap:wrap}
.cv-stage{flex:1;min-height:0;position:relative}
.cv-empty{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;z-index:1}
.cv-empty-in{display:grid;justify-items:center;gap:14px;max-width:420px}
.cv-boxicon svg{width:44px;height:44px;fill:none;stroke:var(--slate);stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.cv-empty p{margin:0;display:grid;gap:4px}
.cv-empty p b{font:400 22px/1.2 var(--f-title)}
.cv-empty p span{color:var(--slate)}
.cv-example{display:flex;align-items:center;gap:14px;text-align:start;width:100%;padding:8px;border:var(--line);border-radius:var(--r);background:var(--white);color:var(--ink);cursor:pointer;font:300 15px var(--f-body);min-height:44px}
.cv-example:hover{background:var(--haze)}
.cv-example img{width:96px;height:58px;object-fit:cover;border-radius:2px;flex:none;border:1px solid var(--haze)}
.cv-example span{display:grid;gap:2px;min-width:0}
.cv-example b{font:400 15px var(--f-body)}
.cv-example small{color:var(--slate);font-size:13px}
.cv-busy{position:absolute;inset:0;z-index:5;display:grid;place-content:center;justify-items:center;text-align:center;padding:24px;background:color-mix(in srgb,var(--frost) 88%,transparent);color:var(--ink)}
.cv-busy p{margin:0}
.cv-busy .rd-load::before{width:32px}
.cv-dropveil{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:color-mix(in srgb,var(--paper) 82%,transparent);border:3px dashed var(--taupe);pointer-events:none}
.cv-dropveil p{margin:0;padding:12px 24px;background:var(--white);border:var(--line);border-radius:var(--r);font:400 20px var(--f-title)}

/* dialogs */
.rd-dialog h3{margin:0 32px 12px 0}
.cv-item{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:var(--hair)}
.cv-item-t{min-width:0;flex:1 1 200px;display:grid}
.cv-item-t b{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-item-a{display:flex;gap:8px;flex-wrap:wrap}

/* phones: panel above the viewer */
@media(max-width:820px){
  html:has(.cv-page),.cv-page{overflow:auto}
  .cv{display:block;height:auto}
  .cv-side{border-inline-end:0;border-bottom:var(--line);overflow:visible}
  .cv-stagewrap{overflow:visible}
  .cv-stage{height:min(78vh,640px);min-height:420px;flex:none}
  .cv-shead{padding:8px 12px}
  .cv-acts .btn{flex:1 1 auto}
  .cv-empty p b{font-size:19px}
}
@media(max-width:380px){
  .cv-step{padding:16px 14px}.cv-phead{padding:12px 14px}.cv-shead{padding:8px 10px}
}
@media(pointer:coarse){.cv-chips .chip{min-height:44px}}

/* view.html (public shared view) */
.vw{padding-top:24px;padding-bottom:8px}
.vw-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.vw-head h1{font-size:clamp(28px,4vw,44px)}
.vw-head p{margin:6px 0 0}
.vw-acts{display:flex;gap:8px;flex-wrap:wrap}
.vw-stage{position:relative;height:clamp(420px,74vh,860px);border:var(--line);border-radius:var(--r)}
.vw-msg{display:grid;justify-items:start;gap:12px;padding:32px 24px;border:var(--line);border-radius:var(--r);background:var(--frost)}
.vw-msg h2{font-size:clamp(24px,3.4vw,36px)}
.vw-msg p{margin:0}
html.vw-embed #rd-header,html.vw-embed #rd-footer,html.vw-embed .vw-head{display:none}
html.vw-embed .vw{padding:0;max-width:none}
html.vw-embed .vw-stage{height:100vh;height:100dvh;border:0;border-radius:0}
@media(max-width:820px){.vw-stage{height:clamp(380px,70vh,640px)}.vw-acts .btn{flex:1 1 auto}}
