/* Rozmowa: the history column, the messages, the composer and its narrow layouts (linked after
   workspace.css in index.html, before viewer.css and widgets.css). */

/* Rozmowa: the history column, one chat column, the composer (old styles.css). */
.chat-layout { display: flex; height: 100%; min-height: 0; position: relative; }
.history { width: 0; flex: 0 0 0; min-width: 0; overflow: hidden; visibility: hidden; background: var(--panel); transition: width .3s var(--ease), flex-basis .3s var(--ease), visibility 0s .3s; }
.history.open { width: 244px; flex-basis: 244px; visibility: visible; transition: width .3s var(--ease), flex-basis .3s var(--ease), visibility 0s; }
.history-inner { width: 244px; height: 100%; border-right: 1px solid var(--line); padding: 21px 14px; display: flex; flex-direction: column; opacity: 0; transform: translateX(-20px); transition: opacity .2s, transform .3s var(--ease); }
.history.open .history-inner { opacity: 1; transform: none; }
.history-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 16px; }
.history-heading h2 { font: 550 17.2px/1.3 var(--sans); }
.history .history-search { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #eeece580; color: var(--muted); }
.history .history-search:focus-within { outline: 2px solid var(--olive); border-color: var(--line); }
.history .history-search input { background: none; border: 0; outline: 0; min-width: 0; width: 100%; font-size: 13.5px; }
.history .history-search input:focus-visible { box-shadow: none; }
.history-items { margin-top: 20px; overflow: auto; scrollbar-width: thin; min-height: 0; }
.history-group { margin: 14px 8px 6px; font: 600 11.5px/1.4 var(--sans); color: var(--muted); letter-spacing: .02em; }
.history-group:first-child { margin-top: 4px; }
.history-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 11px 8px; text-align: left; border-radius: 6px; font-size: 13.5px; color: #60694f; transition: background .2s, color .2s; }
.history-row > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row .icon { width: 16px; height: 16px; flex-shrink: 0; }
.history-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--olive); }
.history-row:hover { background: #dbddd280; color: var(--ink); }
.history-row.active { background: #dbddd2; color: var(--ink); }
.history .history-empty { font-size: 13.5px; line-height: 1.8; color: var(--muted); padding: 4px 7px; }
/* Archiving a conversation (ADR 0071): its row's button, shown on hover and focus (always on touch). */
.history-item { position: relative; display: flex; align-items: center; border-radius: 6px; }
.history-item .history-row { flex: 1; min-width: 0; padding-right: 38px; }
.history-archive { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.history-item:hover .history-archive, .history-item:focus-within .history-archive { opacity: 1; }
.history-archive:hover { color: var(--ink); background: #d3d6c8; }
@media (hover: none) { .history-archive { opacity: 1; } }
.history-archive-link { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; color: #60694f; }
.history-archive-link:hover { color: var(--ink); }
.history-archive-link .icon { width: 16px; height: 16px; }
.archived-note { list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: #60694f; font-size: 13.5px; }
.archived-note p { flex: 1; min-width: 200px; margin: 0; }
.archived-note .icon { width: 16px; height: 16px; flex-shrink: 0; }
.history-shade { display: none; }
.chat-view { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; min-height: 0; padding: 0 40px; }
.chat-view.empty { justify-content: center; padding-bottom: clamp(40px, 12vh, 130px); }
.welcome { max-width: 800px; width: 100%; margin: 0 auto 32px; text-align: center; animation: q-enter .4s var(--ease); }
.welcome[hidden] { display: none; }
.welcome h1 { font: clamp(43px, 4.2vw, 65px)/1.04 var(--serif); font-weight: 400; letter-spacing: -2.2px; overflow-wrap: break-word; color: var(--ink); }
.welcome h1 .welcome-brand { color: #71785d; }
.conversation { width: 100%; max-width: 1160px; margin: 0 auto; flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.chat-view.empty .conversation { flex: 0 0 auto; overflow: visible; max-width: 800px; }
.messages { flex: 1; min-height: 0; margin: 0; padding: 30px 5px 20px; list-style: none; display: flex; flex-direction: column; gap: 26px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9cdbd transparent; }
.chat-view.empty .messages { display: none; }
.message-row { width: 100%; display: flex; animation: message-in 160ms ease-out both; }
.message-row--settled { animation: none; }
.message-row--user { justify-content: flex-end; }
.message-bubble { position: relative; min-width: 72px; padding: 4px 3px; max-width: 100%; width: 100%; }
.message-row--user .message-bubble { background: #e0e5d5; border: 1px solid #d4ddc5; border-radius: 10px 10px 2px 10px; padding: 13px 16px; color: #4b5838; max-width: min(85%, 640px); width: auto; }
.message-row--assistant .message-bubble { color: #505c42; max-width: min(100%, 760px); }
.message-flow { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.message-text { font-size: 15.5px; line-height: 1.85; overflow-wrap: anywhere; min-width: 0; }
.message-text--plain { white-space: pre-wrap; }
.message-text:empty { display: none; }
.message-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14px; font-weight: 550; color: var(--ink); }
.message-heading .symbol { width: 25px; height: 25px; color: var(--olive); flex-shrink: 0; overflow: visible; }
.message-row--assistant .message-text { line-height: 1.9; color: #59634d; }
.message-text > * { margin: 0; }
.message-text > * + * { margin-top: .85em; }
.message-text :is(h1, h2, h3) { font: 400 24px/1.3 var(--serif); letter-spacing: -.015em; color: var(--ink); margin: 1.1em 0 .5em; text-wrap: balance; }
.message-text > :is(h1, h2, h3):first-child { margin-top: 2px; }
.message-text :is(h4, h5, h6) { font-size: 1em; font-weight: 650; color: var(--ink); margin: 1em 0 .5em; }
.message-text :is(ul, ol) { padding-left: 1.35em; }
.message-text li { padding-left: .08em; margin: 0; }
.message-text li + li { margin-top: .35em; }
.message-text li.task { list-style: none; margin-left: -1.1em; }
.message-text strong { font-weight: 650; color: #3f4733; }
.message-text a { color: var(--olive); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.message-text a:hover { text-decoration-thickness: 2px; }
.message-text code { font: .88em ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: .08em .3em; border-radius: 5px; background: #e5e8dc; color: var(--ink); overflow-wrap: anywhere; }
.message-text pre { padding: 9px 10px; overflow-x: auto; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 9px; background: #e5e8dc; color: var(--ink); }
.message-text pre code { background: none; padding: 0; font-size: inherit; }
.message-text blockquote { margin-left: 0; padding: .15em 0 .15em 1em; border-left: 3px solid #a4ae90; color: #5c644f; }
.message-text hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.message-text .table-wrap { max-width: 100%; overflow-x: auto; }
.message-text .md-table { width: auto; min-width: 100%; border-collapse: collapse; font-size: .95em; }
.message-text .md-table :is(th, td) { padding: .5em .75em; border: 1px solid var(--line); vertical-align: top; overflow-wrap: normal; word-break: normal; min-width: 6ch; text-align: left; }
.message-text .md-table th { background: var(--sage); font: 600 1em/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.message-text img { max-width: 100%; }
.stream-fragment { animation: stream-reveal 180ms ease-out both; }
.message-file-link { display: inline-flex; align-items: baseline; gap: 4px; text-decoration: none !important; }
.message-file-link .icon { align-self: center; }
.message-meta { min-height: 20px; display: flex; align-items: center; gap: 7px; line-height: 1; font-size: 12px; margin-top: 16px; color: #5f6552; }
.message-row--user .message-meta { justify-content: flex-end; margin-top: 10px; }
.message-row--queued .message-bubble { opacity: 0.72; border-style: dashed; }
.message-queued { margin: 8px 0 0; font-size: 12px; color: #6b7558; }
.copy-button { height: 20px; line-height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 5px; font-size: 12px; color: var(--muted); }
.message-meta time:empty { display: none; }
.message-meta .copy-button:first-child { margin-left: -6px; }
.copy-button:hover { background: var(--sage); color: var(--ink); }
.chat-cite { white-space: nowrap; margin-left: 2px; }
.chat-cite a, .chat-cite span[data-cite] { display: inline-block; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--sage) 70%, transparent); color: var(--olive-ink) !important; font: 500 .74em/1.65 var(--sans) !important; text-decoration: none !important; cursor: pointer; }
.chat-cite a:hover, .chat-cite a:focus-visible, .chat-cite span[data-cite]:hover { background: var(--sage); color: var(--ink) !important; outline: none; }

/* While Quartio works: the steps under the heading and the working line (old response-stream). */
.tool-activity { max-width: 100%; margin: -8px 0 14px; color: #686b60; font-size: 12px; }
.tool-activity[hidden] { display: none; }
.tool-activity summary { cursor: pointer; padding: 6px 0; overflow-wrap: anywhere; width: fit-content; }
.tool-activity summary.tool-activity-live { display: flex; align-items: center; gap: 8px; color: var(--olive-ink); font-weight: 500; }
.tool-activity ul { list-style: none; padding: 4px 0 4px 14px; margin: 0; border-left: 1px solid #dbddd0; }
.tool-activity li { padding: 3px 0; overflow-wrap: anywhere; transition: color 200ms ease; }
.tool-activity [data-status=failed] { color: #98594f; }
.tool-activity li[data-outcome] { color: var(--muted); }
.tool-activity-mark { display: inline-block; width: 1.2em; color: var(--olive); }
.tool-activity [data-status=failed] .tool-activity-mark { color: var(--muted); }
.tool-activity-mark .q-spinner { width: .85em; height: .85em; border-width: 1.5px; }
.tool-activity-spinner { width: 11px; height: 11px; border-width: 1.5px; }
.tool-activity-detail { color: var(--ink); }
a.tool-activity-detail { color: var(--olive-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--olive) 45%, transparent); text-underline-offset: 2px; }
.tool-activity li.tool-activity-running > span:last-child, .writing-status { background: linear-gradient(100deg, #2c3328 0%, #2c3328 38%, #b7c296 47%, #eef1e4 50%, #b7c296 53%, #2c3328 62%, #2c3328 100%); background-size: 260% 100%; background-clip: text; -webkit-background-clip: text; color: transparent; animation: writing-shimmer 1.6s linear infinite; }
.tool-activity li.tool-activity-running > span:last-child { background-image: linear-gradient(100deg, #3d4436 0%, #3d4436 38%, #b7c296 47%, #eef1e4 50%, #b7c296 53%, #3d4436 62%, #3d4436 100%); }
.writing-copy { display: flex; align-items: center; gap: 10px; font: 400 15px/1.6 var(--sans); color: var(--olive); min-height: 24px; }
.message-text + .writing-copy { margin-top: 14px; }
.writing-copy[hidden] { display: none; }
.writing-spinner { width: 15px; height: 15px; border-width: 2px; }
.writing-status { display: inline-block; font-weight: 500; }
.writing-elapsed { font: 400 12.5px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes writing-shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes stream-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* A write waiting for the person (old action card). */
.message-cards:empty, .message-files:empty { display: none; }
.action-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 16px 18px; animation: q-enter 220ms var(--ease) both; color: var(--ink); }
.action-card .eyebrow { display: block; margin-bottom: 6px; font: 600 11.1px/1.55 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.action-card-what { font: 500 15px/1.55 var(--sans); color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.action-card-kind { font: 400 13px/1.5 var(--sans); color: var(--muted); margin: 6px 0 0; overflow-wrap: anywhere; }
.action-card-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.action-card-status { margin: 0 auto 0 0; font-size: 13px; color: var(--muted); }
.action-card-status:empty { display: none; }
.action-card .button { height: 36px; padding: 0 14px; border-radius: 7px; font: 500 13.5px/1 var(--sans); }
.action-card .button.dark { background: var(--ink); color: var(--surface); }
.action-card .button.dark:hover:not(:disabled) { background: var(--ink-hover); color: #fff; }
.action-card .button.secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.action-card .button.secondary:hover:not(:disabled) { background: var(--hover); }
.action-card.decided .action-card-footer { margin-top: 10px; }
.action-card.applied { border-color: color-mix(in srgb, var(--olive) 35%, var(--line)); }
.action-card.applied .action-card-status { color: var(--olive-ink); font-weight: 550; }
.action-card.rejected { opacity: .8; }
.action-card.just-settled { animation: q-card-settle 600ms var(--ease); }
.action-card.just-settled .action-card-status::before { content: '✓'; display: inline-block; margin-right: 6px; animation: q-check-pop 340ms var(--ease) both; }
.action-card.just-settled.rejected .action-card-status::before { content: '×'; }
@keyframes q-check-pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes q-card-settle { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--olive) 35%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* Files in a conversation as cards (ADR 0062): a thumbnail of what the file is (made when the
   card comes into view, faded in), its badge, name, kind and size; a click opens the viewer, the
   arrow downloads. */
.message-attachments { margin: 2px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; list-style: none; }
.message-attachment { position: relative; min-width: 0; display: flex; flex-direction: column; border: 1px solid #d4dac7; border-radius: 12px; background: #f6f7f1; color: var(--ink); overflow: hidden; animation: q-pop 160ms var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); transition: border-color .15s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.message-attachment--downloadable:hover { border-color: #c0c8b0; box-shadow: 0 6px 18px #292b2714; transform: translateY(-1px); }
.attachment-download { width: 100%; min-width: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; color: inherit; text-align: left; border-radius: 0; }
.attachment-download:hover { background: none; color: inherit; }
/* The card clips what stands outside it and its picture would cover a ring drawn inside: the
   keyboard's focus ring is the card's own. */
.attachment-download:focus-visible { outline: none; }
.message-attachment:has(> .attachment-download:focus-visible) { outline: 2px solid var(--olive); outline-offset: 2px; }
.attachment-thumb { position: relative; height: 104px; overflow: hidden; display: grid; place-items: center; background: #eceee4; border-bottom: 1px solid #e1e5d6; }
.attachment-thumb--doc { background: #e4e9ec; }
.attachment-thumb--slides { background: #efe8da; }
.attachment-thumb--pdf { background: #efe5df; }
.attachment-thumb .attachment-icon { width: 40px; height: 40px; border-radius: 10px; font-size: .8rem; }
.attachment-thumb > :not(.attachment-icon) { position: absolute; inset: 0; animation: q-fade-in .25s var(--ease) both; }
.thumb-picture { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.thumb-page { display: flex; flex-direction: column; gap: 3px; margin: 10px 14px 0; padding: 10px 12px; background: #fff; border-radius: 2px; box-shadow: 0 1px 3px #292b271f; font-size: 6.5px; line-height: 1.35; color: #55584d; overflow: hidden; }
.thumb-page strong { font-size: 8.5px; color: #292b27; }
.thumb-page span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thumb-page--mono { font-family: ui-monospace, monospace; }
.thumb-grid { margin: 10px 10px 0; background: #fff; border-radius: 2px; box-shadow: 0 1px 3px #292b271f; font-size: 7px; overflow: hidden; }
.thumb-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #ebe9e1; }
.thumb-row span { padding: 2px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-right: 1px solid #ebe9e1; }
.thumb-head { background: #f5f4ef; font-weight: 600; }
.thumb-slide { margin: 12px auto 0; overflow: hidden; border-radius: 2px; box-shadow: 0 1px 3px #292b271f; }
.thumb-slide .slide { transform-origin: 0 0; }
.attachment-thumb.has-thumb .attachment-icon { visibility: hidden; }
.attachment-meta { display: grid; gap: 2px; padding: 9px 40px 10px 10px; }
.attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; }
.attachment-size { color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-save { position: absolute; right: 6px; bottom: 9px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; transition: background 140ms ease, color 140ms ease; }
.attachment-save:hover, .attachment-save:focus-visible { background: #e3e9d8; color: var(--ink); }
.message-attachment--missing { opacity: .6; }
.attachment-icon { display: grid; place-items: center; color: var(--olive); font-weight: 700; background: var(--sage); }
.message-text + .message-attachments, .message-files .message-attachments { margin-top: 12px; }

/* The composer (old .composer grid) and the files tray joined to its top edge. */
.composer-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 8px 0 22px; flex-shrink: 0; position: relative; z-index: 6; }
.chat-view.empty .composer-wrap { max-width: 800px; padding-bottom: 0; }
:is(.chat-view, .sa-composer) .composer { display: grid; grid-template-columns: 32px minmax(0, 1fr) 34px 34px; gap: 8px; align-items: center; min-height: 134px; margin: 0; padding: 17px 17px 12px; border: 1px solid #cbcdbd; border-radius: 12px; background: var(--surface); box-shadow: 0 4px 18px #393b2910; transition: border-color .3s, box-shadow .3s; }
:is(.chat-view, .sa-composer) .composer:focus-within { border-color: #939f78; box-shadow: 0 5px 24px #51583712; }
:is(.chat-view, .sa-composer) .composer textarea { grid-column: 1 / -1; grid-row: 1; display: block; width: 100%; height: auto; min-height: 64px; max-height: 150px; resize: none; overflow: auto; background: none; border: 0; outline: 0; box-shadow: none; padding: 1px 0; font: 16px/1.75 var(--sans); color: #484c3d; }
:is(.chat-view, .sa-composer) .composer textarea::placeholder { color: #777d6b; }
:is(.chat-view, .sa-composer) .composer textarea:focus-visible { box-shadow: none; outline: 0; }
.attach-button { grid-column: 1; grid-row: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.attach-button .icon { width: 22px; height: 22px; stroke-width: 1.5; }
.attach-button:hover { background: var(--sage); }
.stop-button { grid-column: 3; grid-row: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--sage); color: var(--ink); animation: q-pop 160ms var(--ease) both; }
.stop-button[hidden] { display: none; }
.stop-button:hover { background: #cbd4bc; }
.stop-button .icon { width: 13px; height: 13px; fill: currentColor; }
:is(.chat-view, .sa-composer) .send-button { grid-column: 4; grid-row: 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: var(--ink); color: #fff; }
:is(.chat-view, .sa-composer) .send-button .icon { width: 20px; height: 20px; stroke-width: 2.3; }
:is(.chat-view, .sa-composer) .send-button:hover:not(:disabled) { background: #66704e; transform: translateY(-1px); }
.attach-button:active, :is(.chat-view, .sa-composer) .send-button:active { transform: scale(.94); }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto; scrollbar-width: thin; }
.file-chips:empty { display: none; }
.file-chips:not(:empty) { padding: 10px 12px 8px; border: 1px solid var(--control); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface); animation: q-enter 180ms var(--ease) both; }
.file-chips:not(:empty) + .composer { border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: var(--line); box-shadow: 0 8px 18px #393b2910; }
.file-chip { min-width: 0; max-width: 280px; height: 34px; padding: 0 5px 0 10px; display: inline-flex; flex: 0 1 auto; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--ink); animation: q-pop 160ms var(--ease) both; }
.file-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; }
.file-chip__size { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.file-chip__remove { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; color: var(--muted); font-size: 1rem; line-height: 1; border-radius: 7px; }
.file-chip__remove:hover { color: var(--danger); background: #fffef894; }
.file-chip--error { border-color: #d9b3a8; background: var(--danger-soft); color: var(--danger); }
.file-chip--error .file-chip__size { color: var(--danger); }
.file-chip .q-spinner { width: 12px; height: 12px; border-width: 1.5px; }
.chat-view.drop-target .composer { border-color: var(--olive); box-shadow: 0 0 0 3px var(--sage); }
.chat-starters { display: none; }
.chat-view.empty .chat-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 800px; margin: 14px auto 0; animation: q-enter 260ms var(--ease) both; }
.chat-suggestion { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 12px; font-size: 13.5px; line-height: 1.4; color: var(--ink); text-align: center; max-width: 100%; }
.chat-suggestion:hover:not(:disabled) { background: var(--hover); color: var(--ink); border-color: var(--control); }
.new-messages-button { position: absolute; z-index: 4; left: 50%; bottom: 16px; min-height: 34px; padding: 0 14px; font-size: .8rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--olive); box-shadow: 0 6px 18px #292b2729; transform: translateX(-50%); animation: q-pop 160ms var(--ease) both; }
.new-messages-button[hidden] { display: none; }

@media (min-width: 1750px) {
  .chat-view.empty { padding-bottom: 14vh; }
  .welcome h1 { font-size: 80px; }
  .welcome { margin-bottom: 52px; }
  .chat-view.empty .composer-wrap, .welcome { max-width: 880px; }
}
@media (max-width: 1200px) {
  .chat-view { padding: 0 30px; }
  .welcome h1 { font-size: 60.3px; letter-spacing: -2px; }
}
@media (max-width: 1050px) {
  .history { position: absolute; inset: 0 auto 0 0; z-index: 30; width: 244px; transform: translateX(-100%); transition: transform .3s var(--ease), visibility 0s .3s; }
  .history.open { transform: none; transition: transform .3s var(--ease), visibility 0s; }
  .history-inner { opacity: 1; transform: none; }
  .history-shade { display: block; visibility: hidden; opacity: 0; position: absolute; inset: 0; background: #3037242e; z-index: 29; transition: opacity .25s, visibility 0s .25s; border: 0; }
  .history.open ~ .history-shade { visibility: visible; opacity: 1; transition: opacity .25s; }
}
@media (max-width: 760px) {
  .chat-view { padding: 0 19px; }
  .chat-view.empty { padding-bottom: 12vh; }
  .welcome { margin-bottom: 30px; }
  .welcome h1 { font-size: 48px; line-height: 1.25; letter-spacing: -1.7px; }
  .composer-wrap { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .chat-view .composer { grid-template-columns: 40px minmax(0, 1fr) 40px 40px; min-height: 128px; padding: 15px 13px 10px; }
  .attach-button, .chat-view .send-button, .stop-button { width: 40px; height: 40px; }
  .messages { padding-top: 25px; }
  .message-row--user .message-bubble { max-width: min(93%, 640px); padding: 12px 16px; }
  .message-text, .message-row--assistant .message-text { font-size: 15px; }
  .message-text :is(h1, h2, h3) { font-size: 21px; }
  .history-row { min-height: 44px; }
}

/* Reduced motion: nothing moves but the loading rings, which turn slower (pages.css) so a wait
   still reads as one; placeholders keep their late, instant appearance (ADR 0034). */
@media (prefers-reduced-motion: reduce) {
  *:not(.q-spinner):not(.q-placeholder):not(.q-loading), *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* The working words without their sweep (old styles.css). */
  .writing-status, .tool-activity li.tool-activity-running > span:last-child { background: none; color: var(--olive); }
}
