.consult-heading { margin-bottom: 22px; }
.consult-demo-label { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; color: #607c8f; border: 1px solid #cedde6; background: #f5f8fa; padding: 7px 12px; border-radius: 4px; white-space: nowrap; }
.consult-demo-label > span { width: 5px; height: 5px; border-radius: 50%; background: #7794a5; }
.consult-history { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 22px; border: 1px solid #d5e0e7; background: #fcfdfc; border-radius: 6px; overflow: hidden; }
.consult-history-item { display: flex; align-items: center; gap: 13px; padding: 17px 19px; text-align: left; min-width: 0; position: relative; }
.consult-history-item + .consult-history-item { border-left: 1px solid #e2e9ed; }
.consult-history-item:hover { background: #f1f6f8; }
.consult-history-item.is-active { background: #eaf1f5; }
.consult-history-item.is-active::after { position: absolute; content: ""; height: 2px; left: 18px; right: 18px; bottom: 0; background: #547d98; }
.consult-history-number { font-family: Consolas, monospace; color: #8ca6b7; font-size: 11px; }
.consult-history-item strong { display: block; font-size: 14px; font-weight: 600; }
.consult-history-item small { display: block; font-size: 11px; color: #7b919f; margin-top: 3px; }
.consult-history-item > .icon { margin-left: auto; color: #87a2b4; }
.consult-layout { display: grid; grid-template-columns: minmax(0, 1fr) 282px; gap: 26px; align-items: start; }
.consult-chat { border: 1px solid #cddde7; border-radius: 7px; overflow: hidden; background: #fff; box-shadow: 0 3px 15px #29495b04; min-width: 0; }
.consult-chat-header { display: flex; align-items: center; gap: 13px; padding: 17px 23px; border-bottom: 1px solid #dce6eb; background: linear-gradient(115deg, #f3f7f9, #fcfdfc); }
.consult-avatar { width: 43px; height: 43px; display: grid; place-items: center; flex-shrink: 0; }
.consult-avatar img { width: 38px; height: 38px; object-fit: contain; }
.consult-chat-header .eyebrow { font-size: 10px; letter-spacing: .1em; }
.consult-chat-header h2 { font-size: 18px; margin-top: 1px; }
.consult-thread-type { margin-left: auto; color: #8197a5; font-size: 11px; white-space: nowrap; }
.consult-messages { height: 434px; overflow-y: auto; padding: 19px 28px 25px; scrollbar-width: thin; scrollbar-color: #c1d1db #f7f9fa; overscroll-behavior: contain; background: linear-gradient(#f8fafb55, #fff); outline-offset: -4px; }
.consult-thread-start { text-align: center; color: #92a5b1; margin-bottom: 23px; font-size: 11px; display: flex; align-items: center; gap: 12px; justify-content: center; }
.consult-thread-start::before, .consult-thread-start::after { content: ""; width: 35px; height: 1px; background: #dce5ea; }
.consult-thread-start small { font-size: 10px; }
.consult-message { width: fit-content; max-width: 88%; margin-bottom: 22px; }
.consult-message:last-child { margin-bottom: 0; }
.consult-message-meta { display: flex; gap: 9px; align-items: baseline; font-size: 10px; margin-bottom: 5px; color: #95a6b2; }
.consult-message-meta strong { font-weight: 550; color: #638197; font-size: 11px; }
.consult-message p { font-size: 14px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.consult-message-assistant p { padding: 1px 0 2px 13px; border-left: 2px solid #bccfdb; color: #39586d; }
.consult-message-user { margin-left: auto; max-width: 82%; }
.consult-message-user .consult-message-meta { justify-content: flex-end; }
.consult-message-user p { padding: 12px 17px; border: 1px solid #e0e8ed; border-radius: 7px 7px 1px 7px; background: #f0f5f8; color: #45667d; }
.consult-composer-area { padding: 16px 23px 17px; border-top: 1px solid #e0e8ed; background: #fcfdfc; }
.consult-prompt-label { font-size: 10px; color: #8b9daa; margin-bottom: 8px; }
.consult-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.consult-prompts button { display: inline-flex; gap: 8px; align-items: center; border: 1px solid #dae5ec; padding: 6px 9px; border-radius: 4px; font-size: 10px; color: #648197; background: #fff; text-align: left; }
.consult-prompts button:hover { border-color: #9eb9ca; background: #f0f6f9; }
.consult-prompts button span { font-size: 13px; color: #8aa4b5; }
.consult-input-label { font-size: 11px; color: #688497; display: block; margin-bottom: 6px; }
.consult-composer { display: flex; align-items: flex-end; gap: 10px; border: 1px solid #c9dbe6; border-radius: 5px; background: #fff; padding: 10px; }
.consult-composer:focus-within { border-color: #7196b0; box-shadow: 0 0 0 2px #e6eff4; }
.consult-composer textarea { flex: 1; resize: vertical; min-width: 0; min-height: 56px; max-height: 160px; font: inherit; line-height: 1.7; font-size: 13px; border: 0; padding: 2px 3px; background: transparent; color: #334f63; }
.consult-composer textarea:focus { outline: 0; }
.consult-composer textarea::placeholder { color: #99aab6; }
.consult-send { display: inline-flex; align-items: center; gap: 7px; color: #fff; background: #365e7a; border-radius: 4px; padding: 9px 11px; font-size: 11px; flex-shrink: 0; }
.consult-send:hover { background: #2b506a; }
.consult-send:disabled { color: #839aa9; background: #e8eef2; }
.consult-input-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 10px; color: #7c929f; }
.consult-input-note > span:last-child { white-space: nowrap; color: #91a3b0; font-family: "Segoe UI", sans-serif; }
.consult-input-note b { font-weight: 400; }
.consult-key-hint { font-size: 9px; color: #9aabb5; margin-top: 4px; }
.consult-outline { border-top: 2px solid #8aa7bb; padding-top: 17px; }
.consult-outline-title .eyebrow { font-size: 9px; letter-spacing: .16em; }
.consult-outline-title h2 { font-size: 18px; margin-top: 5px; }
.consult-outline-title p { color: #8095a3; font-size: 11px; margin-top: 5px; }
.consult-outline-block { padding: 21px 0; border-bottom: 1px solid #dce5ea; }
.consult-outline-block h3 { font-size: 13px; display: flex; align-items: center; gap: 9px; }
.consult-outline-block h3 > span { font-size: 10px; font-family: Consolas, monospace; color: #92aaba; font-weight: 400; }
.consult-facts { margin: 13px 0 0; }
.consult-facts > div { display: flex; justify-content: space-between; gap: 10px; margin: 7px 0; }
.consult-facts dt { color: #738b9c; font-size: 12px; }
.consult-facts dd { margin: 0; font-size: 14px; font-family: "Segoe UI", "Yu Gothic UI", sans-serif; font-weight: 550; }
.consult-fact-pending { border-top: 1px dashed #dbe4e9; padding-top: 9px; }
.consult-fact-pending dd { color: #9b7c4a; }
.consult-fact-note { font-size: 10px; color: #91a1ad; line-height: 1.7; margin-top: 7px; }
.consult-question { font-size: 12px; color: #6d899d; margin: 11px 0 10px; }
.consult-options { display: flex; flex-direction: column; gap: 7px; }
.consult-option { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; padding: 8px 10px; text-align: left; border: 1px solid #d9e4eb; border-radius: 4px; background: #f9fbfc; color: #8196a5; }
.consult-option > span { flex-shrink: 0; }
.consult-option:hover { border-color: #a3bbc9; }
.consult-option.is-selected { border-color: #b7cddc; background: #eaf1f5; color: #416a87; }
.consult-memo-label { font-size: 11px; display: flex; justify-content: space-between; gap: 8px; color: #6e889a; margin: 16px 0 7px; }
.consult-memo-label small { font-size: 9px; color: #94a6b2; }
.consult-outline textarea { resize: vertical; min-height: 86px; width: 100%; border: 1px solid #dbe5ec; border-radius: 4px; padding: 10px 11px; background: #fcfdfb; font: inherit; font-size: 12px; color: #637f92; line-height: 1.8; }
.consult-outline textarea:focus { outline: 2px solid #a4c1d3; outline-offset: 1px; }
.consult-next { padding: 0; margin: 13px 0 0; list-style: none; counter-reset: consult-next; }
.consult-next li { counter-increment: consult-next; font-size: 11px; line-height: 1.8; color: #718c9e; display: flex; gap: 10px; margin-top: 8px; }
.consult-next li::before { content: counter(consult-next); font-size: 9px; color: #91a9b9; width: 15px; height: 17px; border: 1px solid #d7e3eb; border-radius: 2px; text-align: center; margin-top: 2px; flex-shrink: 0; }
.consult-outline-bottom { padding-top: 17px; }
.consult-outline-bottom .button { width: 100%; font-size: 12px; justify-content: space-between; padding: 10px 13px; }
.consult-outline-bottom > p { font-size: 10px; color: #92a4b0; margin-top: 8px; text-align: center; line-height: 1.7; }
@media (min-width: 1700px) {
  .consult-layout { grid-template-columns: minmax(0, 1fr) 318px; gap: 32px; }
  .consult-history-item { padding: 16px 24px; }
  .consult-history-item strong { font-size: 15px; }
  .consult-history-item small { font-size: 12px; }
  .consult-messages { height: 436px; padding-inline: 37px; }
  .consult-message { max-width: 88%; }
  .consult-message p { font-size: 15px; }
  .consult-message-meta { font-size: 11px; }
  .consult-prompts button { font-size: 11px; }
  .consult-outline-block { padding: 18px 0; }
  .consult-facts dt, .consult-question { font-size: 13px; }
  .consult-option, .consult-next li { font-size: 12px; }
  .consult-memo-label { margin-top: 13px; }
}
@media (max-width: 1250px) {
  .consult-layout { grid-template-columns: minmax(0, 1fr) 251px; gap: 20px; }
  .consult-history-item { gap: 9px; padding: 15px 13px; }
  .consult-history-item strong { font-size: 12px; }
  .consult-history-item small { font-size: 10px; }
  .consult-history-item > .icon { display: none; }
  .consult-chat-header { padding: 16px 18px; }
  .consult-messages { padding-inline: 20px; height: 462px; }
  .consult-message { max-width: 95%; }
  .consult-message p { font-size: 13px; }
  .consult-composer-area { padding-inline: 17px; }
  .consult-chat-header h2 { font-size: 16px; }
  .consult-thread-type { font-size: 9px; }
  .consult-key-hint { max-width: 410px; }
}
@media (max-width: 1050px) {
  .consult-layout { grid-template-columns: minmax(0, 1fr); }
  .consult-outline { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; margin-top: 6px; }
  .consult-outline-title { grid-column: 1 / -1; }
  .consult-outline-block:nth-of-type(2) { grid-row: span 2; }
  .consult-outline-bottom { grid-column: 1 / -1; display: flex; gap: 17px; align-items: center; }
  .consult-outline-bottom .button { max-width: 230px; }
  .consult-outline-bottom > p { text-align: left; margin: 0; }
  .consult-messages { height: 410px; }
}
@media (max-width: 660px) {
  .consult-demo-label { margin-top: 13px; font-size: 10px; padding: 5px 9px; }
  .consult-heading { margin-bottom: 18px; }
  .consult-history { overflow: auto; display: flex; margin-bottom: 17px; scroll-snap-type: x proximity; }
  .consult-history-item { flex: 0 0 76%; padding: 13px 15px; scroll-snap-align: start; }
  .consult-history-item strong { font-size: 13px; }
  .consult-history-item small { font-size: 10px; }
  .consult-history-item > .icon { display: block; }
  .consult-chat-header { gap: 10px; padding: 14px 15px; }
  .consult-avatar { width: 33px; height: 37px; }
  .consult-avatar img { width: 31px; height: 34px; }
  .consult-chat-header h2 { font-size: 15px; }
  .consult-thread-type { font-size: 9px; }
  .consult-messages { height: 390px; height: min(430px, 53dvh); min-height: 280px; padding: 16px 15px 22px; }
  .consult-thread-start { font-size: 9px; gap: 8px; flex-wrap: wrap; }
  .consult-thread-start small { font-size: 9px; }
  .consult-thread-start::before, .consult-thread-start::after { width: 14px; }
  .consult-message { max-width: 96%; margin-bottom: 19px; }
  .consult-message-user { max-width: 88%; }
  .consult-message p { font-size: 13px; line-height: 1.9; }
  .consult-message-user p { padding: 10px 12px; }
  .consult-message-meta { font-size: 9px; }
  .consult-message-meta strong { font-size: 10px; }
  .consult-composer-area { padding: 13px 13px 15px; }
  .consult-prompts { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 7px; gap: 7px; margin-bottom: 6px; }
  .consult-prompts button { flex-shrink: 0; font-size: 10px; min-height: 34px; }
  .consult-composer { gap: 6px; padding: 8px; }
  .consult-composer textarea { font-size: 16px; min-height: 70px; }
  .consult-send { padding: 10px; }
  .consult-send > span { display: none; }
  .consult-input-note { font-size: 9px; gap: 9px; }
  .consult-key-hint { font-size: 9px; line-height: 1.7; }
  .consult-outline { display: block; margin-top: 7px; padding-top: 19px; }
  .consult-outline-title h2 { font-size: 20px; }
  .consult-outline-title p { font-size: 12px; }
  .consult-outline-block { padding: 22px 0; }
  .consult-outline-block h3 { font-size: 14px; }
  .consult-facts dt { font-size: 13px; }
  .consult-facts dd { font-size: 16px; }
  .consult-question { font-size: 13px; }
  .consult-option { font-size: 12px; padding: 11px 12px; }
  .consult-next li { font-size: 13px; }
  .consult-memo-label { font-size: 12px; }
  .consult-outline textarea { font-size: 16px; }
  .consult-outline-bottom { display: block; }
  .consult-outline-bottom .button { max-width: none; font-size: 13px; padding: 13px 15px; }
  .consult-outline-bottom > p { margin-top: 10px; text-align: center; font-size: 10px; }
}
