/* research.css — 產業研究工作區(問一題、監看)。
 * 前半兩頁共用(主視覺、進度、研究庫、報告),後半是監看頁專屬(主題卡、排程列、摘要清單)。 */

/* ---------- 主視覺:這個工作區自己的那張(首頁卡、模式列橫幅、空狀態同一張) ---------- */
.ws-modebar::before { background-image: url("../img/card-research.jpg"); }
.grid__empty::before { background-image: url("../img/card-research.jpg"); background-position: center; }

/* ---------- 送出鈕旁的進度(要等幾分鐘,回饋要在按鈕旁邊) ---------- */
.progress { margin: 8px 0 0; color: var(--text-dim); font-size: var(--fs-sm); min-height: 1.4em; font-family: var(--font-mono); }
.progress:empty { margin: 0; min-height: 0; }

/* ---------- 研究庫(形狀照教育訓練的課程庫) ---------- */
.lib { margin-top: 18px; }
.lib__title { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--text-dim); font-weight: 500; }
.lib__item { display: flex; align-items: stretch; gap: 6px; margin-bottom: 6px; }
.lib__open { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.lib__open b { overflow-wrap: anywhere; }
.lib__open small { color: var(--text-dim); font-size: var(--fs-2xs); }
.lib__del { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-dim); cursor: pointer; padding: 0 10px; }

/* ---------- 報告 ---------- */
.report { width: 100%; }
.report__title { margin: 0 0 12px; font-size: var(--fs-xl); line-height: 1.4; overflow-wrap: anywhere; }
.report__status { color: var(--text-dim); }
.report__status--error { color: var(--warm-ink); }
.report__body { line-height: 1.9; font-size: var(--fs-md); }
.report__body sup { color: var(--brand-cool); font-family: var(--font-mono); font-size: var(--fs-2xs); margin-left: 2px; }
.report__subtitle { margin: 18px 0 8px; font-size: var(--fs-sm); color: var(--text-dim); font-weight: 500; }
.report__sources ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.src { border-left: 3px solid var(--brand-cool); padding: 4px 10px; font-size: var(--fs-sm); }
.src summary { cursor: pointer; }
.src__where { color: var(--text-dim); font-family: var(--font-mono); font-size: var(--fs-2xs); }
.src__url { display: block; margin: 6px 0 0; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-mid); overflow-wrap: anywhere; }
.src__text { white-space: pre-wrap; margin: 6px 0 0; color: var(--text-mid); }
.report__foot { margin: 16px 0 0; color: var(--text-dim); font-size: var(--fs-2xs); font-family: var(--font-mono); }
.report__acts { display: flex; gap: 8px; margin: 10px 0 0; }
.btn--xs { font-size: var(--fs-xs); padding: 3px 8px; }

/* ======== 以下只有 research/watch.html 用得到 ======== */

/* ---------- 擬搜尋詞:鈕與進度並排(回饋要在按鈕旁邊) ---------- */
.suggest { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.suggest .progress { margin: 0; }

/* ---------- 排程:頻率 / 星期 / 幾點三顆下拉一列 ---------- */
.sched { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.sched legend { padding: 0; }
.sched__row { display: flex; gap: 8px; }
.sched__row .field__input { flex: 1; min-width: 0; }

/* ---------- 主題卡(形狀照研究庫的 .lib__item,多一列動作) ---------- */
.topic { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.topic--current { border-color: var(--brand-cool); }
.topic__open { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.topic__name { overflow-wrap: anywhere; }
.topic__open small { color: var(--text-dim); font-size: var(--fs-2xs); font-family: var(--font-mono); }
.topic__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.topic__toggle { display: inline-flex; align-items: center; gap: 4px; margin-right: auto;
  font-size: var(--fs-xs); color: var(--text-mid); cursor: pointer; }
.topic__toggle input { width: 15px; height: 15px; accent-color: var(--brand-warm); }
.topic .progress { margin: 0; }

/* ---------- 摘要清單:報告上方一排可點的列 ---------- */
.digests { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.digests:empty { margin: 0; }
.digest { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.digest--current { border-color: var(--brand-cool); }
.digest b { overflow-wrap: anywhere; }
.digest small { color: var(--text-dim); font-size: var(--fs-2xs); }
