/* Shared by the conversation sheets and the quotations alongside the case. */
.chat-thread { display: grid; gap: 1.15rem; align-items: start; }
.chat-thread .chat-turn {
    display: grid; justify-items: start; justify-self: start;
    width: fit-content; max-width: 91%; min-width: 0;
    padding: 0; margin: 0; border: 0; background: none;
    scroll-margin-top: 12px;
}
.chat-thread .chat-turn[data-role="Nutzer"] { justify-items: end; justify-self: end; max-width: 83%; }
.chat-turn > .speaker, .chat-thread .chat-turn > h2:first-child {
    margin: 0 4px 5px; padding: 0; border: 0;
    font: 680 .84rem/1.35 system-ui, sans-serif; color: #233949;
}
.chat-turn > h2 small { font-size: .79rem; font-weight: 400; color: #526570; }
.chat-bubble {
    min-width: 0; max-width: 100%; padding: .8rem 1rem;
    color: #20313e; background: white; border: 1px solid #c9d4db; border-radius: 3px 14px 14px;
    font: 400 1rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere;
}
.chat-turn[data-role="Nutzer"] > .chat-bubble { background: #eaf2fa; border-color: #b6ccdf; border-radius: 14px 3px 14px 14px; }
.chat-bubble p { margin: .55rem 0; }
.chat-bubble > :first-child, .chat-excerpt > :first-child, .chat-details > div > :first-child { margin-top: 0; }
.chat-bubble > :last-child, .chat-excerpt > :last-child, .chat-details > div > :last-child { margin-bottom: 0; }
.chat-bubble h1, .chat-bubble h2, .chat-bubble h3 { font-size: 1.07rem; line-height: 1.35; }
.chat-bubble h1 { margin-bottom: .65rem; }
.chat-excerpt:has(+ details[open]) { display: none; }
.chat-details { margin-top: .55rem; }
.chat-details > summary, .attachment > summary { cursor: pointer; color: #24577c; font-size: .89rem; font-weight: 630; }
.chat-details[open] > summary { margin-bottom: .75rem; }
.chat-details[open] .when-closed, .chat-details:not([open]) .when-open { display: none; }
.chat-files { margin: 1.25rem 0; }
.chat-files > p { font-weight: 650; color: #233949; margin: 0 0 .45rem; }
.attachment { border-bottom: 1px solid #d5dee3; }
.attachment > summary { padding: .4rem 0; }
.summary-date { color: #556b79; font-size: .86rem; }
.chat-workflow { max-width: 65ch; }
.chat-workflow > ol { padding-left: 1.65rem; list-style-type: decimal; }
.chat-workflow > ol > li { padding: .55rem 0 .6rem .35rem; border-bottom: 1px solid #d7e0e5; }
.chat-workflow > ol > li::marker { font-weight: 700; color: #24577c; }
.chat-workflow > ol > li > strong { color: #172f42; display: block; font-size: 1.04em; }
.chat-workflow li p { margin: .2rem 0; }
.chat-workflow li ul { margin: .3rem 0; padding-left: 1.15rem; list-style-type: disc; }
.chat-workflow li ul li { padding: 0; }
.chat-summary { margin: 1.25rem 0 1rem; max-width: 62ch; }
.chat-summary figcaption { margin-bottom: .75rem; font-size: .9rem; font-weight: 650; color: #435969; }
.chat-summary .chat-thread { gap: .75rem; }
.chat-summary .chat-bubble p { margin: 0; }
body:has(.chat-thread) #blatt > h1 { font-size: clamp(1.35rem, 3.8vw, 2rem); margin-bottom: .35rem; }
body:has(.chat-thread) #blatt > .edition-note { margin: 0 0 1.1rem; }
body:has(#blatt .chat-thread) main { padding: clamp(14px, 3.2vw, 32px); }
@media (max-width: 500px) {
    .chat-thread .chat-turn { max-width: 96%; }
    .chat-thread .chat-turn[data-role="Nutzer"] { max-width: 89%; }
    .chat-bubble { padding: .66rem .8rem; }
}
