:root{--reading-accent:var(--primary,var(--accent,#ef5518));--reading-muted:var(--muted-foreground,var(--muted,#737373));--reading-soft:var(--secondary,var(--soft,rgba(128,128,128,.1)))}
.readable{white-space:normal;overflow-wrap:anywhere;line-height:1.65;min-width:0}
.readable>:first-child,.source-excerpt>:first-child{margin-top:0}
.readable>:last-child,.source-excerpt>:last-child{margin-bottom:0}
.readable p,.source-excerpt p{margin:0 0 .85em}
.readable h3{font:inherit;font-weight:650;line-height:1.4;margin:1.25em 0 .5em}
.readable ul,.readable ol{margin:.6em 0 1em;padding-left:1.6em}
.readable li{padding-left:.15em;margin:.35em 0}
.readable li::marker{color:var(--reading-accent)}
.readable code,.source-excerpt code{font-family:Consolas,monospace;font-size:.9em;background:var(--reading-soft);border-radius:4px;padding:.1em .3em;overflow-wrap:anywhere}
.readable pre{overflow:auto;max-width:100%;padding:14px;border-radius:8px;background:var(--reading-soft);white-space:pre;line-height:1.5}
.readable pre code{padding:0;background:none;overflow-wrap:normal}
.readable blockquote{margin:1em 0;border-left:3px solid var(--reading-accent);padding:.4em 1em;color:var(--reading-muted)}
.readable a{text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere;color:var(--reading-accent)}
.readable .table-scroll{overflow-x:auto;max-width:100%;margin:1em 0;border:1px solid var(--border,#dedede);border-radius:8px}
.readable table{border-collapse:collapse;width:100%;font-size:.92em;text-align:left}
.readable th,.readable td{padding:9px 12px;border-bottom:1px solid var(--border,#dedede);min-width:110px;vertical-align:top}
.readable th{font-weight:600;background:var(--reading-soft)}
.readable tr:last-child td{border-bottom:0}
.source-ref{display:inline-block;font-size:.82em;font-weight:600;color:var(--reading-accent);white-space:nowrap;vertical-align:baseline}
.source-ref[data-citation]{padding:0 2px;border:0;background:none;font-family:inherit;line-height:inherit;cursor:pointer;border-radius:3px}
.source-ref[data-citation]:hover{background:var(--reading-soft);text-decoration:underline}
.kb-sources{border-top:1px solid var(--border,#dedede);padding-top:14px;margin-top:20px;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.sources-title{font-size:11px;font-weight:600;color:var(--reading-muted);margin-bottom:8px;letter-spacing:.02em}
.source-item{margin:6px 0;border:1px solid var(--border,#dedede);border-radius:7px;overflow:hidden}
.source-item summary{cursor:pointer;display:flex;align-items:flex-start;gap:9px;padding:9px 11px;list-style:none}
.source-item summary::-webkit-details-marker{display:none}
.source-item summary::after{content:'+';margin-left:auto;color:var(--reading-muted);flex:none}
.source-item[open] summary::after{content:'−'}
.source-item summary:hover{background:var(--reading-soft)}
.source-name{min-width:0;flex:1;font-weight:500}
.source-name small{display:block;color:var(--reading-muted);font-size:11px;font-weight:400;margin-top:3px}
.source-excerpt{padding:12px;border-top:1px solid var(--border,#dedede);font-size:12px;line-height:1.65}
.source-excerpt::before{content:'Фрагмент материала';display:block;font-size:10px;color:var(--reading-muted);margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--reading-accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

.shared-card .readable,.shared-card .readable p,.shared-content.readable,.answer-text.readable{white-space:normal}
