/* The studio assistant: a sticker that opens a plain sheet. */
.agent-launch{position:fixed; right:22px; bottom:22px; z-index:20; display:flex; align-items:center; gap:9px; min-height:54px; padding:0 20px; background:var(--solar); color:#15141c; border:2px solid #15141c; border-radius:50%/60%; rotate:-5deg; font:700 14px var(--text)}
.agent-launch:hover{background:var(--lime)}
.agent-launch i{width:10px; height:10px; border-radius:50%; background:#15141c}
.agent-dialog{position:fixed; inset:auto 22px 22px auto; margin:0; width:min(430px,calc(100vw - 32px)); max-width:calc(100vw - 16px); max-height:min(760px,calc(100dvh - 32px)); padding:0; border:2px solid var(--ink); background:var(--paper); color:var(--ink); overflow:hidden}
.agent-dialog::backdrop{background:#0b0a1280}
.agent-shell{display:flex; flex-direction:column; max-height:min(760px,calc(100dvh - 32px))}
.agent-header{display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 20px; background:var(--lime); color:#15141c; border-bottom:2px solid var(--ink); flex-shrink:0}
.agent-header h2{font-size:23px; letter-spacing:-.03em}
.agent-header p{font-size:13px; margin:4px 0 0}
.agent-header button{font-size:22px; padding:0 13px; border-color:#15141c; color:#15141c}
.agent-body{overflow:auto; overscroll-behavior:contain; padding:20px; min-height:160px}
.agent-intro{font-size:17px; margin:0 0 16px}
.agent-topics{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.agent-topics button{text-align:left; padding:10px 12px}
.agent-log{display:grid; gap:12px; padding:16px 0 0}
.agent-message{padding:13px 15px; border:2px solid var(--line); font-size:15px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere}
.agent-message.user{border-color:var(--ink); margin-left:22px}
.agent-message .speaker{display:block; font-weight:700; font-size:13px; color:var(--muted); margin-bottom:6px}
.agent-sources{font-size:13px; padding:8px 0; color:var(--muted)}
.agent-sources a{display:inline-block; margin:5px 8px 0 0; text-decoration:underline; text-underline-offset:3px}
.agent-input{padding:14px 20px; border-top:2px solid var(--line); display:grid; grid-template-columns:1fr auto; gap:8px; flex-shrink:0}
.agent-input label{grid-column:1/-1; font-size:14px; font-weight:700}
.agent-input textarea{resize:vertical; min-height:46px; max-height:100px}
.agent-dialog input,.agent-dialog select,.agent-dialog textarea{font:15px/1.5 var(--text); color:var(--ink); background:var(--paper); border:2px solid var(--ink); padding:9px; width:100%; min-width:0}
.agent-privacy{padding:0 20px 14px; font-size:13px; color:var(--muted); margin:0; flex-shrink:0}
.agent-privacy a,.agent-brief .consent a{text-decoration:underline}
.agent-toolbar{display:flex; flex-wrap:wrap; gap:8px; padding:14px 20px; border-top:2px solid var(--line); flex-shrink:0}
.agent-notice{color:var(--muted); font-size:14px; margin:14px 0 0}
.agent-brief{display:grid; gap:14px}
.agent-brief>p{font-size:14px; color:var(--muted); margin:0}
.agent-brief label{font-size:14px; font-weight:700; display:grid; gap:6px}
.agent-brief .consent{display:flex; align-items:start; gap:10px; font-weight:400}
.agent-brief .consent input{width:20px; height:20px; flex-shrink:0; margin-top:2px}
.agent-brief .brief-actions{display:flex; flex-wrap:wrap; gap:10px}
.brief-actions .button{min-height:46px; font-size:14px}
.agent-result{font-size:14px; color:var(--ink); overflow-wrap:anywhere}
.agent-result.error{color:var(--magenta)}
.agent-status{font-size:14px; color:var(--muted); min-height:18px; margin-top:12px}
@media(max-width:800px){
  .agent-launch{right:14px; bottom:14px; width:58px; height:58px; min-height:58px; padding:0; gap:0; justify-content:center; font-size:0}
  .agent-launch i{width:20px; height:16px; border-radius:9px 9px 9px 2px}
  html:not(.motion-off) .agent-launch{transition:translate .35s cubic-bezier(.2,.8,.2,1),opacity .35s}
  html:has(.site-header.nav-hidden) .agent-launch:not(:focus-visible){translate:0 160%; opacity:0}
  .agent-dialog{right:8px; bottom:8px; width:calc(100vw - 16px); max-height:calc(100dvh - 16px)}
  .agent-shell{max-height:calc(100dvh - 16px)}
}
