.isc-chat-entry {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:12px 24px; padding:clamp(14px,3vw,24px); margin-block:12px 18px;
  border:1px solid #c5d9d3; border-radius:12px; background:#edf5f1; color:#17354d;
}
.isc-chat-entry strong { font-size:clamp(1rem,2vw,1.2rem); }
.isc-chat-entry p { margin:4px 0 0; font-size:.88rem; }
.isc-chat-entry button,.isc-chat-form button {
  min-height:44px; padding:10px 16px; border:0; border-radius:7px;
  background:#174e46; color:#fff; font:inherit; font-weight:700; cursor:pointer;
}
.isc-chat-entry button:hover,.isc-chat-form button:hover { background:#22665b; }
.isc-chat-direct { display:grid; grid-template-columns:minmax(0,1fr) auto; flex:1 1 100%; width:100%; min-width:0; gap:8px; margin:0; }
.isc-chat-direct input { width:100%; box-sizing:border-box; min-width:0; padding:10px 12px; border:1px solid #829e96; border-radius:7px; background:#fff; color:#17354d; font:inherit; font-size:16px; }
.isc-chat-direct button { white-space:nowrap; }
.isc-chat-entry:has(.isc-chat-direct) .isc-chat-free { background:#fff; color:#174e46; }
.isc-chat-shortcut { font-weight:750; text-decoration:underline; text-underline-offset:.22em; }
.isc-chat-article-questions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap:8px; width:100%; }
.isc-chat-article-questions button { background:#fff; color:#174e46; border:1px solid #849e95; text-align:start; }
.isc-chat-article-questions button:hover { background:#dcebe5; }
.isc-chat-entry-options { display:flex; flex-wrap:wrap; gap:8px; flex-basis:100%; }
.isc-chat-entry-options button { background:#fff; color:#174e46; border:1px solid #849e95; }
.isc-chat-entry-options button:hover { background:#dcebe5; }
.isc-chat-entry .isc-chat-free { background:#174e46; color:#fff; }
.isc-chat-entry .isc-chat-free:hover { background:#22665b; }
.isc-chat-entry-article .isc-chat-intro p { display:none; }
.isc-chat-article-jump { color:#075d54; text-underline-offset:.2em; }
.isc-chat-reply button { display:block; min-height:44px; margin-block-start:8px; color:#174e46; background:#fff; border:1px solid #849e95; border-radius:7px; padding:6px 10px; font:inherit; cursor:pointer; }
.isc-chat-reply button:disabled { color:#586760; background:#eef1ee; cursor:default; }
.isc-chat-panel [hidden] { display:none; }
.isc-chat-summary { padding:14px; border:1px solid #c3d7d0; border-radius:10px; background:#fff; }
.isc-chat-summary textarea { width:100%; box-sizing:border-box; font:inherit; font-size:16px; padding:8px; }
.isc-chat-summary button,.isc-chat-guide-actions button { min-height:44px; padding:4px 12px; font:inherit; color:#174e46; cursor:pointer; }
.isc-chat-summary [role=status]:empty { display:none; }
.isc-chat-summary summary { min-height:44px; padding:10px 0; box-sizing:border-box; font-weight:600; color:#075d54; cursor:pointer; }
.isc-chat-summary details { margin-top:8px; border-top:1px solid #c3d7d0; }
.isc-chat-handoff { max-width:62ch; margin:0 0 12px; }
.isc-chat-guide-actions { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:6px; }
.isc-chat-guide-actions button { background:#fff; border:1px solid #849e95; border-radius:7px; }
.isc-chat-panel {
  box-sizing:border-box; padding:0; border:1px solid #cadbd5; border-radius:18px;
  width:min(860px,calc(100% - 48px)); height:min(760px,calc(100dvh - 48px));
  max-width:none; max-height:none; background:#fff; color:#17354d; overflow:hidden;
}
.isc-chat-panel[open] { display:flex; flex-direction:column; }
.isc-chat-panel::backdrop { background:#122936b0; }
body:has(.isc-chat-panel[open]) { overflow:hidden; }
.isc-chat-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px clamp(14px,4vw,32px); background:#123f3b; color:#fff; }
.isc-chat-head h2 { color:inherit; margin:0; font-size:clamp(1.12rem,2.4vw,1.5rem); }
.isc-chat-head-actions { display:flex; flex:none; align-items:center; gap:6px; }
.isc-chat-head button { min-height:44px; padding-inline:12px; border:1px solid #a1c5be; border-radius:7px; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.isc-chat-head [data-latest] { padding-inline:8px; background:#e5efed; color:#123f3b; font-size:.86rem; white-space:nowrap; }
.isc-chat-log { flex:1; min-height:0; overflow:auto; scroll-behavior:auto; overscroll-behavior:contain; padding:clamp(12px,3vw,28px); background:#f5f8f7; }
.isc-chat-log p { box-sizing:border-box; max-width:min(94%,62ch); width:fit-content; padding:10px 14px; margin:0 0 12px; border-radius:12px; line-height:1.65; font-size:1rem; overflow-wrap:anywhere; }
.isc-chat-reply { background:#e5efed; }
.isc-chat-log .isc-chat-user { margin-inline-start:auto; background:#173f5f; color:#fff; }
.isc-chat-log a { display:block; padding-block:5px; color:#075d54; text-decoration:underline; }
.isc-chat-controls { flex:none; padding:8px clamp(12px,3vw,28px); border-block-start:1px solid #d8e5df; }
.isc-chat-topic-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.isc-chat-topic { color:#174e46; font-weight:700; font-size:.86rem; overflow-wrap:anywhere; }
.isc-chat-topic-row button { flex:none; min-height:44px; border:0; background:transparent; color:#075d54; text-decoration:underline; cursor:pointer; }
.isc-chat-suggestions { display:flex; align-items:flex-start; gap:6px; margin-block-end:6px; }
.isc-chat-chips { display:flex; flex:1; min-width:0; gap:8px; overflow:auto; padding:2px 2px 4px; }
.isc-chat-chips button { flex:none; white-space:nowrap; min-height:44px; padding-inline:11px; border:1px solid #acbdb5; border-radius:22px; background:#fff; color:#174e46; font:inherit; font-size:.86rem; cursor:pointer; }
.isc-chat-chips button:hover { background:#edf5f1; }
.isc-chat-suggestions > button { flex:none; min-height:44px; padding-inline:9px; border:1px solid #acbdb5; border-radius:8px; background:#edf5f1; color:#174e46; font:inherit; font-size:.82rem; cursor:pointer; }
.isc-chat-suggestions.is-expanded { flex-direction:column; }
.isc-chat-suggestions.is-expanded > button { align-self:flex-end; }
.isc-chat-suggestions.is-expanded .isc-chat-chips { flex:auto; width:100%; box-sizing:border-box; flex-wrap:wrap; max-height:min(160px,25dvh); }
.isc-chat-suggestions.is-expanded .isc-chat-chips button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.isc-chat-form { display:flex; align-items:flex-end; gap:8px; margin:0; }
.isc-chat-form > button { min-height:52px; flex:none; }
:is(.isc-chat-entry,.isc-chat-panel) button:not(:disabled):active { box-shadow:inset 0 0 0 2px currentColor; }
@media(prefers-reduced-motion:no-preference) {
  :is(.isc-chat-entry,.isc-chat-panel) button { transition:transform .12s ease, background-color .12s ease; }
  :is(.isc-chat-entry,.isc-chat-panel) button:not(:disabled):active { transform:translateY(1px); }
  .isc-chat-log > .isc-chat-reply:last-child { animation:isc-chat-reply-in .16s ease-out; }
  @keyframes isc-chat-reply-in { from { opacity:.72; } to { opacity:1; } }
}
.isc-chat-draft { display:grid; flex:1; min-width:0; }
.isc-chat-draft textarea,.isc-chat-draft::after {
  grid-area:1 / 1; width:100%; min-width:0; min-height:52px; max-height:clamp(64px,18dvh,140px);
  box-sizing:border-box; padding:8px 10px; border:1px solid #829e96; border-radius:7px;
  font:inherit; font-size:16px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere;
}
.isc-chat-draft::after { content:attr(data-draft) " "; visibility:hidden; overflow:hidden; pointer-events:none; }
.isc-chat-draft textarea { background:#fff; color:#17354d; resize:none; }
.isc-chat-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; color:#42596d; }
.isc-chat-footer button { min-height:44px; border:0; background:transparent; color:#075d54; text-decoration:underline; cursor:pointer; }
.isc-chat-footer button:disabled { color:#586760; text-decoration:none; cursor:default; }
:is(.isc-chat-panel,.isc-chat-entry) :focus-visible { outline:2px solid #32857a; outline-offset:2px; }
@media(max-width:600px) {
  .isc-chat-panel { position:fixed; inset:0; width:100%; height:100dvh; margin:0; border:0; border-radius:0; }
  .isc-chat-head { padding-block-start:max(10px,env(safe-area-inset-top)); }
  .isc-chat-controls { padding-block-end:max(8px,env(safe-area-inset-bottom)); }
  .isc-chat-entry-options { display:grid; grid-template-columns:minmax(0,1fr); width:100%; }
  .isc-chat-entry button { width:100%; padding-inline:6px; }
  .isc-chat-entry .isc-chat-free { grid-column:1 / -1; }
  .isc-chat-entry .isc-chat-direct button { width:auto; padding-inline:12px; }
}

.journal-highlight { color:inherit; background:linear-gradient(transparent 42%, var(--journal-highlight-color) 42%, var(--journal-highlight-color) 93%, transparent 93%); box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.journal-highlight--result { --journal-highlight-color:#ffe58a; }
.journal-highlight--scope { --journal-highlight-color:#cde7fa; }
.journal-highlight--reason { --journal-highlight-color:#bfe9d4; }
