.ql-note { overflow-wrap: anywhere; }
.ql-tabs { overflow-x: auto; flex-wrap: wrap; }
.ql-field input[type="file"] { max-width: 100%; white-space: normal; }
.ql-panel details { margin-top: 16px; }
.ql-panel summary { cursor: pointer; color: var(--primary); }
.ss-item b span { display: inline; font-size: inherit; margin: 0; }
.ss-item b span.text-up { color: var(--up); }
.ss-item b span.text-down { color: var(--down); }
.ai-single-grid > section { min-width: 0; }
.ai-result-section p, .ai-result-foot { overflow-wrap: anywhere; }
.ai-single-result .tbl-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.ql-history-panel { padding: 0 20px 20px; margin-bottom: 20px; }
.ql-history-panel .ql-hd { margin: 0 -20px 16px; }
.ql-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 18px 0; }
.ql-controls .ql-field { flex: 1 1 210px; max-width: 100%; }
.ql-controls > button { width: auto; min-width: 112px; max-width: 100%; height: auto; min-height: 38px; padding: 8px 14px; line-height: 1.5; }
.ql-controls input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 6px 0 0; accent-color: var(--primary); }
.ql-controls .ql-field > span:has(input[type="checkbox"]) { display: flex; align-items: flex-start; line-height: 1.5; }
.ql-history-panel .tbl-wrap { max-width: 100%; overflow-x: auto; }
.ql-history-panel .ql-note { margin-top: 12px; }
.ql-history-panel h4 { margin: 20px 0 10px; }
.ql-history-panel button { white-space: normal; }
.ql-history-panel input[type="date"] { min-width: 0; }
@media (max-width: 600px) {
  .ql-panel .ql-hd { flex-wrap: wrap; gap: 10px; }
  .ql-panel .ql-hd h3 { flex: 1 1 100%; }
  .ql-panel .tbl-wrap { max-width: 100%; overflow-x: auto; }
  .ai-single-result .tbl { min-width: 560px; }
  .ql-history-panel { padding: 0 14px 16px; }
  .ql-history-panel .ql-hd { margin: 0 -14px 14px; }
  .ql-controls .ql-field { flex-basis: 100%; }
}

/* Three summary columns remain readable together on a phone. */
@media (max-width: 768px) {
  .ql-history-panel table.tbl.ql-factor-summary { min-width: 0; width: 100%; table-layout: fixed; }
  .ql-history-panel table.tbl.ql-factor-summary th, .ql-history-panel table.tbl.ql-factor-summary td { padding: 10px 8px; font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
  .ql-factor-summary th:first-child { width: 37%; }
  .ql-factor-summary th:nth-child(2) { width: 37%; }
  .ql-factor-summary th:nth-child(3) { width: 26%; }
  .ql-history-panel table.tbl.ql-factor-summary td:nth-child(2), .ql-history-panel table.tbl.ql-factor-summary td:nth-child(3) { white-space: nowrap; }
}

/* 研究报告可读引用：正文脚注与证据表编号一一对应 */
.cite { display: inline-block; padding: 0 3px; margin: 0 1px; font-size: 10px; line-height: 1.4; color: var(--primary, #2f6fed); background: rgba(47, 111, 237, .08); border-radius: 4px; text-decoration: none; vertical-align: super; cursor: pointer; }
.cite:hover { background: rgba(47, 111, 237, .18); }
.cite-missing { color: var(--text-3, #98a2b3); background: rgba(152, 162, 179, .12); }
.cite-list { margin: 7px 0 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.8; }
.cite-list li { margin: 4px 0; }
.cite-id { color: var(--text-3, #98a2b3); font-size: 11px; }
tr[id^="biz-cite-"]:target td, tr[id^="rep-"]:target td { background: rgba(47, 111, 237, .08); }
