/* The Dreamer (dream.html). Builds on herald.css and the tokens from styles.css. */

.dr { border-color: #6b5bd6; box-shadow: 0 0 34px rgba(140, 120, 255, 0.12); }
.dr-orb { background: radial-gradient(circle at 35% 30%, #efeaff, #a99bff 45%, #4b3cb0); box-shadow: 0 0 14px rgba(169, 155, 255, 0.4); }
.dr .herald-head h1 { font-size: 1.35rem; }
.dr-tag { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
#dr-q { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 6px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); resize: none; overflow-y: hidden; line-height: 1.4; }
#dr-q:focus { outline: none; border-color: #a99bff; }
#dr-pass { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 6px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); }
#dr-pass:focus { outline: none; border-color: #a99bff; }

.dr-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dr .ak-chip { font: inherit; font-size: 0.82rem; background: var(--card); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; text-align: left; }
.dr .ak-chip:hover { color: var(--ink); border-color: #a99bff; }

.dr-label { margin: 18px 0 4px; font-size: 1rem; }
.dr-hint { margin: 0 0 10px; font-size: 0.8rem; color: var(--ink-soft); }

.dr-out { background: linear-gradient(100deg, #1a1a2a, #181818); border: 1px solid var(--line); border-left: 3px solid #a99bff; border-radius: 8px; padding: 14px 16px; font-size: 0.97rem; }
.dr-out p > strong:only-child { display: block; margin-top: 10px; font-size: 1.05rem; color: #5ce8f0; }
/* herald.css caps .herald-full .ak-log at the viewport height; the thread grows with the page instead. */
.dr .dr-thread { max-height: none; min-height: 0; overflow: visible; margin: 12px 0 0; }
.dr-thread .ak-herald-msg { border-left-color: #a99bff; background: linear-gradient(100deg, #1a1a2a, #181818); }
.dr-status { min-height: 1.2em; margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.dr-status.err { color: #e98b82; }
.dr-note { max-width: 760px; margin: 12px auto 0; text-align: center; }
.dr-journal { margin-top: 18px; }
.dr-entry { margin: 10px 0; }
.dr-entry summary { cursor: pointer; line-height: 1.45; }
.dr-entry .dr-out { margin: 8px 0; }
.dr-codebox { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; overflow: hidden; background: #0b0b0b; }
.dr-codebar { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.dr-lang { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.72rem; color: var(--ink-soft); text-transform: lowercase; }
.dr-copy { font: inherit; font-size: 0.75rem; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.dr-copy:hover { border-color: var(--rust-dark); color: var(--rust-dark); }
.dr-code { margin: 0; color: #e8e6df; padding: 10px 12px; max-height: 260px; overflow: auto; font-size: 0.8rem; line-height: 1.45; }
.dr-code code { background: none; padding: 0; white-space: pre; }
.dr-app { display: block; width: 100%; height: 520px; border: 0; border-top: 1px solid var(--line); background: #fff; }

/* moon send buttons; while Solo thinks the moon spins like a loader and the header orb pulses */
.dr-moonbtn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; }
.dr-moon { fill: #101010; transform-origin: 50% 50%; }
.dr-moon .dr-star { display: none; }
.dr.thinking .dr-moonbtn:disabled { opacity: 1; }
.dr.thinking .dr-moon { animation: dr-spin 0.9s linear infinite; }
.dr.thinking .dr-orb { animation: dr-pulse 1.2s ease-in-out infinite; }
@keyframes dr-spin { to { transform: rotate(360deg); } }
@keyframes dr-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 26px rgba(169, 155, 255, 0.95); } }
.dr-out .dr-h, .dr-md .dr-h { margin: 16px 0 6px; font-size: 1.08rem; color: #5ce8f0; }
.dr-out .dr-h:first-child, .dr-md .dr-h:first-child { margin-top: 0; }
.dr-out ul, .dr-out ol, .dr-md ul, .dr-md ol { margin: 6px 0 10px; padding-left: 1.3em; }
.dr-out li, .dr-md li { margin: 3px 0; }
.dr-out li.dr-sub, .dr-md li.dr-sub { margin-left: 1.2em; list-style: circle; }
.dr-out p, .dr-md p { margin: 0 0 10px; }
.dr-callout { margin: 10px 0; padding: 8px 12px; border-left: 3px solid #ffb057; background: rgba(255,176,87,0.08); border-radius: 4px; }
.dr-tablewrap { overflow-x: auto; margin: 8px 0 12px; }
.dr-table { border-collapse: collapse; font-size: 0.92rem; }
.dr-table th, .dr-table td { border: 1px solid #333; padding: 5px 9px; text-align: left; vertical-align: top; }
.dr-table th { background: rgba(169,155,255,0.12); }

/* sign-in (the same accounts as Octane) and Solo's memory */
.dr-acct { margin: 0 0 10px; }
.dr-acct .dr-hint { margin: 0 0 6px; }
.dr-acct a { color: #a99bff; }
.dr-acct-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; }
.dr-acct-form input { flex: 1 1 140px; min-width: 0; font: inherit; font-size: 0.95rem; padding: 7px 10px; border-radius: 6px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); }
.dr-acct-form input:focus { outline: none; border-color: #a99bff; }
.dr-acct-form .herald-clear { margin-left: 0; padding: 7px 14px; }
.dr-acct .dr-entry { margin: 6px 0; font-size: 0.88rem; }
.dr-convos { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.dr-convos li { display: flex; gap: 8px; align-items: baseline; }
.dr-convos button { font: inherit; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-convos button:hover { color: #a99bff; }
.dr-convos li.on button { color: #5ce8f0; }
.dr-convos span { font-size: 0.75rem; color: var(--ink-soft); white-space: nowrap; }
#dr-mem { white-space: pre-wrap; font-size: 0.88rem; }

/* one chat: messages stack above a single box under them (dream.js sizes the thread to the screen) */
.dr .dr-thread:empty { margin: 0; }
.dr-thread .ak-herald-msg { max-width: 100%; }
.dr-compose { position: relative; z-index: 2; margin: 8px -14px -14px; padding: 10px 14px 14px; background: var(--panel); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.dr .herald-head .herald-clear + .herald-clear { margin-left: 6px; }
.dr-sub-h { margin: 10px 0 4px; font-weight: 600; color: var(--ink); }
.dr-dim { font-weight: 400; color: var(--ink-soft); }
.dr-facts li span { white-space: normal; }
.dr-facts .dr-fact { flex: 1; min-width: 0; font-size: 0.85rem; }
.dr-facts .dr-copy { flex: none; }
.dr-toggle { display: flex; gap: 6px; align-items: center; color: var(--ink); cursor: pointer; }
.dr-grown { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.88rem; line-height: 1.45; }
.dr-grown .dr-dim { font-size: 0.75rem; }
.dr-badge { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 999px; padding: 0 7px; margin-right: 5px; border: 1px solid currentColor; vertical-align: 1px; }
.dr-badge.solid { color: #5ce8a0; }
.dr-badge.plausible { color: #5ce8f0; }
.dr-badge.doubtful { color: #ffb057; }
.dr-badge.wrong { color: #e98b82; }
.dr-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.dr-filter .dr-copy.on { border-color: #a99bff; color: #a99bff; }

/* the conversation scrolls in its own area, the reply box pinned under it */
.dr-threadwrap { position: relative; }
.dr .dr-thread { max-height: max(240px, calc(100vh - 300px)); max-height: max(240px, calc(100dvh - 300px)); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.dr-latest { position: absolute; right: 12px; bottom: 10px; z-index: 3; font: inherit; font-size: 0.8rem; font-weight: 700; color: #101010; background: #a99bff; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.dr-earlier { align-self: center; }
.dr-earlier button { font: inherit; font-size: 0.8rem; background: transparent; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.dr-reachout { border-left-color: #5ce8a0 !important; }
/* who's online: a chip on phones, a panel beside the chat on wide screens */
.dr-online { margin: 4px 0 6px; font-size: 0.85rem; }
.dr-online summary { cursor: pointer; display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink); }
.dr-online-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 3px; }
.dr-online-list li { display: flex; align-items: center; gap: 6px; }
.dr-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 6px #3ddc84; flex: none; }
.dr-dot.away { background: #666; box-shadow: none; }
.dr-online-sub { margin: 6px 0 0; }
@media (min-width: 1240px) {
  .dr-online { position: fixed; top: 110px; right: max(16px, calc((100vw - 760px) / 2 - 236px)); width: 200px; max-height: calc(100vh - 140px); overflow-y: auto; background: var(--panel); border: 2px solid #6b5bd6; border-radius: 10px; padding: 10px 12px; margin: 0; }
  .dr-online summary { border: 0; padding: 0; font-weight: 700; pointer-events: none; }
  .dr-online summary::marker, .dr-online summary::-webkit-details-marker { display: none; content: ""; }
}
.dr [hidden], .dr-acct-form[hidden], .dr-latest[hidden] { display: none !important; }
.dr-inbox-n { color: #5ce8a0; margin-left: 4px; text-transform: none; }
.dr-unread .dr-fact { font-weight: 600; }
.dr-req { flex-wrap: wrap; }
.dr-req .dr-fact { flex-basis: 100%; }
.dr-req-p { margin: 4px 0; font-size: 0.82rem; flex-basis: 100%; white-space: pre-wrap; }
.dr-req-notes { flex-basis: 100%; width: 100%; box-sizing: border-box; font: inherit; font-size: 0.82rem; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; margin: 4px 0; }
.dr-convos .dr-req .dr-copy { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 0.75rem; flex: none; text-align: center; }
.dr-convos .dr-req .dr-copy:hover { border-color: var(--rust-dark); color: var(--rust-dark); }
