/* A quiet conversational source, beside the Desk's paper and notes. */
:root body .conversation-source.reader-surface {
 --yd-paper:#1c1d1d; --yd-paper-tint:#292b2b; --yd-paper-highlight:#252727;
 --yd-ink:#f3eee4; --yd-muted-ink:#b5b6b2; --yd-tool-muted:#b5b6b2;
 --yd-tool-border:#454847; --yd-action:#b5d4ed; --yd-coral:#e9a48f;
 --yd-accent-faint:#696239; --conversation-muted:#b5b6b2;
 display:flex; flex-direction:column; height:100%; min-height:0; min-width:0;
 padding:0; overflow:hidden; color:var(--yd-ink); background:var(--yd-paper);
 color-scheme:dark; position:relative; isolation:isolate;
}
.conversation-source button, .conversation-source summary, .conversation-source select { cursor:pointer; }
.conversation-source button, .desk-web-discuss { min-height:36px; border:1px solid var(--yd-tool-border); border-radius:12px; background:var(--yd-paper-tint); color:var(--yd-ink); padding:7px 11px; font:13px var(--sans); }
.conversation-source button:disabled { opacity:.4; cursor:default; }
.conversation-source :is(button,summary,textarea,select):focus-visible { outline:2px solid var(--yd-action); outline-offset:3px; }
/* Selected text needs its own ink as well as a highlight on this dark surface. */
:root body .conversation-source::selection,
:root body .conversation-source ::selection {
 color:#1c282f; background:#c9dbe7; text-shadow:none;
}
:root body .conversation-source .conversation-bar { flex:none; display:flex; align-items:center; gap:12px; width:100%; height:auto; min-height:56px; box-sizing:border-box; margin:0; padding:6px 20px; border:0; background:transparent; z-index:3; }
.conversation-source .conversation-bar > button { border:0; padding:4px 0; background:transparent; color:var(--conversation-muted); font-size:12px; flex:none; }
.conversation-title { flex:1; min-width:0; margin:0; font:14px/1.4 var(--serif); text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversation-source.is-empty .conversation-title { visibility:hidden; }
.conversation-menu { position:relative; flex:none; margin-left:auto; }
.conversation-menu > summary { display:grid; place-items:center; list-style:none; width:40px; height:40px; border-radius:50%; color:var(--conversation-muted); box-sizing:border-box; }
.conversation-menu > summary::-webkit-details-marker { display:none; }
.conversation-menu > summary:hover, .conversation-menu[open] > summary { background:var(--yd-paper-tint); color:var(--yd-ink); }
.conversation-menu-items { position:absolute; top:44px; right:0; width:min(240px,75vw); box-sizing:border-box; padding:8px; border:1px solid var(--yd-tool-border); border-radius:16px; background:var(--yd-paper-highlight); box-shadow:0 16px 48px #0006; }
.conversation-menu:not([open]) > .conversation-menu-items { display:none; }
.conversation-workspace-actions { display:contents; }
.conversation-menu-items button { display:block; width:100%; text-align:left; background:transparent; border:0; border-radius:8px; min-height:42px; padding:10px 12px; }
.conversation-menu-items button:hover { background:var(--yd-tool-border); }
.conversation-allowance { display:block; border-top:1px solid var(--yd-tool-border); margin:6px 8px 0; padding-top:12px; font:11px/1.5 var(--sans); color:var(--conversation-muted); }
.conversation-footnote { margin:6px 8px 8px; font:11px/1.5 var(--sans); color:var(--conversation-muted); }
:root body .conversation-source .conversation-messages { padding:20px 28px 16px; margin:0; width:100%; max-width:none; box-sizing:border-box; background:transparent; border-radius:0; color:var(--yd-ink); flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; scroll-behavior:smooth; scrollbar-width:thin; scrollbar-color:#5c605d transparent; }
:root body .conversation-source.is-empty .conversation-messages { display:flex; align-items:center; justify-content:center; }
.conversation-welcome { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:34px; margin:20px 0 42px; text-align:center; width:100%; }
.conversation-welcome h2 { font:400 clamp(23px,3vw,29px)/1.3 var(--serif); margin:0; color:var(--yd-ink); letter-spacing:-.3px; }
.conversation-mark { --mark-size:116px; position:relative; display:inline-block; width:var(--mark-size); height:calc(var(--mark-size)*1.12); flex:none; }
.conversation-mark::before { content:''; position:absolute; inset:-36%; border-radius:50%; background:radial-gradient(ellipse at 30% 28%,#ead27728,transparent 53%),radial-gradient(ellipse at 75% 55%,#739acd2b,transparent 57%),radial-gradient(ellipse at 33% 80%,#c57d9524,transparent 48%); filter:blur(14px); pointer-events:none; }
.conversation-mark i { position:absolute; display:block; width:64%; height:58%; border-radius:12%; border:1px solid #ffffff55; box-shadow:inset 0 1px 1px #fff5,0 5px 12px #0002; transform:translateY(0) rotate(var(--tilt)); }
.conversation-mark .is-yellow { top:0; left:1%; --tilt:8deg; background:linear-gradient(140deg,#f0d66c,#d1b75b); }
.conversation-mark .is-blue { top:11%; right:0; --tilt:-7deg; background:linear-gradient(140deg,#83acd5ef,#648cbbeb); }
.conversation-mark .is-pink { bottom:6%; left:7%; --tilt:6deg; background:linear-gradient(140deg,#d99baeef,#c57e95eb); }
.conversation-mark .is-green { bottom:0; right:-7%; --tilt:-10deg; background:linear-gradient(140deg,#9cbd99ee,#7da782ed); }
.conversation-message { margin:0 0 28px; }
.conversation-message > header { display:flex; align-items:center; gap:8px; font:11px/1.4 var(--sans); color:var(--conversation-muted); padding-bottom:12px; }
.conversation-message > header time { margin-left:auto; font-size:10px; }
.conversation-message > header .conversation-mark { --mark-size:19px; margin-right:3px; }
.conversation-message > header .conversation-mark::before { display:none; }
.conversation-answer { white-space:pre-wrap; overflow-wrap:anywhere; font:15px/1.75 var(--sans); user-select:text; -webkit-user-select:text; }
:root body .conversation-source .conversation-answer { color:var(--yd-ink); max-width:none; }
.conversation-message.is-user { padding:14px 18px; margin-left:32px; border-radius:20px 20px 5px 20px; background:var(--yd-paper-tint); }
.conversation-message.is-user .conversation-answer { font:14px/1.65 var(--sans); }
.conversation-message.is-user > p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font:14px/1.65 var(--sans); }
.conversation-message.is-assistant > button { margin-top:12px; font-size:11px; background:transparent; border-color:transparent; color:var(--conversation-muted); padding-left:0; }
.conversation-message.is-assistant > button:hover { color:var(--yd-ink); }
.conversation-references { display:flex; flex-direction:column; gap:4px; margin-top:10px; font:12px/1.5 var(--sans); overflow-wrap:anywhere; }
.conversation-references:empty { display:none; }
.conversation-references a { color:var(--yd-action); }
.conversation-answer mark { color:inherit; background:var(--yd-accent-faint); box-shadow:0 1px 0 var(--yd-action); }
.conversation-thinking { display:flex; align-items:center; gap:16px; min-height:48px; font:12px var(--sans); color:var(--conversation-muted); }
.conversation-thinking .conversation-mark { --mark-size:28px; margin:0 6px 0 3px; }
.conversation-source.is-thinking .conversation-thinking .conversation-mark i { animation:conversation-note-breathe 1.8s ease-in-out var(--note-delay,0s) infinite; }
.conversation-thinking .conversation-mark .is-blue { --note-delay:.15s; }
.conversation-thinking .conversation-mark .is-pink { --note-delay:.3s; }
.conversation-thinking .conversation-mark .is-green { --note-delay:.45s; }
@keyframes conversation-note-breathe { 0%,100% { transform:translateY(0) rotate(var(--tilt)); } 50% { transform:translateY(-4px) rotate(var(--tilt)); } }
.conversation-source .conversation-status { margin:0 0 10px; font:12px/1.5 var(--sans); color:var(--conversation-muted); }
.conversation-source .conversation-status:empty { display:none; }
.conversation-source .conversation-status.is-quiet { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.conversation-source .conversation-status.is-error { padding:10px 12px; border:1px solid var(--yd-coral); border-radius:12px; background:var(--yd-paper-tint); color:var(--yd-ink); }
.conversation-recovery { flex:none; padding:0 22px; display:flex; flex-wrap:wrap; gap:6px; }
.conversation-recovery:not(:empty) { padding-bottom:12px; }
.conversation-composer { flex:none; position:relative; padding:12px 22px 22px; background:transparent; }
.conversation-source textarea, .conversation-source select { box-sizing:border-box; color:var(--yd-ink); background:var(--yd-paper); border:1px solid var(--yd-tool-border); border-radius:8px; font:14px/1.5 var(--sans); }
.conversation-input-dock { padding:14px 14px 10px; border:1px solid var(--yd-tool-border); border-radius:24px; background:var(--yd-paper-highlight); box-shadow:0 6px 24px #0002; }
.conversation-input-dock:focus-within { border-color:#8a9e96; box-shadow:0 0 0 1px #8a9e9630,0 6px 24px #0002; }
.conversation-input-dock > textarea { width:100%; display:block; resize:none; min-height:36px; max-height:140px; padding:4px 4px 8px; background:transparent; border:0; border-radius:6px; font-size:16px; }
.conversation-input-dock > textarea::placeholder { color:var(--conversation-muted); opacity:1; }
.conversation-send-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:4px; }
.conversation-source .conversation-send { background:#efeadd; color:#262925; border:0; width:38px; height:38px; min-width:38px; padding:0; border-radius:50%; font:24px/1 var(--sans); flex-shrink:0; }
.conversation-source .conversation-context-add { width:38px; height:38px; min-width:38px; padding:0; border:0; border-radius:50%; font:25px/1 var(--sans); background:transparent; color:var(--conversation-muted); }
.conversation-source .conversation-context-add:hover, .conversation-source .conversation-context-add[aria-expanded="true"] { background:var(--yd-tool-border); color:var(--yd-ink); }
.conversation-context-chips { display:flex; align-items:center; gap:6px; flex-wrap:wrap; max-height:96px; overflow:auto; padding:0 0 10px; }
.conversation-context-chips:empty { display:none; }
.conversation-context-chip { display:inline-flex; align-items:center; max-width:100%; border:1px solid var(--yd-tool-border); background:var(--yd-paper-tint); border-radius:10px; }
.conversation-source .conversation-context-chip button { border:0; background:transparent; min-height:32px; padding:4px 8px; font:11px/1.4 var(--sans); }
.conversation-source .conversation-context-chip button:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.conversation-source .conversation-context-chip button:last-child { font-size:18px; flex-shrink:0; }
.conversation-material { position:absolute; bottom:calc(100% - 4px); left:22px; right:22px; z-index:2; padding:14px; border:1px solid var(--yd-tool-border); border-radius:18px; background:var(--yd-paper-highlight); box-shadow:0 12px 36px #0005; font:12px/1.5 var(--sans); }
.conversation-material:not([open]) { display:none; }
.conversation-material[open] { max-height:min(320px,45dvh); overflow:auto; }
.conversation-material > summary { padding:0 0 12px; color:var(--yd-ink); font:17px var(--serif); }
.conversation-material-list section { padding:8px 0 12px; }
.conversation-material-list strong { display:inline-block; max-width:75%; overflow-wrap:anywhere; font-size:12px; }
.conversation-material-list button { float:right; font-size:11px; }
.conversation-material-list textarea { width:100%; padding:8px; margin-top:6px; }
.conversation-material-chooser { display:flex; flex-wrap:wrap; gap:6px; }
.conversation-material-chooser select { width:100%; padding:10px; min-width:0; }
.conversation-context-explanation { color:var(--conversation-muted); font:11px/1.5 var(--sans); margin:12px 0 0; }
.conversation-excerpt { padding:16px 22px; background:var(--yd-paper-tint); flex:none; max-height:42%; overflow:auto; border-top:1px solid var(--yd-tool-border); }
.conversation-excerpt p { font:12px/1.5 var(--sans); margin:0 0 8px; }
.conversation-excerpt textarea { width:100%; padding:12px; border-left:2px solid var(--yd-coral); font:italic 16px/1.5 var(--serif); display:block; margin-bottom:8px; max-height:130px; }
.conversation-excerpt button { margin-right:6px; border-radius:20px; }
.conversation-writing-choice { display:flex; flex-direction:column; gap:8px; max-height:80dvh; overflow:auto; }
body .dv-reader:has(.conversation-source) { overflow:hidden; }
body .dv-reader .dv-reader-body:has(> .conversation-source) { width:min(680px,94vw); height:92dvh; min-height:0; padding:0; overflow:hidden; background:#1c1d1d; border-radius:20px; }
@media(max-width:780px) {
 :root body .conversation-source .conversation-bar { padding:6px 12px; gap:8px; }
 .conversation-source button, .conversation-source summary { min-height:44px; }
 .conversation-menu > summary { width:44px; }
 :root body .conversation-source .conversation-messages { padding:18px 18px 12px; }
 .conversation-title { font-size:13px; }
 .conversation-answer { font-size:16px; }
 .conversation-composer { padding:10px 12px max(14px, env(safe-area-inset-bottom)); }
 .conversation-source .conversation-send, .conversation-source .conversation-context-add { width:44px; height:44px; min-width:44px; }
 .conversation-source .conversation-context-chip button { min-height:44px; }
 .conversation-source textarea, .conversation-source select { font-size:16px; }
 .conversation-material { left:12px; right:12px; }
 .conversation-material > summary { min-height:30px; }
}
@media(max-width:700px) {
 body .dv-reader .dv-reader-body:has(> .conversation-source) { width:100%; height:calc(100dvh - var(--keyboard-height, 0px)); border-radius:0; padding-top:env(safe-area-inset-top); }
 .conversation-mark { --mark-size:100px; }
 .conversation-welcome { gap:28px; margin:12px 0 30px; }
}
@media(max-height:620px) {
 .conversation-welcome { gap:18px; margin:8px 0; }
 .conversation-welcome .conversation-mark { --mark-size:64px; }
 .conversation-welcome h2 { font-size:22px; }
 .conversation-material[open] { max-height:38dvh; }
 .conversation-composer { padding-top:6px; }
}
@media(prefers-reduced-motion:reduce) {
 :root body .conversation-source .conversation-messages { scroll-behavior:auto; }
 .conversation-source.is-thinking .conversation-thinking .conversation-mark i { animation:none; }
}

.conversation-card { background:#1d2224; color:#f0f0e6; padding:24px; box-shadow:0 4px 8px #0002; border:1px solid #f0f0e680; border-radius:8px; }
.conversation-card h3 { color:#f0f0e6; font:600 25px/1.15 var(--serif); margin:12px 0; overflow-wrap:anywhere; }
.conversation-card p { color:#b0baba; font:17px/1.5 var(--serif); display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; }
.conversation-card footer { padding-top:12px; margin-top:18px; font:11px var(--sans); color:#b0baba; }
.conversation-thumb, .lib-thumb.conversation-thumb, .dv-menu-thumb.conversation-thumb { position:relative; background:#1d2224; display:grid; place-items:center; }
.conversation-thumb > img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.conversation-thumb::after { display:none; }
.conversation-card-mark { width:72px; height:72px; background:#1d2224; border-radius:3px; }
.conversation-card-mark img { display:block; width:100%; height:100%; object-fit:contain; }
:root body .dv-note-source-ask-desk .dv-note-source-thumb { background:#1d2224; }
:root body .dv-note-source-ask-desk .dv-note-source-thumb img { object-fit:contain; }
.desk-web-discuss { margin:6px 0 14px; grid-column:1 / -1; justify-self:start; color:var(--yd-action); }
