/* Torve's existing ash/lime palette, with quiet workspace hierarchy. */
#dash-playground.pg-workspace{--pg-preview-width:360px;--pg-side-width:224px}
#dash-playground.pg-workspace .pg-layout{display:grid;grid-template-columns:var(--pg-side-width) minmax(0,1fr);grid-template-rows:58px minmax(0,1fr);height:calc(var(--pg-viewport-height,100dvh) - 100px);min-height:320px;gap:0;position:relative}
#dash-playground.pg-workspace .pg-layout>.pg-toolbar{grid-column:2;grid-row:1;padding:0 18px;width:100%}
#dash-playground.pg-workspace .pg-chat-wrap{grid-column:2;grid-row:2;height:auto;min-height:0;max-height:none;padding:0 18px 4px;overflow:hidden}
#dash-playground.pg-workspace .pg-toolbar>.pg-history{display:none}
#dash-playground.pg-workspace .pg-context-open{grid-template-columns:var(--pg-side-width) minmax(320px,1fr) var(--pg-preview-width)}
#dash-playground.pg-workspace .pg-conversations{grid-row:1/-1;grid-column:1;display:flex;flex-direction:column;gap:14px;padding:18px 14px 12px 0;border-right:1px solid var(--d-line);min-width:0;overflow:auto}
#dash-playground .pg-sidebar-heading{font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:space-between;padding:0 10px;color:var(--d-text)}
#dash-playground .pg-sidebar-heading button{display:none}
#dash-playground .pg-conversations button,#dash-playground .pg-context button,#dash-playground .pg-context-toggle,#dash-playground .pg-sidebar-toggle{font:inherit;cursor:pointer}
#dash-playground .pg-new-chat{min-height:44px;border:1px solid var(--d-border);border-radius:10px;background:var(--d-panel);text-align:left;padding:10px 14px;font-size:13px;color:var(--d-text)}
#dash-playground .pg-conversations input{width:100%;min-width:0;min-height:40px;padding:9px 11px;background:transparent;border:1px solid var(--d-border);border-radius:8px;color:var(--d-text);font-size:13px}
#dash-playground .pg-conversation-list{min-height:80px;flex:1;display:flex;flex-direction:column;gap:3px}
#dash-playground .pg-conversation-row{display:flex;align-items:center;gap:2px;border-radius:8px;position:relative;min-width:0;border:1px solid transparent}
#dash-playground .pg-conversation-row>button{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;border:0;background:transparent;padding:10px;font-size:12px;min-height:42px;color:var(--d-muted)}
#dash-playground .pg-conversation-row.active{background:var(--d-accent-soft);border-color:color-mix(in srgb,var(--d-accent) 20%,transparent)}
#dash-playground .pg-conversation-row.active>button{color:var(--d-text)}
#dash-playground .pg-conversation-row:hover{background:var(--d-hover)}
#dash-playground .pg-conversation-row details{flex:none}
#dash-playground .pg-conversation-row summary{list-style:none;color:var(--d-muted);cursor:pointer;min-width:32px;min-height:42px;display:grid;place-items:center}
#dash-playground .pg-conversation-row details[open]{position:absolute;right:0;top:0;z-index:5;min-width:130px;background:var(--d-panel);border:1px solid var(--d-border);border-radius:8px;box-shadow:0 8px 24px #0003}
#dash-playground .pg-conversation-row details[open] summary{justify-content:end;padding-right:10px}
#dash-playground .pg-conversation-row details button{display:block;width:100%;padding:10px;text-align:left;background:transparent;border:0;color:var(--d-text);font-size:12px}
#dash-playground .pg-context{grid-row:1/-1;grid-column:3;min-width:0;border-left:1px solid var(--d-line);background:var(--d-bg);display:flex;flex-direction:column;overflow:hidden}
#dash-playground .pg-context-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--d-line);padding:16px;min-height:75px}
#dash-playground .pg-context-heading h2{font-size:15px;font-weight:550;line-height:1.4;margin:3px 0 0;overflow-wrap:anywhere}
#dash-playground .pg-context-kind{font-size:11px;color:var(--d-muted)}
#dash-playground .pg-context-close{width:36px;min-height:40px;font-size:24px;border:0;border-radius:8px;background:transparent;color:var(--d-muted);flex:none}
#dash-playground .pg-context-body{overflow:auto;min-height:0;flex:1;padding:18px;overflow-wrap:anywhere}
#dash-playground .pg-context-body h3{font-size:18px;line-height:1.45;margin:0 0 18px;font-weight:550}
#dash-playground .pg-context-note{font-size:12px;line-height:1.6;color:var(--d-muted);margin:0 0 14px;overflow-wrap:anywhere}
#dash-playground .pg-conversations>.pg-context-note{font-size:10px;padding:0 10px;margin-top:12px;color:var(--d-faint)}
#dash-playground .pg-context-source{padding:16px 0;border-bottom:1px solid var(--d-line)}
#dash-playground .pg-context-link{display:block;color:var(--d-text);font-size:13px;line-height:1.5;margin-bottom:12px;text-decoration:underline;text-underline-offset:4px}
#dash-playground .pg-context-body button,#dash-playground .pg-link-card,#dash-playground .pg-message-files button{border:1px solid var(--d-border);border-radius:8px;background:var(--d-panel);color:var(--d-text);min-height:40px;padding:8px 12px;font-size:12px;max-width:100%;overflow-wrap:anywhere}
#dash-playground .pg-context-body input{min-width:0;width:100%;min-height:44px;background:var(--d-panel);color:var(--d-text);border:1px solid var(--d-border);padding:10px;font-size:16px;border-radius:8px;margin:14px 0}
#dash-playground .pg-document-text{font-family:inherit;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
#dash-playground .pg-image-preview{max-width:100%;height:auto;border-radius:10px}
#dash-playground .pg-video-consent{margin-top:20px;padding:16px;background:var(--d-panel);border:1px solid var(--d-border);border-radius:12px}
#dash-playground .pg-video-consent iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:8px}
#dash-playground .pg-context-toggle,#dash-playground .pg-sidebar-toggle{border:0;min-height:44px;background:transparent;color:var(--d-muted);font-size:12px;border-radius:8px;padding:8px 10px}
#dash-playground .pg-sidebar-toggle{display:block}
#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed{grid-template-columns:minmax(0,1fr)}
#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed>.pg-conversations{display:none}
#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed>.pg-toolbar,#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed>.pg-chat-wrap{grid-column:1}
#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed.pg-context-open{grid-template-columns:minmax(320px,1fr) var(--pg-preview-width)}
#dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed>.pg-context{grid-column:2}
#dash-playground .pg-workspace-notice:empty{display:none}
#dash-playground .pg-workspace-notice{font-size:11px;line-height:1.5;color:var(--d-muted);max-width:780px;margin:8px auto 0;text-align:center;padding:0 8px}
#dash-playground .pg-capability-label{font-size:10px;color:var(--d-faint);align-self:center;margin-top:6px}
#dash-playground.pg-workspace .pg-chat{scroll-behavior:auto}
#dash-playground.pg-workspace .pg-msg{animation:none}
#dash-playground .pg-run-status{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--d-muted);padding:8px 0}
#dash-playground .pg-run-status .pg-trace-duration{margin-left:auto}
#dash-playground .pg-source-chips{display:flex;gap:8px;overflow-x:auto;padding:14px 0 4px;max-width:100%}
#dash-playground .pg-source-chip{flex:0 0 172px;min-width:0;border:1px solid var(--d-border);border-radius:10px;padding:10px 12px;color:var(--d-text);font-size:12px;line-height:1.5;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--d-panel)}
#dash-playground .pg-source-chip small{display:block;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:var(--d-muted);margin-top:4px}
#dash-playground .pg-edit-prompt{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:var(--d-muted);cursor:pointer}
#dash-playground .pg-edit-prompt:hover,#dash-playground .pg-source-chip:hover{background:var(--d-hover);color:var(--d-text)}
#dash-playground.pg-workspace .pg-msg.user .pg-msg-actions{justify-content:flex-end;margin-top:3px}
#dash-playground.pg-workspace .pg-msg.assistant .pg-msg-actions{padding-top:4px;gap:14px}
#dash-playground.pg-workspace .pg-sources{margin-top:14px}
#dash-playground.pg-workspace .pg-sources>summary{cursor:pointer;color:var(--d-muted);font-size:12px;padding:10px 0;display:list-item;list-style-position:inside}
#dash-playground.pg-workspace .pg-sources:not([open])>.pg-source-grid{display:none}
#dash-playground.pg-workspace .pg-streaming .pg-bubble::after{content:'';display:inline-block;width:6px;height:14px;margin-left:5px;vertical-align:baseline;background:var(--d-accent);border-radius:2px}
#dash-playground .pg-link-cards,#dash-playground .pg-message-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#dash-playground .pg-link-card{color:var(--d-muted);background:transparent;border-radius:10px;font-size:11px}
#dash-playground .pg-message-usage{font-size:10px;color:var(--d-faint);align-self:center;margin-left:auto}
#dash-playground .pg-attachment-preview{border:0;background:transparent;color:var(--d-text);font-size:10px;padding:8px;min-height:40px}
#dash-playground .pg-document-card{height:auto;min-height:64px;flex-basis:240px;flex-wrap:wrap}
#dash-playground .pg-code-head{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;background:var(--d-rail);border-bottom:1px solid var(--d-border);font-size:11px;color:var(--d-muted)}
#dash-playground .pg-code-head button{border:0;background:transparent;color:var(--d-text);font-size:11px;min-height:32px;cursor:pointer;padding:4px 8px}
#dash-playground .pg-code-block{background:var(--d-panel);border:1px solid var(--d-border);border-radius:10px;overflow:hidden;min-width:0;margin:14px 0}
#dash-playground.pg-workspace .pg-code-block pre{border:0;margin:0;border-radius:0;padding:16px;font-size:12px}
#dash-playground .pg-code-keyword{color:#c0f52a}#dash-playground .pg-code-string{color:#c9dbb7}#dash-playground .pg-code-number{color:#e8be7b}
#dash-playground .pg-table-scroll{max-width:100%;overflow:auto;border:1px solid var(--d-border);border-radius:8px;margin:16px 0}
#dash-playground .pg-table-scroll table{width:100%;border-collapse:collapse;font-size:13px;white-space:normal}
#dash-playground .pg-table-scroll :is(th,td){text-align:left;padding:10px 14px;border-bottom:1px solid var(--d-border);min-width:90px}
#dash-playground .pg-table-scroll th{background:var(--d-panel);font-weight:600}
#dash-playground .pg-md blockquote{border-left:2px solid var(--d-border);padding-left:16px;color:var(--d-muted);margin:12px 0}
#dash-playground .pg-trace-metadata{list-style:none;margin:8px 0 0;max-height:210px}
#dash-playground .pg-trace-metadata li{padding:8px 0 8px 12px;border-left:2px solid var(--d-border)}
#dash-playground .pg-trace-metadata li.pg-step-completed{border-color:var(--d-accent)}
#dash-playground .pg-trace-metadata li.pg-step-failed{border-color:#ed9e93}
#dash-playground .pg-trace-duration{font-size:10px;margin-left:5px;color:var(--d-faint)}
#dash-playground :is(button,input,summary,a,[tabindex]):focus-visible{outline:2px solid var(--d-accent);outline-offset:3px}
@media(min-width:1101px) and (max-width:1399px){#dash-playground.pg-workspace .pg-context-open{grid-template-columns:190px minmax(280px,1fr) 310px}#dash-playground.pg-workspace{--pg-side-width:190px}}
@media(max-width:1100px){
 #dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed.pg-context-open{grid-template-columns:minmax(0,1fr)}
 #dash-playground.pg-workspace .pg-layout.pg-sidebar-collapsed>.pg-context{grid-column:1}
 #dash-playground.pg-workspace .pg-layout,#dash-playground.pg-workspace .pg-context-open{grid-template-columns:minmax(0,1fr)}
 #dash-playground.pg-workspace .pg-layout>.pg-toolbar,#dash-playground.pg-workspace .pg-chat-wrap{grid-column:1;padding-left:2px;padding-right:2px}
 #dash-playground .pg-sidebar-toggle{display:block}
 #dash-playground.pg-workspace .pg-conversations{display:none}
 #dash-playground.pg-workspace .pg-sidebar-open>.pg-conversations{display:flex;position:absolute;left:0;top:0;bottom:0;width:min(300px,calc(100vw - 45px));background:var(--d-bg);z-index:50;padding:18px 14px;box-shadow:20px 0 60px #0006;border:1px solid var(--d-border);border-radius:12px}
 #dash-playground .pg-sidebar-heading button{display:block;border:0;background:transparent;color:var(--d-muted);min-height:40px;font-size:12px}
 #dash-playground .pg-context{position:absolute;inset:0;z-index:55;grid-column:1;width:100%;border:1px solid var(--d-border);border-radius:12px;box-shadow:0 8px 40px #0003}
 #dash-playground .pg-context-body{padding:18px 20px}
}
@media(max-width:768px){
 #dash-playground.pg-workspace .pg-layout{grid-template-rows:50px minmax(0,1fr);height:calc(var(--pg-viewport-height,100dvh) - 82px);min-height:230px}
 #dash-playground.pg-workspace .pg-chat-wrap:has(.pg-empty){padding-bottom:18px}
 #dash-playground.pg-workspace .pg-composer{padding:8px 10px;margin-top:4px}
 #dash-playground.pg-workspace .pg-empty h3{font-size:26px}
 #dash-playground .pg-capability-label{display:none}
 #dash-playground .pg-workspace-notice{font-size:10px;max-height:48px;overflow:auto}
 #dash-playground .pg-message-files button{font-size:11px}
 #dash-playground .pg-code-block pre{font-size:12px}
 #dash-playground .pg-conversations input{font-size:16px}
}
@media(prefers-reduced-motion:reduce){#dash-playground.pg-workspace *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
