/* Scope formatting to assistant responses; user messages remain plain text. */
.prof-message>div:last-child{min-width:0}
.prof-message .markdown-body{font-size:inherit;line-height:1.75;overflow-wrap:anywhere;min-width:0;white-space:normal}
.prof-message .markdown-body a.chat-source{display:inline-block;max-width:100%;margin-inline:2px;padding:1px 7px;border:1px solid var(--border);border-radius:12px;background:var(--soft);color:var(--ink);font-size:.76em;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}
.prof-message .markdown-body a.chat-source:hover{text-decoration:underline}
.prof-app-page .prof-copy{position:relative;display:flex;align-items:center;justify-content:center;width:34px;min-width:34px;min-height:34px;padding:0;margin-top:4px;border-radius:8px;color:var(--muted);cursor:pointer}
.prof-app-page .prof-copy:hover,.prof-app-page .prof-copy:focus-visible{background:var(--soft);color:var(--ink);text-decoration:none}
.prof-app-page .prof-message.user{display:block;background:none;padding:0;margin-bottom:10px}
.prof-user-bubble{width:fit-content;max-width:100%;min-width:0;margin-left:auto;padding:11px 17px;border-radius:22px;background:#edf1e6;overflow-wrap:anywhere}
.prof-user-bubble>.message-text{margin:0}
.prof-message-actions{display:flex;align-items:center;justify-content:flex-end;gap:2px;margin-top:2px;padding-right:4px;color:var(--muted);font-size:12px}
.prof-message.assistant .prof-message-actions{justify-content:flex-start;padding-right:0}
.prof-message-actions time{margin-right:5px;font-variant-numeric:tabular-nums}
.prof-app-page .prof-message-actions .prof-copy,.prof-edit{position:relative;display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;margin:0;padding:0;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer}
.prof-edit:hover,.prof-edit:focus-visible{background:var(--soft);color:var(--ink)}
.prof-copy svg,.prof-edit svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.prof-copy .prof-copied-icon,.prof-copy[data-copied] .prof-copy-icon{display:none}
.prof-copy[data-copied] .prof-copied-icon{display:block}
.prof-copy::after,.prof-edit::after{content:attr(aria-label);position:absolute;bottom:calc(100% + 4px);left:0;z-index:2;padding:4px 8px;border-radius:6px;background:var(--ink);color:white;font-size:12px;line-height:1.4;white-space:nowrap;visibility:hidden;pointer-events:none}
.prof-message.user .prof-copy::after,.prof-edit::after{left:auto;right:0}
.prof-copy:focus-visible::after,.prof-edit:focus-visible::after{visibility:visible}
@media(hover:hover) and (pointer:fine){
 .prof-message-actions{opacity:0;transition:opacity .12s}
 .prof-message:hover .prof-message-actions,.prof-message:focus-within .prof-message-actions{opacity:1}
 .prof-copy:hover::after,.prof-edit:hover::after{visibility:visible}
}
@media(max-width:700px){.prof-user-bubble{padding:9px 14px}}
.prof-edit-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 6px;padding:3px 10px;color:var(--muted);font-size:12px}
.prof-edit-notice[hidden]{display:none}
.prof-edit-notice button{padding:4px 0;border:0;background:none;color:var(--ink);text-decoration:underline;cursor:pointer}
.prof-app-page #prof-attach .prof-attach-icon{display:block;width:15px;height:15px;margin:auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.prof-app-page .prof-send{display:grid;place-items:center}
.prof-send .prof-send-arrow{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.prof-send[data-responding] .prof-send-arrow{display:none}
.prof-app-page .prof-send[data-responding]{padding:0}
.prof-send[data-responding]::before{
  content:"";
  display:block;
  width:12px;
  height:12px;
  border-radius:2px;
  background:currentColor;
}
.prof-message .markdown-body>:first-child{margin-top:0}
.prof-message .markdown-body>:last-child{margin-bottom:0}
.prof-message .markdown-body p{margin:0 0 1em;line-height:inherit}
.prof-message .markdown-body strong{display:inline;margin:0;font-size:inherit;font-weight:700}
.prof-message .markdown-body ul,.prof-message .markdown-body ol{display:block;margin:.7em 0 1em;padding-left:1.6em;list-style-position:outside}
.prof-message .markdown-body ul{list-style-type:disc}
.prof-message .markdown-body ol{list-style-type:decimal}
.prof-message .markdown-body li{display:list-item;margin:.4em 0;padding-left:.15em}
.prof-message .markdown-body li>p{margin:.35em 0}
.prof-message .markdown-body li ul,.prof-message .markdown-body li ol{margin:.25em 0}
.prof-message .markdown-body h1,.prof-message .markdown-body h2,.prof-message .markdown-body h3,.prof-message .markdown-body h4,.prof-message .markdown-body h5,.prof-message .markdown-body h6{font-family:inherit;line-height:1.35;margin:1.25em 0 .6em;font-weight:700;font-size:1.1em}
.prof-message .markdown-body h1{font-size:1.3em}
.prof-message .markdown-body h2{font-size:1.2em}
.prof-message .markdown-body a{color:var(--green,#176c60);text-decoration:underline;text-underline-offset:3px}
.prof-message .markdown-body blockquote{border-left:3px solid #acc8ba;margin:1em 0;padding:.2em 1em;color:inherit}
.prof-message .markdown-body code{font: .9em ui-monospace,Consolas,monospace;background:#edf1e8;padding:.12em .35em;border-radius:4px;white-space:break-spaces}
.prof-message .markdown-body pre{max-width:100%;overflow:auto;padding:14px;background:#edf1e8;border-radius:10px;line-height:1.5}
.prof-message .markdown-body pre code{padding:0;background:none;white-space:pre;overflow-wrap:normal}
.prof-message .markdown-body .markdown-table{max-width:100%;overflow-x:auto;margin:1em 0;border:1px solid var(--border,#d6dfd0);border-radius:8px}
.prof-message .markdown-body table{width:100%;border-collapse:collapse;font-size:.95em;line-height:1.5;margin:0}
.prof-message .markdown-body th,.prof-message .markdown-body td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border,#d6dfd0);min-width:100px;vertical-align:top}
.prof-message .markdown-body th{background:#edf1e8;font-weight:700}
.prof-message .markdown-body tr:last-child td{border-bottom:0}
.prof-message .markdown-body hr{border:0;border-top:1px solid var(--border,#d6dfd0);margin:1.2em 0}
@media(max-width:600px){.prof-message .markdown-body th,.prof-message .markdown-body td{padding:8px;min-width:85px}}

.prof-message-files .prof-file-download{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;max-width:100%;overflow-wrap:anywhere;border:1px solid var(--border,#d6dfd0);border-radius:10px;background:#edf1e8;color:var(--ink,#193c2d);font-size:14px;text-decoration:none;line-height:1.4;min-height:44px}
.prof-message-files .prof-file-download:hover{background:#e0e8d7}
.prof-file-unavailable{color:var(--muted,#657368)}

/* Soften the newest line while the formatted response is appearing. */
.prof-message.is-typing .message-text[data-typing] {
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 1.8em), #0005 100%);
}

.prof-feedback-control{display:inline-flex;align-items:center}
.prof-feedback-trigger{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);padding:6px;cursor:pointer;margin-top:4px}
.prof-feedback-trigger svg,.prof-feedback svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;fill:none}
.prof-feedback-trigger:hover,.prof-feedback-trigger:focus-visible,.prof-feedback-trigger[aria-expanded="true"],.prof-feedback-trigger.is-selected{background:var(--soft);color:var(--ink)}
.prof-feedback-menu{position:fixed;inset:auto;margin:0;width:180px;padding:6px;border:1px solid #3e3e3e;border-radius:12px;background:#292929;color:#f5f5f5;box-shadow:0 8px 24px #0003;overflow:visible}
.prof-feedback-menu::backdrop{background:transparent}
.prof-feedback{display:flex;align-items:center;justify-content:flex-start;gap:9px;width:100%;min-height:34px;border:0;border-radius:7px;background:transparent;color:inherit;padding:7px 9px;cursor:pointer;font-family:inherit;font-size:13px;line-height:1.4;text-align:left;margin:0}
.prof-feedback svg{width:17px;height:17px;flex-shrink:0}
.prof-feedback[data-rating="-1"] svg{transform:rotate(180deg)}
.prof-feedback:hover,.prof-feedback:focus-visible,.prof-feedback.is-selected{background:#3b3b3b;color:#fff}
.prof-feedback.is-selected svg{fill:currentColor;fill-opacity:.16}
.prof-feedback:disabled{opacity:.5;cursor:wait}

.prof-message.user.is-inline-edit{width:100%;max-width:100%;margin-inline:0;align-self:stretch}
.prof-message.user.is-inline-edit .prof-user-bubble{width:min(100%,720px);max-width:100%;box-sizing:border-box;border-radius:18px}
.prof-message.user.is-inline-edit>.prof-message-actions{display:none}
.prof-inline-editor textarea{display:block;width:100%;box-sizing:border-box;min-height:85px;max-height:320px;resize:vertical;border:0;background:transparent;color:inherit;font:inherit;line-height:1.7;padding:2px;outline-offset:4px}
.prof-inline-actions{display:flex;align-items:center;gap:8px;margin-top:14px;flex-wrap:wrap}.prof-inline-actions>span{flex:1}
.prof-inline-actions button{border:0;border-radius:20px;padding:8px 14px;font:inherit;font-size:12px;background:#fff8;color:var(--ink);cursor:pointer}
.prof-inline-actions [data-inline-send]{background:var(--green);color:#fff}.prof-inline-actions button:disabled{opacity:.55;cursor:wait}
.prof-inline-error,.prof-inline-help{font-size:12px;line-height:1.6;margin:8px 0}.prof-inline-error{color:#a3342b}.prof-inline-files{margin-top:8px}

.prof-message.user.is-inline-edit .prof-user-bubble:focus-within{box-shadow:0 0 0 1px #9ba88b}.prof-inline-editor textarea:focus{outline:none;box-shadow:none}

/* Explicit display rules must never override a hidden conversation item. */
.prof-app-page .prof-messages > [hidden]{display:none!important}
