/* ASK WATTSON (wattson.css): a chat. Threads down the left, the conversation
   in the middle, the composer pinned at the bottom with the attachment
   buttons, the way a chat product is laid out. Dark first, light after. */
.wt { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; height: calc(100vh - 64px - 64px); min-height: 520px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.02); }
.wt-rail { display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.25); min-height: 0; }
.wt-rail-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; }
.wt-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.01em; font-size: 14px; color: var(--white, #fff); }
.wt-brand i { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: linear-gradient(135deg, #c41717, #7a0e0e); font-style: normal; font-size: 14px; }
.wt-new { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--white, #fff); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wt-new:hover { border-color: rgba(196,23,23,.6); background: rgba(196,23,23,.1); }
.wt-threads { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.wt-thread { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; border: 0; background: transparent; color: var(--gray-light, #aeaeb2); font: inherit; font-size: 12.5px; cursor: pointer; }
.wt-thread:hover { background: rgba(255,255,255,.05); color: var(--white, #fff); }
.wt-thread.is-on { background: rgba(196,23,23,.16); color: #fff; }
.wt-thread span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-thread b { font-weight: 400; font-size: 11px; color: var(--gray-light, #aeaeb2); }
.wt-thread-x { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 0; background: transparent; color: var(--gray-light, #aeaeb2); cursor: pointer; opacity: 0; font-size: 14px; line-height: 1; }
.wt-thread:hover .wt-thread-x { opacity: 1; }
.wt-thread-x:hover { color: #ff8f8f; background: rgba(196,23,23,.15); }
.wt-rail-f { padding: 10px 14px 14px; font-size: 11px; line-height: 1.5; color: var(--gray-light, #aeaeb2); border-top: 1px solid rgba(255,255,255,.08); }

.wt-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.wt-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.wt-head h1 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--white, #fff); }
.wt-head p { margin: 0; font-size: 12px; color: var(--gray-light, #aeaeb2); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 0 10px; }
/* the typewriter: plain text while it types, a cursor at the end */
.wt-typed { word-break: break-word; }
.wt-cursor { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: #ff8f8f; border-radius: 1px; animation: wt-cursor 1s steps(2, start) infinite; }
@keyframes wt-cursor { to { visibility: hidden; } }
.wt-col { width: min(860px, 100%); margin: 0 auto; padding: 0 22px; display: flex; flex-direction: column; gap: 18px; }

/* the empty state */
.wt-hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 0 10px; }
.wt-hello i { display: inline-flex; width: 56px; height: 56px; border-radius: 16px; align-items: center; justify-content: center; background: linear-gradient(135deg, #c41717, #7a0e0e); font-style: normal; font-size: 28px; box-shadow: 0 14px 30px -14px rgba(196,23,23,.9); }
.wt-hello h2 { margin: 6px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--white, #fff); }
.wt-hello p { margin: 0; max-width: 56ch; font-size: 13.5px; line-height: 1.6; color: var(--gray-light, #aeaeb2); }
.wt-starts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; width: 100%; margin-top: 10px; }
.wt-start { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); color: var(--white, #fff); font: inherit; font-size: 13px; line-height: 1.45; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.wt-start small { font-size: 11.5px; color: var(--gray-light, #aeaeb2); }
.wt-start:hover { border-color: rgba(196,23,23,.6); background: rgba(196,23,23,.08); }

/* messages */
.wt-msg { display: flex; gap: 12px; align-items: flex-start; }
.wt-msg.is-user { flex-direction: row-reverse; }
.wt-av { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: rgba(255,255,255,.1); }
.wt-msg.is-bot .wt-av { background: linear-gradient(135deg, #c41717, #7a0e0e); font-size: 15px; }
.wt-bubble { max-width: 100%; min-width: 0; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; color: var(--white, #fff); }
.wt-msg.is-user .wt-bubble { background: rgba(196,23,23,.16); border: 1px solid rgba(196,23,23,.3); max-width: 78%; white-space: pre-wrap; }
.wt-msg.is-bot .wt-bubble { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); width: 100%; }
.wt-bubble p { margin: 0 0 10px; } .wt-bubble p:last-child { margin-bottom: 0; }
.wt-bubble h1, .wt-bubble h2, .wt-bubble h3 { margin: 14px 0 8px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: var(--white, #fff); }
.wt-bubble h1:first-child, .wt-bubble h2:first-child, .wt-bubble h3:first-child { margin-top: 0; }
.wt-bubble ul, .wt-bubble ol { margin: 0 0 10px; padding-left: 22px; }
.wt-bubble li { margin: 3px 0; }
.wt-bubble code { font-family: "SF Mono", "Fira Code", Consolas, monospace; font-size: 12.5px; padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.08); }
.wt-bubble pre { margin: 0 0 10px; padding: 12px 14px; border-radius: 10px; background: rgba(0,0,0,.4); overflow-x: auto; }
.wt-bubble pre code { padding: 0; background: transparent; }
.wt-bubble a { color: #ff8f8f; }
.wt-bubble strong { color: #fff; }
.wt-tbl { width: 100%; overflow-x: auto; margin: 4px 0 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.wt-bubble table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.wt-bubble th { text-align: left; padding: 8px 10px; background: rgba(255,255,255,.06); font-weight: 800; letter-spacing: .02em; color: var(--white, #fff); border-bottom: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.wt-bubble td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.07); }
.wt-bubble tr:last-child td { border-bottom: 0; }
.wt-bubble td:first-child { font-weight: 700; color: var(--white, #fff); }
.wt-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wt-file { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); font-size: 11.5px; color: var(--gray-light, #aeaeb2); max-width: 260px; }
.wt-file img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; }
.wt-file i { display: inline-flex; width: 34px; height: 34px; border-radius: 5px; align-items: center; justify-content: center; background: rgba(196,23,23,.25); color: #ff8f8f; font-style: normal; font-size: 10px; font-weight: 800; }
.wt-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the files it made */
.wt-docs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.wt-doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(196,23,23,.35); background: rgba(196,23,23,.08); }
.wt-doc i { flex: 0 0 auto; display: inline-flex; width: 42px; height: 42px; border-radius: 9px; align-items: center; justify-content: center; background: linear-gradient(135deg, #c41717, #7a0e0e); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.wt-doc > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wt-doc b { font-size: 13.5px; color: var(--white, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-doc small { font-size: 11.5px; color: var(--gray-light, #aeaeb2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-doc .up-btn { flex: 0 0 auto; padding: 8px 14px; font-size: 12.5px; }
html.light .wt-doc { background: rgba(196,23,23,.05); border-color: rgba(196,23,23,.25); }
html.light .wt-doc b { color: #111; } html.light .wt-doc small { color: #5f5f66; }
.wt-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wt-tool { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; background: rgba(255,255,255,.07); color: var(--gray-light, #aeaeb2); }
.wt-tool.is-running::after { content: "\2026"; }
.wt-typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.wt-typing i { width: 6px; height: 6px; border-radius: 100px; background: var(--gray-light, #aeaeb2); animation: wt-blink 1.2s infinite; }
.wt-typing i:nth-child(2) { animation-delay: .2s; } .wt-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes wt-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.wt-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--gray-light, #aeaeb2); }
.wt-meta button { font: inherit; font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--gray-light, #aeaeb2); cursor: pointer; }
.wt-meta button:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.wt-err { padding: 10px 12px; border-radius: 10px; background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.35); color: #ffb3b3; font-size: 13px; }

/* the composer, at the bottom */
.wt-composer { flex: 0 0 auto; padding: 10px 22px 14px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.2); }
.wt-box { width: min(860px, 100%); margin: 0 auto; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.04); padding: 8px 8px 8px 12px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.wt-box:focus-within { border-color: rgba(196,23,23,.7); box-shadow: 0 0 0 3px rgba(196,23,23,.16); }
.wt-box.is-over { border-color: #ff5c5c; background: rgba(196,23,23,.08); }
.wt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); font-size: 11.5px; color: var(--white, #fff); max-width: 240px; }
.wt-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
.wt-chip i { display: inline-flex; width: 28px; height: 28px; border-radius: 5px; align-items: center; justify-content: center; background: rgba(196,23,23,.25); color: #ff8f8f; font-style: normal; font-size: 9px; font-weight: 800; }
.wt-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-chip small { color: var(--gray-light, #aeaeb2); }
.wt-chip button { border: 0; background: transparent; color: var(--gray-light, #aeaeb2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.wt-chip button:hover { color: #ff8f8f; }
/* (2026-11-18) a PDF being read page by page, or one that could not be read */
.wt-chip { max-width: 320px; }
.wt-chip small { white-space: nowrap; }
.wt-chip.is-busy { border-color: rgba(47,116,208,.5); }
.wt-chip.is-busy small { color: #8db8f0; }
.wt-chip.is-busy i { animation: wt-read 1.2s ease-in-out infinite; }
@keyframes wt-read { 50% { opacity: .45; } }
.wt-chip.is-bad { border-color: rgba(196,23,23,.6); }
.wt-chip.is-bad small { color: #ff8f8f; }
.wt-file small { color: var(--gray-light, #aeaeb2); white-space: nowrap; }
html.light .wt-chip.is-busy small { color: #1d5bb0; }
html.light .wt-chip.is-bad small { color: #c41717; }
.wt-row { display: flex; align-items: flex-end; gap: 6px; }
.wt-input { flex: 1 1 auto; min-width: 0; resize: none; border: 0; background: transparent; color: var(--white, #fff); font: inherit; font-size: 14px; line-height: 1.5; padding: 6px 4px; max-height: 220px; outline: none; }
.wt-input::placeholder { color: var(--gray-light, #aeaeb2); }
.wt-ib { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--gray-light, #aeaeb2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.wt-ib svg { width: 17px; height: 17px; }
.wt-ib:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.wt-send { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--red, #c41717); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wt-send:hover { filter: brightness(1.08); }
.wt-send:disabled { opacity: .5; cursor: default; filter: none; }
.wt-send.is-stop { background: rgba(255,255,255,.1); }
.wt-hint { width: min(860px, 100%); margin: 6px auto 0; font-size: 11px; color: var(--gray-light, #aeaeb2); display: flex; justify-content: space-between; gap: 10px; }
.wt-fileinput { display: none; }

/* light theme */
html.light .wt { background: #fff; border-color: rgba(0,0,0,.09); }
html.light .wt-rail { background: #f6f6f8; border-right-color: rgba(0,0,0,.08); }
html.light .wt-brand, html.light .wt-head h1, html.light .wt-hello h2, html.light .wt-bubble, html.light .wt-start, html.light .wt-bubble h1, html.light .wt-bubble h2, html.light .wt-bubble h3, html.light .wt-bubble strong, html.light .wt-bubble th, html.light .wt-bubble td:first-child, html.light .wt-input, html.light .wt-chip { color: #111; }
html.light .wt-new { background: #fff; border-color: rgba(0,0,0,.14); color: #111; }
html.light .wt-thread { color: #5f5f66; } html.light .wt-thread:hover { background: rgba(0,0,0,.05); color: #111; } html.light .wt-thread.is-on { background: rgba(196,23,23,.1); color: #111; }
html.light .wt-rail-f, html.light .wt-head p, html.light .wt-hello p, html.light .wt-start small, html.light .wt-meta, html.light .wt-tool, html.light .wt-file, html.light .wt-chip small, html.light .wt-hint, html.light .wt-input::placeholder { color: #5f5f66; }
html.light .wt-head, html.light .wt-composer { border-color: rgba(0,0,0,.08); }
html.light .wt-composer { background: #fafafb; }
html.light .wt-box { background: #fff; border-color: rgba(0,0,0,.14); }
html.light .wt-msg.is-user .wt-bubble { background: rgba(196,23,23,.08); border-color: rgba(196,23,23,.25); }
html.light .wt-msg.is-bot .wt-bubble { background: #fafafb; border-color: rgba(0,0,0,.09); }
html.light .wt-start { background: #fff; border-color: rgba(0,0,0,.1); }
html.light .wt-tbl { border-color: rgba(0,0,0,.1); }
html.light .wt-bubble th { background: rgba(0,0,0,.04); border-bottom-color: rgba(0,0,0,.12); }
html.light .wt-bubble td { border-bottom-color: rgba(0,0,0,.07); }
html.light .wt-bubble code { background: rgba(0,0,0,.06); }
html.light .wt-bubble pre { background: #f1f1f4; }
html.light .wt-bubble a { color: #c41717; }
html.light .wt-file, html.light .wt-chip { background: #f3f3f6; border-color: rgba(0,0,0,.1); }
html.light .wt-file i, html.light .wt-chip i { background: rgba(196,23,23,.12); color: #c41717; }
html.light .wt-ib { background: #fff; border-color: rgba(0,0,0,.14); color: #5f5f66; } html.light .wt-ib:hover { color: #111; }
html.light .wt-tool { background: rgba(0,0,0,.06); }
html.light .wt-av { background: rgba(0,0,0,.1); color: #111; } html.light .wt-msg.is-bot .wt-av { color: #fff; }
@media (max-width: 900px) {
    .wt { grid-template-columns: 1fr; height: auto; min-height: 70vh; }
    .wt-rail { display: none; }
    .wt-msg.is-user .wt-bubble { max-width: 92%; }
}
