/* intellicon md-lib v1.0 — 2026-10-30：控制台 Markdown 呈現（數值比照前台 /chat 的 .md 與出處面板，縮小一級以配合控制台欄寬） */
.atmd { font-size: 14.5px; line-height: 1.6; letter-spacing: 0; word-wrap: break-word; color: inherit; }
.atmd > :first-child { margin-top: 0; } .atmd > :last-child { margin-bottom: 0; }
.atmd p { margin: 0 0 .75em; }
.atmd h1, .atmd h2, .atmd h3, .atmd h4 { line-height: 1.4; margin: 1.2em 0 .6em; font-weight: 700; }
.atmd h1 { font-size: 1.45em; } .atmd h2 { font-size: 1.25em; } .atmd h3 { font-size: 1.12em; } .atmd h4 { font-size: 1em; }
.atmd ul, .atmd ol { margin: 0 0 1.2em; padding-left: 2.1em; }
.atmd li { margin: .25em 0; }
.atmd ul { list-style: none; }
.atmd ul > li { position: relative; }
.atmd ul > li::before { content: ""; position: absolute; left: -1.4em; top: .65em; width: .3em; height: .3em; border-radius: 50%; background: currentColor; }
.atmd li > ul, .atmd li > ol { margin: .25em 0 0; }
.atmd li > p { margin: 0 0 .25em; }
.atmd a { color: var(--primary, #6b4eff); text-decoration: underline; text-underline-offset: 2px; }
.atmd blockquote { margin: 0 0 .8em; padding: 2px 14px; border-left: 3px solid var(--border, #d9d4f0); color: var(--text-muted, #6b6a80); }
.atmd hr { border: 0; border-top: 1px solid var(--border, #e8e6f0); margin: 1.3em 0; }
.atmd :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; padding: .12em .4em; border-radius: 6px; background: var(--surface-2, #f3f2f7); }
.atmd .md-code { margin: 0 0 1em; border: 1px solid var(--border, #e8e6f0); border-radius: 8px; overflow: hidden; background: var(--surface-2, #f8f7fb); }
.atmd .md-code__bar { padding: 5px 12px; font-size: 12px; color: var(--text-muted, #8b8aa0); border-bottom: 1px solid var(--border, #e8e6f0); }
.atmd .md-code pre { margin: 0; padding: 10px 12px; overflow-x: auto; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.atmd .md-table { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--border, #e8e6f0); border-radius: 8px; }
.atmd table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.atmd th, .atmd td { padding: 7px 11px; border-bottom: 1px solid var(--border, #eeedf4); text-align: left; vertical-align: top; }
.atmd th { background: var(--surface-2, #f6f5fa); font-weight: 600; }
.atmd tr:last-child td { border-bottom: 0; }
.atmd img { max-width: 100%; border-radius: 10px; }
.atmd .cite-ref { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 9px; background: #ece9f6; color: #5b2c8d; font-size: 11px; font-weight: 600; line-height: 1; vertical-align: 2px; cursor: pointer; user-select: none; }
.atmd .cite-ref:hover { background: #ddd6f0; }
.atmd .cite-ref--lg { min-width: 20px; height: 20px; font-size: 12px; margin-right: 6px; cursor: default; vertical-align: middle; }
.atmd .cites { margin-top: 10px; border: 1px solid #e7e7ea; border-radius: 12px; background: #fafafb; }
.atmd .cites__toggle { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 600; color: #333; list-style: none; }
.atmd .cites__toggle::-webkit-details-marker { display: none; }
.atmd .cites__toggle::before { content: "▸"; color: #999; font-size: 12px; }
.atmd .cites[open] > .cites__toggle::before { content: "▾"; }
.atmd .cites__hint { font-weight: 400; color: #888; font-size: 12.5px; margin-left: auto; }
.atmd .cites__list { list-style: none; margin: 0; padding: 0 12px 6px; }
.atmd .cites__list > li::before { display: none; }
.atmd .cites__item { margin: 6px 0 14px; padding: 2px 4px; border-radius: 8px; transition: background .3s; }
.atmd .cites__item--hit { background: #f1edfb; }
.atmd .cites__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; line-height: 1.45; }
.atmd .cites__file { color: #444; font-weight: 500; }
.atmd .cites__where { color: #111; font-weight: 700; }
.atmd .cites__ctx { color: #6b6b73; font-size: 13px; line-height: 1.55; margin: 4px 0 0 26px; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.atmd .cites__ctx--open, .atmd .cites__ctx--x { display: block; -webkit-line-clamp: unset; }
.atmd .cites__ctx--x { cursor: default; }
.atmd .cites__foot { margin: 0 12px 10px 38px; color: #9a9aa3; font-size: 12px; }
.atmd > .cites__foot { margin: 6px 0 0; }
[data-theme=dark] .atmd .cites { background: #22232b; border-color: #34353f; }
[data-theme=dark] .atmd .cites__toggle, [data-theme=dark] .atmd .cites__where { color: #eee; }
[data-theme=dark] .atmd .cites__file { color: #bbb; }
[data-theme=dark] .atmd .cite-ref { background: #3a3150; color: #d9cbff; }
