/* ==========================================================================
   Levi flow · 简约设计样式
   规范参考：docs/antigravity-brief.md (安静阅读器、充足留白、高对比度、清晰层级)
   ========================================================================== */

/* Editorial palette. Legacy color aliases stay available to all page modules. */
:root {
  --palette-burgundy: #8b3019;
  --palette-red: #c84924;
  --palette-cream: #fbfbf8;
  --palette-navy: #171917;
  --palette-blue: #8a8e82;
  --bg-page: #fbfbf8;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f2eb;
  --bg-subtle-hover: #e9ebe3;
  --text-main: #171917;
  --text-muted: #62675d;
  --text-light: #70756b;
  --text-dim: #70756b;
  --text-secondary: var(--text-muted);
  --bg-secondary: var(--bg-subtle);
  --accent: #171917;
  --accent-hover: #34372f;
  --accent-light: #f1f2eb;
  --accent-text: #171917;
  --highlight: #c84924;
  --highlight-deep: #8b3019;
  --border-light: #dedfd7;
  --border-subtle: #e9ebe3;
  --border-color: var(--border-light);
  --status-draft: #f1f2eb;
  --status-submitted: #f1f2eb;
  --status-running: #fff3e9;
  --status-done: #edf1e8;
  --status-failed: #fff0e8;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-width: 1120px;
  --main-col-width: 720px;
  --side-col-width: 330px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================= 顶栏 (Header) ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.brand-badge {
  font-size: 12px;
  color: var(--text-light);
  background-color: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: normal;
}

.header-guide { margin-left: 6px; min-height: 36px; white-space: nowrap; }
.welcome-card { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 10px; padding: 24px; margin-bottom: 28px; }
.welcome-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.welcome-eyebrow { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.welcome-heading h2 { font-size: 22px; line-height: 1.45; font-weight: 600; }
.welcome-dismiss { flex-shrink: 0; min-height: 36px; }
.welcome-steps { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 24px 0; }
.welcome-steps li { display: flex; gap: 12px; }
.welcome-steps li > span { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; background: var(--accent-light); color: var(--accent); border-radius: 50%; font-size: 13px; }
.welcome-steps h3 { font-size: 15px; font-weight: 600; }
.welcome-steps p,.welcome-bottom > p { color: var(--text-muted); font-size: 13px; }
.welcome-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border-subtle); padding-top: 18px; }
.modal-dialog.guide-dialog { max-width: 660px; overflow: hidden; }
.guide-dialog .modal-header,.guide-dialog .modal-footer { flex-shrink: 0; }
.guide-dialog .guide-body { overflow-y: auto; min-height: 0; }
.guide-lead { color: var(--text-muted); margin-bottom: 20px; }
.guide-steps { list-style: none; display: grid; gap: 18px; }
.guide-steps h3,.guide-example h3 { font-size: 15px; margin-bottom: 4px; }
.guide-steps p,.guide-boundary { color: var(--text-muted); font-size: 14px; }
.guide-example { background: var(--bg-subtle); border-radius: 8px; padding: 18px; margin: 24px 0 18px; }
.guide-example dl { display: grid; gap: 3px; margin-top: 14px; font-size: 13px; }
.guide-example dt { font-weight: 600; }
.guide-example dd { color: var(--text-muted); margin-bottom: 12px; }
.guide-example dd:last-child { margin-bottom: 0; }
.guide-boundary { font-size: 12px; }
@media (max-width: 700px) {
  .welcome-card { padding: 18px; }
  .welcome-heading h2 { font-size: 19px; }
  .welcome-steps { grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }
  .welcome-bottom { flex-direction: column; align-items: stretch; gap: 12px; }
  .welcome-bottom .topic-actions { justify-content: space-between; }
  .header-guide { margin-left: auto; min-height: 44px; }
  .guide-footer { flex-wrap: wrap; }
  .guide-footer button,.welcome-card button { min-height: 44px; }
  .guide-dialog .modal-close-btn { width: 44px; height: 44px; }
}

.main-nav {
  display: flex;
  gap: 6px;
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-tab:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.nav-tab.active {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 600;
}

.nav-badge {
  font-size: 11px;
  background-color: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* ================= 页面主框架 ================= */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* 顶部导言/状态标尺 (紧凑，不占半屏) */
.page-intro {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.intro-main {
  flex: 1;
  min-width: 280px;
}

.page-headline {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-main);
  margin-bottom: 4px;
}

.page-subtext {
  font-size: 15px;
  color: var(--text-muted);
}

.intro-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
}

.demo-watermark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #fef3c7;
  color: #92400e;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.btn-secondary-quiet {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 5px;
}

.btn-secondary-quiet:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* 双列布局 */
.layout-grid {
  display: grid;
  grid-template-columns: var(--main-col-width) var(--side-col-width);
  gap: 40px;
  align-items: start;
}

/* 移动端顶部的关注一句话提示（仅小屏幕显示） */
.mobile-profile-bar {
  display: none;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.mobile-profile-content {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.mobile-profile-action {
  font-size: 13px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  font-weight: 500;
}

/* ================= 主阅读区 ================= */
.feed-column {
  min-width: 0;
}

.feed-section {
  margin-bottom: 36px;
}

.feed-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 13px;
  color: var(--text-light);
}

/* ================= 单条条目 (Feed Item) ================= */
.item-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.item-card:first-child {
  padding-top: 4px;
}

.item-header {
  margin-bottom: 8px;
}

.item-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.item-summary {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.original-summary-label { font-size: 12px; color: var(--text-light); }
.item-title { overflow-wrap: anywhere; }
.item-title-link { color:inherit; }
.item-title-link span { font-size:14px; color:var(--text-light); font-weight:400; }
.live-watermark { color: var(--accent); background: var(--bg-subtle); }
.update-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  padding: 12px 0;
  margin: -12px 0 22px;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}
.update-failed { color: #975e14; }
.btn-secondary-quiet:disabled { opacity: .55; cursor: wait; }

.selection-controls { margin-bottom: 24px; }
.feed-filters { display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; margin:14px 0 8px; color:var(--text-light); font-size:13px; }
.feed-filters label { display:flex; align-items:center; gap:8px; }
.feed-filters select { background:var(--bg-card, #fff); border:1px solid var(--border-light); border-radius:6px; padding:8px; color:var(--text-main); max-width:180px; }
.feed-new-filter { min-height:40px; cursor:pointer; }
.feed-new-filter input { width:16px; height:16px; accent-color:#456247; }
.new-item-badge { display:inline-block; flex-shrink:0; color:#426044; background:#edf3eb; padding:3px 7px; border-radius:4px; font-size:11px; line-height:1.5; }
.item-header { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; }
.source-last-read { display:block; font-size:11px; color:var(--text-light); }
.source-group summary { cursor:pointer; padding:10px 0; font-size:13px; }
.source-group summary small { color:var(--text-light); margin-left:6px; }
.source-group .source-item-row { padding:9px 0 9px 12px; }
.source-item-row small { color:var(--text-light); }
.source-status.source-failed { color:#a15426; }
.item-provenance, .task-more { font-size:13px; color:var(--text-light); margin:12px 0; }
.item-provenance summary, .task-more summary { cursor:pointer; padding:9px 0; }
.item-provenance li { margin:6px 0; overflow-wrap:anywhere; }
.task-more { border-bottom:1px solid var(--border-light); padding-bottom:8px; }
.selection-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.selection-tabs [aria-pressed="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.selection-note { color: var(--text-light); font-size: 12px; line-height: 1.6; margin: 8px 0 16px; }
.topic-choices { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.topic-choice { background: var(--bg-subtle); border-color: var(--border-light); padding: 5px 9px; color: var(--text-muted); font-size: 12px; }
.topic-choice:hover { background: var(--accent-light); color: var(--accent); }
.load-more { display: block; margin: 24px auto; }

/* 推荐理由与证据边界 */
.item-context-box {
  background-color: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 14px;
  font-size: 14px;
}

.recommendation-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recommendation-text {
  color: var(--text-main);
}

/* 来源与已知盲区元信息 */
.item-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.meta-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: var(--bg-subtle-hover);
  color: var(--text-muted);
  font-weight: 500;
}

.status-badge.highlight {
  background-color: #fef3c7;
  color: #92400e;
}

.unknowns-toggle {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-light);
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.unknowns-toggle:hover {
  color: var(--text-main);
}

.unknowns-list {
  background-color: #fafafa;
  border: 1px dashed var(--border-light);
  border-radius: 6px;
  padding: 10px 14px 10px 28px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.unknowns-list li {
  margin-bottom: 4px;
}

.unknowns-list li:last-child {
  margin-bottom: 0;
}

/* 条目动作按钮行 */
.item-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 主要动作：“继续查一查” */
.btn-primary-action {
  background-color: var(--accent);
  color: #ffffff;
  padding: 8px 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary-action:hover {
  background-color: var(--accent-hover);
}

/* 低强调按钮：“值得关注”、“不感兴趣” */
.btn-quiet {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 7px 12px;
  font-weight: 400;
}

.btn-quiet:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: #d4d4d8;
}

.btn-quiet.active {
  background: #f1f5f9;
  color: var(--accent);
  border-color: #cbd5e1;
  font-weight: 500;
}

.btn-source-link {
  font-size: 13px;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.btn-source-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* ================= 辅助区 (Sidebar Rail) ================= */
.sidebar-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 18px 20px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-subtitle {
  font-size: 12px;
  color: var(--text-light);
  font-weight: normal;
}

.profile-summary-box {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.profile-tag-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 8px;
  margin-bottom: 2px;
}

.profile-tag-label:first-child {
  margin-top: 0;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

/* 正在跟进简报 */
.followups-mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.followup-mini-item {
  padding: 10px;
  border-radius: 6px;
  background-color: var(--bg-subtle);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.followup-mini-item:hover {
  background-color: var(--bg-subtle-hover);
}

.followup-mini-title {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.followup-mini-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
}

/* 信息来源列表 */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-item-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.source-item-row:last-child {
  border-bottom: none;
}

.source-name {
  color: var(--text-main);
  font-weight: 500;
}

.source-status {
  font-size: 12px;
  color: var(--text-light);
}

/* ================= 收藏与跟进独立视图 ================= */
.saved-followup-container {
  max-width: 900px;
  margin: 0 auto;
}

.tabs-subnav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.subtab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 0;
}

.subtab-btn:hover {
  color: var(--text-main);
}

.subtab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.task-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.task-badge-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-draft { background-color: var(--status-draft); color: #334155; }
.badge-submitted { background-color: var(--status-submitted); color: #3730a3; }
.badge-running { background-color: var(--status-running); color: #854d0e; }
.badge-done { background-color: var(--status-done); color: #166534; }
.badge-failed { background-color: var(--status-failed); color: #991b1b; }

.task-question-box {
  background-color: var(--bg-subtle);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-main);
}

.task-question-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-light);
}

.demo-state-banner {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  background-color: #fee2e2;
  color: #991b1b;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 6px;
}

/* ================= 弹窗对话框 (Modals) ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.modal-body {
  padding: 20px 24px;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #fafafa;
  border-radius: 0 0 10px 10px;
}

/* 表单控件 */
.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-help {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.form-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-main);
  background-color: #ffffff;
  resize: vertical;
  line-height: 1.5;
}

.form-textarea:focus {
  border-color: var(--accent);
}

.transparency-callout {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-top: 14px;
}

/* ================= 消息提示 Toast ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width:calc(100vw - 48px);
}

.toast-msg {
  pointer-events: auto;
  background-color: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap:wrap;
  animation: toastFadeIn 0.2s ease;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-undo-btn {
  background: #334155;
  border: none;
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
}

.toast-undo-btn:hover {
  background: #475569;
}

/* ================= 空状态 (Empty States) ================= */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 16px;
}

/* ================= 移动端适配 (Responsive) ================= */
@media (max-width: 860px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar-column {
    order: 2; /* 移动端顺序：今日精选 -> 值得挖掘 -> 正在跟进 */
  }

  .mobile-profile-bar {
    display: block;
  }

  .page-container {
    padding: 16px 16px 48px;
  }

  .site-header-inner {
    padding: 10px 16px;
  }

  .brand-title {
    font-size: 18px;
  }

  .nav-tab {
    padding: 6px 10px;
    font-size: 13px;
  }

  .item-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .site-header-inner { flex-direction: column; align-items: stretch; gap: 6px; }
  .brand { align-items: center; }
  .main-nav { justify-content: space-between; }
  .nav-tab { justify-content: center; flex: 1; padding: 7px 6px; }
}

/* Document reading results follow the existing quiet, local-first layout. */
.research-result { margin: 20px 0; padding: 22px; background: #f8faf9; border: 1px solid var(--border-light); border-radius: 10px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.research-eyebrow { color: #52675c; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.research-summary { font-size: 18px; font-weight: 600; color: var(--text-main); margin: 10px 0 22px; }
.research-result h4 { font-size: 14px; margin: 18px 0 6px; color: var(--text-main); }
.research-result h4 small { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.research-result p { white-space: pre-wrap; }
.research-result ul, .research-result ol { padding-left: 22px; }
.research-result li + li { margin-top: 6px; }
.research-next { border-left: 2px solid #789483; padding-left: 14px; margin: 20px 0; }
.research-source { font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border-light); padding-top: 12px; }
.research-source summary { cursor: pointer; }
.research-source a { color: #3c6351; text-decoration: underline; }
.research-source p { margin-top: 8px; }
.research-start-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.research-start-row span, .research-progress { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.research-notice { padding: 14px; border: 1px solid #f1d6a3; background: #fffbf3; font-size: 13px; line-height: 1.7; margin-bottom: 16px; border-radius: 8px; }
button:disabled { cursor: default; opacity: .5; }
@media (max-width: 600px) { .research-result { padding: 16px; } .research-summary { font-size: 16px; } }

/* Keep the question action reachable even when a previous report is long. */
[aria-labelledby="followup-dialog-title"] .modal-dialog { overflow: hidden; }
[aria-labelledby="followup-dialog-title"] .modal-body { overflow-y: auto; min-height: 0; }
[aria-labelledby="followup-dialog-title"] .modal-header,
[aria-labelledby="followup-dialog-title"] .modal-footer { flex-shrink: 0; }
[aria-labelledby="followup-dialog-title"] .modal-footer { flex-wrap: wrap; }

/* A small next action, separated from the original AI report. */
.trial-entry { padding: 18px; margin: 18px 0; background: #f6f8ff; border: 1px solid #dce3f0; border-radius: 10px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.trial-entry > div:first-child { flex: 1 1 230px; }
.trial-entry strong { font-size: 14px; }
.trial-entry p, .trial-entry-links span { font-size: 12px; line-height: 1.7; color: var(--text-muted); margin-top: 6px; }
.trial-entry-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.trial-dialog { overflow: hidden; }
.trial-dialog > .modal-header, .trial-form > .modal-footer { flex-shrink: 0; }
.trial-form { min-height: 0; display: flex; flex-direction: column; }
.trial-form > .modal-body { overflow-y: auto; min-height: 0; }
.trial-intro { font-size: 13px; line-height: 1.7; margin-bottom: 18px; color: var(--text-muted); }
.trial-plan-details { border: 1px solid var(--border-light); border-radius: 7px; margin: 16px 0; padding: 12px; font-size: 13px; }
.trial-plan-details summary { cursor: pointer; font-weight: 500; }
.trial-plan-details[open] summary { margin-bottom: 16px; }
.trial-observation { border-top: 1px solid var(--border-light); padding-top: 20px; margin-top: 20px; }
.trial-error { color: #991b1b; font-size: 13px; margin-top: 12px; }

/* Local file backup, with explicit preview before merging. */
.backup-entry { padding: 20px; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.backup-entry h3 { font-size: 15px; }
.backup-entry p { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-top: 6px; }
.backup-entry > div { flex: 1 1 230px; }
.backup-dialog { overflow: hidden; }
.backup-dialog > .modal-body { overflow-y: auto; min-height: 0; }
.backup-dialog > .modal-header, .backup-dialog > .modal-footer { flex-shrink: 0; }
.backup-section + .backup-section { border-top: 1px solid var(--border-light); padding-top: 20px; margin-top: 20px; }
.backup-section { font-size: 13px; line-height: 1.75; }
.backup-section h4 { font-size: 15px; margin-bottom: 8px; }
.backup-section p { margin-bottom: 10px; }
.backup-file-label { display: block; font-weight: 500; margin: 14px 0 8px; }
#backup-file { font: inherit; max-width: 100%; width: 100%; }
#backup-file::file-selector-button { padding: 8px 10px; border: 1px solid #d9dde4; border-radius: 6px; background: #f9fafb; cursor: pointer; margin-right: 8px; }
.backup-summary { margin-top: 16px; padding: 14px; background: #f7f9fc; border: 1px solid var(--border-light); border-radius: 8px; overflow-wrap: anywhere; }
.backup-summary ul { padding-left: 20px; margin: 10px 0; }
.backup-option { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.backup-summary summary { cursor: pointer; }
.backup-origin { font-size: 12px; line-height: 1.7; color: var(--text-muted); margin: 12px 0; }

/* Writing preparation reuses evidence; it never masquerades as a sent AI task. */
.writing-entry { display:flex; flex-wrap:wrap; gap:14px; align-items:center; padding:16px 0; border-top:1px solid var(--border-light); }
.writing-entry > div { flex:1 1 240px; }
.writing-entry strong { font-size:14px; }
.writing-entry p { font-size:12px; line-height:1.7; color:var(--text-muted); margin-top:6px; }
.writing-dialog { overflow:hidden; }
.writing-dialog > .modal-header, .writing-form > .modal-footer { flex-shrink:0; }
.writing-form { min-height:0; display:flex; flex-direction:column; }
.writing-form > .modal-body { overflow-y:auto; min-height:0; }
.writing-form > .modal-footer { flex-wrap:wrap; }
.writing-status { background:#f7f9fc; border-left:2px solid #8c9cb0; padding:10px 12px; margin-bottom:18px; font-size:13px; line-height:1.7; }
.writing-form small { font-size:12px; font-weight:400; color:var(--text-muted); }
.writing-output { font-size:12px; line-height:1.7; }

/* A topic holds sources and personal context without changing either. */
.topic-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; margin-bottom:24px; }
.topic-heading > div:first-child { min-width:0; flex:1; }
.topic-heading > button { flex-shrink:0; }
.topic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.topic-card,.topic-material,.topic-notes { border:1px solid var(--border-light); background:var(--bg-surface); border-radius:10px; padding:22px; overflow-wrap:anywhere; }
.topic-card h3 { font-size:20px; margin:12px 0 8px; }
.topic-card p { font-size:14px; color:var(--text-muted); white-space:pre-wrap; }
.topic-card-meta { display:flex; gap:16px; justify-content:space-between; color:var(--text-muted); font-size:12px; }
.topic-card-footer { display:flex; gap:14px; align-items:center; justify-content:space-between; margin-top:24px; }
.topic-card-footer small { color:var(--text-light); font-size:12px; }
.topic-next { border-left:2px solid #94a6a0; padding-left:10px; margin-top:16px; }
.topic-local-note { margin-bottom:22px; }
.topic-backup { margin-top:28px; }
.topic-title { overflow-wrap:anywhere; margin-top:8px; }
.topic-goal { font-size:15px; color:var(--text-muted); white-space:pre-wrap; margin-top:8px; }
.topic-actions,.topic-material-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.topic-back { margin-bottom:20px; }
.topic-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:28px; align-items:start; }
.topic-layout > * { min-width:0; }
.topic-section-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:16px; }
.topic-section-heading h3,.topic-note-block h3 { font-size:15px; }
.topic-material + .topic-material { margin-top:16px; }
.topic-material h4 { font-size:18px; margin:10px 0; }
.topic-material-note { font-size:13px; color:var(--text-muted); white-space:pre-wrap; margin-bottom:16px; }
.topic-material details { font-size:13px; color:var(--text-muted); }
.topic-material summary { cursor:pointer; }
.topic-excerpt { white-space:pre-wrap; padding:14px 0; }
.topic-material-actions { margin-top:18px; }
.topic-note-block + .topic-note-block { border-top:1px solid var(--border-light); margin-top:20px; padding-top:20px; }
.topic-note-block p { white-space:pre-wrap; font-size:14px; margin-top:8px; }
.topic-placeholder { color:var(--text-light); }
.topic-notes > .form-help { margin-top:24px; }
.topic-dialog { overflow:hidden; }
.topic-form { display:flex; flex-direction:column; min-height:0; }
.topic-form > .modal-body { min-height:0; overflow-y:auto; }
.topic-dialog > .modal-header,.topic-form > .modal-footer { flex-shrink:0; }
.topic-form > .modal-footer { flex-wrap:wrap; }
.topic-dialog-item { font-size:15px; font-weight:500; margin-bottom:20px; overflow-wrap:anywhere; }
@media(max-width:860px) { .topic-layout,.topic-grid { grid-template-columns:1fr; } .topic-heading { flex-wrap:wrap; } .topic-heading > div:first-child { flex-basis:100%; } }
@media(max-width:600px) { .main-nav { flex-wrap:wrap; } .nav-tab { white-space:nowrap; } .topic-card,.topic-material,.topic-notes { padding:16px; } .topic-form > .modal-footer button { min-height:44px; } }

/* Source-first reading: compact headlines lead directly to the original site. */
.source-board-page { max-width:1360px; }
.board-site-header .site-header-inner { max-width:1360px; }
.board-intro { border:0; margin:10px 0 24px; padding:0; align-items:center; }
.board-intro .page-headline { font-size:26px; }
.board-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding-bottom:16px; border-bottom:1px solid var(--border-light); }
.board-groups { display:flex; flex-wrap:wrap; gap:6px; }
.board-group { padding:8px 12px; background:transparent; color:var(--text-muted); border-color:transparent; }
.board-group[aria-pressed="true"] { background:var(--accent); color:#fff; }
.board-group:hover { background:var(--accent-light); color:var(--accent); }
.board-group[aria-pressed="true"]:hover { background:var(--accent-hover); color:#fff; }
.board-group small { font-size:11px; margin-left:5px; opacity:.8; }
.board-management-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.source-manager { margin:18px 0; padding:18px; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-surface); }
.source-manager-heading { display:flex; align-items:start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.source-manager-heading h3 { font-size:16px; line-height:1.5; }
.source-manager-heading p { margin-top:5px; color:var(--text-muted); font-size:12px; line-height:1.7; }
.source-manager-heading > button { flex-shrink:0; }
.source-manager-groups { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.source-manager-groups fieldset { min-width:0; margin:0; padding:6px 12px; border:1px solid var(--border-light); border-radius:7px; }
.source-manager-groups legend { padding:0 5px; color:var(--text-muted); font-size:12px; }
.source-manager-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; }
.source-manager-row + .source-manager-row { border-top:1px solid var(--border-subtle); }
.source-manager-row label { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; font-size:12px; line-height:1.5; }
.source-visibility-label { flex:1; min-width:0; }
.source-visibility-label span { overflow-wrap:anywhere; }
.source-manager-row input { width:16px; height:16px; margin:0; flex-shrink:0; accent-color:var(--accent); }
.source-pin-label { color:var(--text-muted); flex-shrink:0; }
.source-pin-label:has(input:disabled) { opacity:.45; cursor:default; }
.source-manager-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
.source-manager-actions p { flex:1; min-width:180px; color:var(--text-light); font-size:11px; line-height:1.6; }
.source-manager-actions button { min-height:44px; }
.source-preference-warning { margin:12px 0; font-size:12px; line-height:1.7; color:#9a5924; overflow-wrap:anywhere; }
.source-visibility-note { margin:12px 0 0; color:var(--text-muted); font-size:11px; line-height:1.7; }
.daily-highlights { margin:20px 0 24px; }
.daily-highlights-header { display:flex; justify-content:space-between; align-items:start; gap:20px; margin-bottom:12px; }
.daily-highlights-header h3 { font-size:17px; line-height:1.5; }
.daily-highlights-header h3 small { margin-left:7px; color:var(--text-light); font-size:11px; font-weight:400; }
.daily-highlights-header > div > p { margin-top:4px; color:var(--text-light); font-size:11px; }
.daily-highlights-boundary { max-width:410px; color:var(--text-muted); font-size:11px; line-height:1.7; }
.daily-highlights-list { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.daily-highlight { display:flex; flex-direction:column; min-width:0; padding:15px; border:1px solid var(--border-light); border-radius:9px; background:var(--bg-surface); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.daily-highlight-title { display:flex; align-items:baseline; gap:9px; margin-bottom:9px; }
.daily-highlight-title > div { min-width:0; }
.daily-highlight-number { flex-shrink:0; color:var(--text-dim); font-size:11px; }
.daily-highlight-title h4 { font-size:14px; font-weight:600; line-height:1.6; }
.daily-highlight-title h4 a { color:var(--text-main); }
.daily-highlight-title h4 a > span { color:var(--text-light); font-size:11px; white-space:nowrap; }
.daily-highlight-repository { margin-top:2px; color:var(--text-light); font-size:11px; }
.daily-highlight-purpose-label { color:var(--text-light); font-size:10px; }
.daily-highlight-purpose { margin:0 0 9px; color:var(--text-main); }
.daily-highlight-purpose > span,.daily-highlight-reason > span { display:block; color:var(--text-light); font-size:10px; }
.daily-highlight-facts > div { display:flex; align-items:baseline; gap:9px; margin:3px 0; }
.daily-highlight-facts dt { flex-shrink:0; min-width:36px; color:var(--text-light); font-size:11px; }
.daily-highlight-facts dd { color:var(--text-muted); }
.daily-highlight-reason { margin:9px 0 5px; color:var(--text-muted); }
.daily-highlight-basis { color:var(--text-light); font-size:10px; }
.daily-highlight-origin { margin-top:auto; padding-top:10px; color:var(--text-light); font-size:10px; }
.daily-highlight-origin span { display:inline-block; margin-right:9px; }
.daily-highlight-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:10px; }
.daily-highlight-actions button { min-height:36px; padding:6px 10px; font-size:12px; }
.daily-highlight-collected { background:var(--accent-light); color:var(--accent); }
.daily-highlight-in-topic { color:var(--text-light); font-size:10px; }
.daily-highlights-empty { padding:13px 15px; border:1px solid var(--border-light); border-radius:8px; color:var(--text-muted); font-size:12px; line-height:1.8; }
.daily-highlights-empty p + p { color:var(--text-light); font-size:11px; }
@media(max-width:1000px) { .daily-highlights-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .daily-highlights-header { flex-direction:column; gap:8px; } .daily-highlights-boundary { max-width:none; } .daily-highlights-list { grid-template-columns:minmax(0,1fr); } .daily-highlight-actions button { min-height:44px; } }
@media(max-width:1000px) { .source-manager-groups { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .source-manager { padding:14px; } .source-manager-heading { flex-wrap:wrap; } .source-manager-groups { grid-template-columns:minmax(0,1fr); } .board-management-actions button { min-height:44px; } }
.board-status { display:flex; justify-content:space-between; align-items:center; gap:16px; font-size:12px; color:var(--text-light); margin:8px 0 0; }
.board-status .feed-new-filter { flex-shrink:0; display:flex; align-items:center; gap:7px; }
.board-reading-note { font-size:12px; color:var(--text-light); margin:0 0 22px; }
.source-board { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:20px; }
.source-panel { min-width:0; background:var(--bg-surface); border:1px solid var(--border-light); border-radius:12px; overflow:hidden; }
.source-panel-header { display:flex; gap:12px; align-items:center; padding:18px 18px 14px; border-bottom:1px solid var(--border-subtle); }
.source-mark { width:36px; height:36px; flex-shrink:0; border-radius:9px; display:grid; place-items:center; background:#eef1f5; color:#3f5167; font-size:14px; font-weight:650; }
.source-mark-community { background:#f1eef7; color:#695280; }
.source-mark-hot { background:#fbefea; color:#96614b; }
.source-mark-finance { background:#edf4ec; color:#4c6d48; }
.source-panel-heading { min-width:0; }
.source-panel h3 { font-size:15px; font-weight:650; line-height:1.5; }
.source-panel h3 a { color:var(--text-main); }
.source-panel h3 a span { margin-left:4px; font-size:12px; color:var(--text-dim); font-weight:400; }
.source-panel-heading p { font-size:11px; color:var(--text-light); margin-top:2px; }
.source-panel-heading .source-panel-warning,.source-panel-error { color:#9a5924; }
.source-panel-error { margin:12px 18px 0; font-size:12px; overflow-wrap:anywhere; }
.source-panel > .board-reading-note { margin:12px 18px 0; overflow-wrap:anywhere; }
.source-headlines { list-style:none; padding:6px 8px; }
.source-headline { display:grid; grid-template-columns:24px minmax(0,1fr) 36px; align-items:start; gap:5px; padding:3px 0 3px 7px; border-radius:7px; }
.source-headline:hover,.source-headline:focus-within { background:#f7f8fa; }
.headline-number { font-size:12px; color:var(--text-dim); padding-top:10px; font-variant-numeric:tabular-nums; }
.headline-number.headline-top { color:#9f644f; font-weight:600; }
.headline-link { display:block; color:var(--text-main); font-size:14px; line-height:1.55; padding:8px 0; overflow-wrap:anywhere; }
.headline-link:visited { color:var(--text-light); }
.headline-link:hover { color:var(--accent); }
.headline-kind { display:inline-block; vertical-align:baseline; color:var(--text-light); font-size:10px; background:var(--bg-subtle); padding:0 4px; border-radius:3px; margin-left:6px; white-space:nowrap; }
.headline-heat { font-size:10px; color:var(--text-light); margin-left:6px; }
.headline-save { width:36px; min-height:38px; display:grid; place-items:center; background:transparent; color:#89929b; border:0; }
.headline-save:hover,.headline-save.is-collected { color:var(--accent); background:var(--accent-light); }
.headline-save.is-in-topic { color:var(--accent); }
.headline-preview { margin:1px 0 7px; font-size:12px; line-height:1.7; color:var(--text-muted); }
.headline-preview > summary,.headline-preview-full > summary { cursor:pointer; min-height:32px; padding:6px 0; width:fit-content; }
.headline-preview > summary span { color:var(--text-light); font-size:10px; }
.headline-preview > summary:focus-visible,.headline-preview-full > summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:3px; }
.headline-preview-text { margin:4px 0 8px; color:var(--text-main); font-size:13px; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.headline-preview-text.is-shortened { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.headline-preview-text[hidden] { display:none; }
.headline-preview-full > summary { color:var(--accent); font-size:11px; }
.headline-preview-full .excerpt-show-less,.headline-preview-full[open] .excerpt-show-all { display:none; }
.headline-preview-full[open] .excerpt-show-less { display:inline; }
.headline-preview-boundary { margin:5px 0 0; font-size:10px; color:var(--text-light); overflow-wrap:anywhere; }
.collection-list { display:grid; gap:16px; max-width:860px; }
.collection-search { max-width:860px; margin:20px 0 16px; }
.collection-search-controls { display:flex; align-items:center; gap:8px; }
.collection-search-controls input { flex:1; min-width:0; padding:10px 12px; }
.collection-search-controls button { flex-shrink:0; min-height:42px; }
.collection-search-controls button[hidden] { display:none; }
.collection-search .form-help { margin-top:6px; }
.collection-result-count { margin:0 0 14px; color:var(--text-muted); font-size:13px; }
.collection-card { padding:22px; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-surface); min-width:0; }
.collection-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; color:var(--text-muted); font-size:12px; margin-bottom:10px; }
.collection-card h3 { margin:0 0 8px; font-size:17px; line-height:1.65; overflow-wrap:anywhere; }
.collection-card h3 a { color:var(--text-main); text-decoration:none; }
.collection-card h3 a:hover { color:var(--accent); }
.collection-card .form-help { margin:6px 0; }
.collection-note { margin:14px 0; padding:12px 14px; background:var(--bg-page,#f8fafc); white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; }
.collection-note span { display:block; font-size:12px; color:var(--text-muted); margin-bottom:4px; }
.manual-excerpt { margin:16px 0; padding:12px 14px; border-left:2px solid #94a6a0; background:var(--bg-page,#f8fafc); overflow-wrap:anywhere; }
.manual-excerpt-label { font-size:12px; color:var(--text-muted); margin-bottom:8px; }
.manual-excerpt blockquote { margin:0; font-size:14px; line-height:1.8; white-space:pre-wrap; }
.manual-excerpt details { margin-top:8px; font-size:13px; }
.manual-excerpt summary { cursor:pointer; }
.manual-excerpt details blockquote { margin-top:8px; }
.manual-excerpt .form-help { margin-top:10px; }
.topic-output { font-family:inherit; font-size:14px; line-height:1.8; min-height:300px; }
.manual-optional { margin:16px 0; }
.manual-optional > summary { cursor:pointer; font-size:14px; padding:8px 0; }
.manual-optional[open] > summary { margin-bottom:12px; }
.collection-source { margin:14px 0; font-size:13px; color:var(--text-muted); }
.collection-source summary { cursor:pointer; padding:4px 0; }
.collection-source p { line-height:1.8; overflow-wrap:anywhere; white-space:pre-wrap; }
.collection-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:16px; }
.collection-actions button { min-height:40px; }
@media (max-width:600px) {
  .collection-card { padding:16px; }
  .collection-actions button { min-height:44px; }
  .collection-meta { font-size:12px; }
  .toast-container { bottom:16px; right:16px; max-width:calc(100vw - 32px); }
}
.source-panel-footer { min-height:66px; display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--border-subtle); padding:12px 18px; font-size:10px; color:var(--text-light); }
.source-panel-footer small { display:block; font-size:10px; }
.source-more { color:var(--text-muted); background:transparent; font-size:12px; padding:7px 4px; white-space:nowrap; }
.source-more:hover { color:var(--accent); background:var(--bg-subtle); }
.source-panel-empty { padding:32px 20px; font-size:13px; color:var(--text-light); }
@media(max-width:1100px) { .source-board { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .source-board { grid-template-columns:minmax(0,1fr); gap:16px; }
  .board-intro { align-items:flex-start; margin-top:0; }
  .board-intro .intro-main { min-width:0; flex-basis:100%; }
  .board-intro .page-headline { font-size:23px; }
  .board-intro .page-subtext { font-size:14px; }
  .board-status { flex-wrap:wrap; gap:0; margin-top:14px; }
  .board-group { padding:8px 10px; font-size:13px; }
  .headline-save { min-height:44px; width:40px; }
  .source-headline { grid-template-columns:24px minmax(0,1fr) 40px; }
  .headline-link { min-height:44px; }
  .headline-preview > summary,.headline-preview-full > summary { min-height:44px; padding:11px 0; }
}
.headline-content { min-width:0; }
.headline-repository .headline-link { font-weight:550; padding-bottom:2px; }
.headline-repository .headline-link > span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.headline-repo-name { margin:3px 0 0; color:#78716c; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.headline-explanation { margin-top:4px; color:#57534e; font-size:12px; line-height:1.65; }
.headline-explanation > summary { cursor:pointer; width:fit-content; color:#57534e; }
.headline-explanation > summary span { font-size:10px; color:#78716c; }
.headline-explanation p { margin:7px 0; overflow-wrap:anywhere; }
.headline-explanation > small { display:block; color:#78716c; font-size:10px; }
.repo-original { padding:7px 9px; margin:7px 0; background:#fafaf9; border-radius:5px; }
.repo-original summary { cursor:pointer; }
.source-read-project { display:block; background:none; border:0; padding:6px 0; color:#365d4a; font:inherit; cursor:pointer; text-align:left; }
.source-read-project:hover { text-decoration:underline; }
.public-preview-note { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 22px; padding:10px 0; border-bottom:1px solid var(--border-color, #e4e4e7); font-size:12px; line-height:1.7; color:var(--text-muted, #71717a); }
.public-preview-note a { color:#365d4a; white-space:nowrap; }
@media (max-width: 600px) { .public-preview-note { flex-direction:column; gap:4px; } }
.board-reading-row { display:flex; gap:12px; justify-content:space-between; align-items:center; margin-bottom:12px; }
.board-reading-row .board-reading-note { margin:0; }
.repository-guide-notice { margin:0 0 12px; font-size:12px; color:#57534e; line-height:1.7; }
@media(max-width:700px) {
  .board-reading-row { align-items:flex-start; flex-wrap:wrap; }
  .headline-explanation > summary { min-height:28px; display:list-item; padding-top:3px; }
  .source-read-project { min-height:40px; }
}

/* Homepage search changes only the result area while the input stays in place. */
.feed-search-tools { margin:0 0 20px; padding:15px 16px; border:1px solid var(--border-light); border-radius:10px; background:var(--bg-surface); }
.feed-search-entry > label { display:block; margin-bottom:7px; color:var(--text-main); font-size:14px; font-weight:600; }
.feed-search-input-row { display:flex; align-items:center; gap:9px; }
.feed-search-input-row input { flex:1; min-width:0; min-height:44px; padding:9px 12px; border:1px solid var(--border-light); border-radius:6px; background:var(--bg-page); color:var(--text-main); font:inherit; font-size:14px; }
.feed-search-input-row input::placeholder { color:var(--text-light); }
.feed-search-input-row > button { flex-shrink:0; min-height:44px; }
.feed-search-purposes { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.feed-search-purpose { min-height:44px; padding:8px 11px; background:transparent; color:var(--text-muted); border-color:var(--border-light); font-size:12px; }
.feed-search-purpose[aria-pressed="true"] { background:var(--accent-light); color:var(--accent); border-color:var(--accent); }
.feed-search-purpose small { margin-left:4px; color:var(--text-light); font-size:10px; }
.feed-search-note { margin-top:7px; color:var(--text-light); font-size:11px; line-height:1.7; }
.feed-search-results { margin:18px 0 24px; }
.feed-search-results-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 16px; margin-bottom:12px; }
.feed-search-results-heading h3 { font-size:16px; }
.feed-search-results-heading p { color:var(--text-light); font-size:11px; }
.feed-search-result-list { list-style:none; margin:0; padding:0; border-top:1px solid var(--border-light); }
.feed-search-result { display:flex; justify-content:space-between; align-items:start; gap:20px; padding:15px 0; border-bottom:1px solid var(--border-light); }
.feed-search-result-content { flex:1; min-width:0; overflow-wrap:anywhere; }
.feed-search-result-labels { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:5px; }
.feed-search-kind { display:inline-block; padding:2px 7px; border-radius:4px; background:var(--accent-light); color:var(--accent); font-size:11px; line-height:1.6; font-weight:600; }
.feed-search-kind-content { background:var(--bg-subtle); color:var(--text-muted); font-weight:400; }
.feed-search-title-note { color:var(--text-light); font-size:10px; }
.feed-search-result h4 { margin:0; font-size:14px; line-height:1.7; font-weight:600; }
.feed-search-result h4 a { color:var(--text-main); }
.feed-search-result h4 a > span { color:var(--text-light); font-size:11px; white-space:nowrap; }
.feed-search-repository,.feed-search-origin { margin-top:3px; color:var(--text-light); font-size:11px; line-height:1.6; }
.feed-search-summary { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin-top:7px; color:var(--text-muted); font-size:12px; line-height:1.8; white-space:pre-line; }
.feed-search-summary-empty { color:var(--text-light); }
.feed-search-practical-summary { margin-top:7px; color:var(--text-muted); font-size:12px; line-height:1.8; }
.feed-search-practical-summary p + p { margin-top:5px; }
.feed-search-summary-label { margin-right:8px; color:var(--text-main); font-size:11px; font-weight:600; }
.feed-search-basis,.feed-search-times { margin-top:5px; color:var(--text-light); font-size:10px; line-height:1.7; }
.feed-search-times > span { display:inline-block; margin-right:10px; }
.feed-search-result-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px; max-width:200px; flex-shrink:0; }
.feed-search-result-actions button { min-height:44px; padding:8px 11px; font-size:12px; }
.feed-search-result-actions .is-collected { color:var(--accent); background:var(--accent-light); }
.feed-search-result-actions > span { color:var(--text-light); font-size:10px; }
.feed-search-more { display:block; min-height:44px; margin:16px auto 0; }
.feed-search-empty { padding:20px 0; color:var(--text-muted); font-size:12px; line-height:1.8; }
.feed-search-empty > button { min-height:44px; margin-top:10px; }
@media(max-width:600px) { .feed-search-tools { padding:12px; } .feed-search-input-row { flex-wrap:wrap; } .feed-search-input-row input { flex-basis:100%; font-size:16px; } .feed-search-purpose { padding:8px 10px; } .feed-search-result { flex-direction:column; gap:10px; } .feed-search-result-actions { max-width:none; justify-content:flex-start; } }


/* A small connection strip does not replace the reader or steal its focus. */
.feed-load-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin: 0 0 16px; background: #f7f8fa; border: 1px solid #e4e4e7; border-radius: 10px; color: #52525b; }
.feed-load-notice p { margin: 0 0 4px; font-size: 13px; line-height: 1.6; }
.feed-load-notice small { display: block; font-size: 12px; line-height: 1.7; color: #71717a; }
.feed-load-notice button { flex-shrink: 0; min-height: 44px; }
.feed-load-error { background: #fffaf1; border-color: #eedcba; }
.feed-initial-load { max-width: 600px; padding: 60px 24px; margin: 0 auto; text-align: center; color: #52525b; }
.feed-initial-load h2 { font-size: 20px; color: #18181b; }
.feed-initial-load p { font-size: 14px; line-height: 1.8; }
.feed-initial-load button { margin: 24px auto 0; min-height: 44px; }
@media (max-width: 600px) { .feed-load-notice { align-items: flex-start; flex-wrap: wrap; gap: 8px; } }

/* Collection changes are deliberate, field-by-field user choices. */
.topic-sync-notice { margin:12px 0; padding:12px 14px; background:#f5f3e9; border:1px solid #e3dfca; border-radius:10px; color:var(--text-secondary); font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.topic-sync-notice button { display:block; min-height:44px; margin-top:4px; }
.topic-sync-field { border-top:1px solid var(--border-light); padding:18px 0; }
.topic-sync-choice { display:flex; align-items:center; gap:10px; min-height:44px; font-weight:600; }
.topic-sync-choice input { width:20px; height:20px; accent-color:var(--accent); }
.topic-sync-value { margin-top:10px; padding:12px; background:var(--bg-secondary,#f6f7f5); border:1px solid var(--border-light); border-radius:8px; }
.topic-sync-value strong { font-size:12px; color:var(--text-secondary); }
.topic-sync-value p { margin-top:6px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; }
.material-review { margin:7px 0; color:var(--text-secondary); font-size:12px; overflow-wrap:anywhere; }


/* ================= 奶油白与深蓝：清晰的阅读层次 ================= */
.site-header {
  background: var(--palette-navy);
  border-bottom: 0;
  backdrop-filter: none;
  box-shadow: 0 2px 12px #00304910;
}
.site-header-inner { min-height: 76px; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { align-items: center; gap: 10px; }
.brand-title { color: var(--palette-cream); font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.brand-badge { color: #d7e5ed; background: #1c4b64; padding: 3px 8px; border-radius: 6px; font-size: 11px; }
.header-guide { color: var(--palette-cream); border-color: #426378; background: transparent; min-height: 44px; border-radius: 8px; }
.header-guide:hover { color: var(--palette-cream); background: #174b67; }
.main-nav { gap: 4px; }
.nav-tab { min-height: 44px; color: #d9e7ed; padding: 9px 15px; border-radius: 8px; }
.nav-tab:hover { color: var(--palette-cream); background: #174b67; }
.nav-tab.active { color: var(--palette-navy); background: var(--palette-cream); }
.nav-badge { background: #e7f0f5; color: var(--palette-navy); }
.nav-tab.active .nav-badge { background: var(--palette-navy); color: var(--palette-cream); }
.page-container { padding-top: 26px; }
.page-headline { font-weight: 700; letter-spacing: -.035em; line-height: 1.4; }
.page-subtext { line-height: 1.7; font-size: 14px; }
.btn-secondary-quiet, .btn-primary-action, .btn-quiet { min-height: 44px; border-radius: 8px; padding: 9px 14px; }
.btn-secondary-quiet { color: var(--text-main); }
.btn-primary-action { background: var(--highlight); color: #fffdf8; border-color: var(--highlight); }
.btn-primary-action:hover { background: var(--highlight-deep); border-color: var(--highlight-deep); }
.public-preview-note { margin-bottom: 14px; padding: 0 0 12px; border-color: #0030491a; }
.public-preview-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.feed-load-notice { padding: 9px 13px; background: #fffdf89e; border-color: #00304915; border-radius: 8px; margin-bottom: 22px; color: var(--text-muted); }
.feed-load-notice > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; }
.feed-load-notice p { margin: 0; font-size: 12px; }
.feed-load-notice small { color: var(--text-light); font-size: 11px; }
.feed-load-error { background: #fff7e6; border-color: #a273363d; }
.board-intro { margin: 0 0 20px; gap: 14px; }
.board-intro .page-headline { font-size: 29px; margin-bottom: 5px; }
.feed-search-tools { padding: 16px 18px; border: 1px solid #00304918; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 2px 8px #00304903; }
.feed-search-entry > label { font-size: 13px; margin-bottom: 8px; }
.feed-search-input-row input { border-radius: 8px; background: #fffdf8; border-color: #b9cbd5; padding: 11px 14px; }
.feed-search-input-row input:focus { border-color: var(--palette-blue); }
.feed-search-purposes { gap: 7px; margin-top: 10px; }
.feed-search-purpose { border-radius: 7px; border-color: transparent; background: var(--bg-subtle); }
.feed-search-purpose:hover { background: var(--bg-subtle-hover); color: var(--accent); }
.feed-search-purpose[aria-pressed="true"] { background: var(--accent-light); border-color: var(--palette-blue); }
.feed-search-note { font-size: 11px; margin-top: 8px; }
.board-toolbar { padding-bottom: 12px; border-color: #00304926; gap: 12px; }
.board-groups { gap: 5px; }
.board-group { min-height: 44px; border-radius: 8px; padding: 9px 12px; color: var(--text-muted); }
.board-group small { margin-left: 5px; }
.board-management-actions button { min-height: 44px; }
.board-status { margin: 8px 0 10px; gap: 20px; align-items: flex-start; }
.board-status > p { max-width: 1020px; line-height: 1.7; }
.board-status small { font-size: 11px; color: var(--text-light); }
.update-failed { color: var(--highlight-deep); }
.feed-new-filter { min-height: 44px; }
.feed-new-filter input { accent-color: var(--accent); }
.board-reading-note, .repository-guide-notice { color: var(--text-light); }
.board-reading-row { padding-bottom: 8px; margin-bottom: 12px; }
.daily-highlights { margin: 14px 0 30px; }
.daily-highlights-header { margin-bottom: 14px; }
.daily-highlights-header h3 { font-size: 19px; letter-spacing: -.02em; }
.daily-highlights-header > div > p, .daily-highlights-boundary { font-size: 12px; }
.daily-highlights-list { gap: 16px; }
.daily-highlight { padding: 20px; border: 1px solid #00304915; border-radius: 12px; box-shadow: 0 3px 12px #00304904; font-size: 13px; }
.daily-highlight-title h4 { font-size: 16px; line-height: 1.65; }
.daily-highlight-number { color: var(--highlight); font-weight: 600; font-size: 12px; }
.daily-highlight-actions button { min-height: 44px; border-radius: 7px; }
.daily-highlight-purpose-label, .daily-highlight-purpose > span, .daily-highlight-reason > span, .daily-highlight-basis, .daily-highlight-origin { font-size: 11px; }
.source-board { gap: 20px; }
.source-panel { border: 1px solid #00304915; border-radius: 12px; box-shadow: 0 3px 12px #00304904; }
.source-panel-header { padding: 18px 18px 16px; gap: 12px; background: #fffdf8; }
.source-mark, .source-mark-community, .source-mark-hot, .source-mark-finance { background: var(--accent-light); color: var(--palette-navy); border-radius: 8px; width: 38px; height: 38px; border: 1px solid #669bbc38; font-weight: 650; }
.source-panel h3 { font-size: 16px; }
.source-panel-heading p { margin-top: 4px; }
.source-panel-warning, .source-panel-heading .source-panel-warning, .source-panel-error { color: var(--highlight-deep); }
.source-headlines { padding: 8px 10px; }
.source-headline { grid-template-columns: 22px minmax(0,1fr) 44px; padding: 4px 0 4px 7px; gap: 6px; border-radius: 8px; }
.source-headline:hover, .source-headline:focus-within { background: var(--accent-light); }
.headline-number { padding-top: 11px; font-size: 11px; }
.headline-number.headline-top { color: var(--highlight); }
.headline-link { font-size: 14px; line-height: 1.75; padding: 8px 0; }
.headline-save { width: 44px; min-height: 44px; color: var(--text-light); border-radius: 8px; }
.headline-repo-name, .headline-explanation, .headline-explanation > summary, .headline-explanation > small, .headline-explanation > summary span { color: var(--text-light); }
.headline-explanation p { color: var(--text-muted); }
.source-read-project { color: var(--accent); }
.repo-original { background: var(--bg-subtle); border-radius: 8px; padding: 10px 12px; }
.source-panel-footer { min-height: 66px; background: #f8faf9; padding: 10px 18px; }
.source-more { min-height: 44px; padding: 8px; border-radius: 7px; color: var(--accent); }
.feed-search-result-list { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 12px; padding: 0 20px; }
.feed-search-result { padding: 20px 0; }
.feed-search-result:last-child { border-bottom: 0; }
.feed-search-result h4 { font-size: 16px; }
.feed-search-summary, .feed-search-practical-summary { font-size: 13px; }
.feed-search-basis, .feed-search-times, .feed-search-origin { font-size: 11px; }
.welcome-card, .topic-card, .topic-material, .topic-notes, .collection-card, .sidebar-card, .task-card, .source-manager { border-radius: 12px; box-shadow: 0 3px 12px #00304904; }
.topic-next, .manual-excerpt, .research-next { border-left-color: var(--palette-blue); }
.collection-note { background: var(--bg-subtle); border-radius: 8px; }
.collection-actions button, .collection-search-controls button { min-height: 44px; }
.research-result { background: var(--bg-surface); }
.research-eyebrow, .research-source a { color: var(--accent); }
.writing-status, .backup-summary, .trial-entry, .transparency-callout { background: var(--bg-subtle); border-color: var(--border-light); color: var(--text-muted); }
.modal-backdrop { background: #00304970; backdrop-filter: blur(3px); }
.modal-dialog { background: var(--bg-surface); border-radius: 16px; box-shadow: 0 24px 80px #00304930; max-height: calc(100dvh - 40px); }
.modal-header, .modal-footer { flex-shrink: 0; }
.modal-header { padding-top: 20px; padding-bottom: 16px; }
.modal-footer { background: #f7f9f8; border-radius: 0 0 16px 16px; flex-wrap: wrap; }
.modal-close-btn { width: 44px; height: 44px; border-radius: 8px; }
.form-textarea, .collection-search-controls input { border-radius: 8px; background: #fffdf8; }
.form-textarea { line-height: 1.7; padding: 12px 14px; }
:focus-visible { outline: 2px solid var(--palette-blue); outline-offset: 3px; }
.site-header :focus-visible { outline-color: var(--palette-cream); }

@media (min-width: 1150px) {
  .feed-search-tools { display: grid; grid-template-columns: minmax(280px,.9fr) minmax(0,2fr); gap: 10px 24px; }
  .feed-search-purposes { align-items: flex-end; align-content: flex-end; margin-top: 0; }
  .feed-search-note { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 960px) {
  .site-header-inner { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 14px; padding-bottom: 12px; }
  .brand { width: 100%; }
  .header-guide { margin-left: auto; }
  .main-nav { width: 100%; justify-content: space-between; }
  .nav-tab { flex: 1; justify-content: center; }
}
@media (max-width: 700px) {
  .page-container { padding-top: 20px; }
  .board-intro .page-headline { font-size: 26px; }
  .board-intro { gap: 12px; margin-bottom: 18px; }
  .board-status { flex-direction: column; gap: 4px; margin-bottom: 10px; }
  .source-headline { grid-template-columns: 22px minmax(0,1fr) 44px; }
  .feed-search-tools { padding: 14px; }
  .feed-search-result-list { padding: 0 16px; }
  .source-panel { border-radius: 12px; }
  .headline-explanation > summary { min-height: 44px; padding-top: 10px; }
  .source-read-project { min-height: 44px; }
  .board-toolbar { align-items: flex-start; }
  .daily-highlight { padding: 18px; }
  .modal-backdrop { padding: 12px; }
  .modal-dialog { max-height: calc(100dvh - 24px); border-radius: 12px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 480px) {
  .site-header-inner { gap: 10px; padding: 12px 16px 10px; }
  .brand { gap: 8px; }
  .brand-title { font-size: 19px; }
  .brand-badge { font-size: 10px; }
  .header-guide { padding: 8px 10px; font-size: 12px; }
  .main-nav { gap: 2px; flex-wrap: nowrap; }
  .nav-tab { padding: 8px 5px; font-size: 12px; gap: 4px; }
  .nav-badge { font-size: 10px; padding: 1px 4px; }
  .topic-card, .topic-material, .topic-notes, .collection-card { padding: 18px; }
  .public-preview-note { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Never revive an intentionally hidden control with layout overrides. */
[hidden] { display: none !important; }

/* Selected layout 3: a compact source overview, with details available on demand. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.board-site-header { background:var(--palette-navy); backdrop-filter:none; }
.board-site-header .site-header-inner { max-width:1440px; min-height:60px; padding:8px 28px; }
.board-site-header .brand-title { font-size:22px; }
.board-site-header .brand-title,.board-site-header .nav-tab,.board-site-header .header-guide { color:var(--palette-cream); }
.board-site-header .brand-badge { background:#1a455e; color:#fdf0d5; }
.board-site-header .nav-tab { min-height:42px; padding:8px 14px; border-radius:6px; font-size:14px; }
.board-site-header .nav-tab.active { background:var(--palette-cream); color:var(--palette-navy); }
.board-site-header .nav-tab:hover:not(.active),.board-site-header .header-guide:hover { background:#1a455e; }
.source-board-page { max-width:1440px; padding:14px 28px 48px; }
.source-board-page .public-preview-note { margin:0 0 10px; padding:0; border:0; font-size:11px; line-height:1.6; }
.source-board-page .feed-load-notice { margin:0 0 10px; }
.source-board-page .welcome-compact { margin:0 0 12px; padding:0; border:0; border-bottom:1px solid #00304926; border-radius:0; background:transparent; box-shadow:none; }
.welcome-compact > summary { cursor:pointer; padding:8px 0; font-size:12px; color:var(--text-muted); }
.welcome-compact > summary span { margin-left:12px; color:var(--accent); }
.welcome-compact > section { padding:16px 0; }
.board-topbar { display:flex; align-items:flex-start; gap:12px; margin-bottom:6px; }
.board-intro-compact { order:2; margin:0; flex-shrink:0; }
.board-intro-compact .intro-main { position:absolute; left:0; top:0; min-width:0; max-width:1px; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.board-intro-compact .topic-actions { gap:8px; }
.board-intro-compact button { min-height:44px; padding:10px 14px; white-space:nowrap; }
.board-intro-compact .btn-primary-action { background:var(--bg-surface); border:1px solid #b9cbd5; color:var(--accent); }
.source-board-page .feed-search-tools { display:grid; grid-template-columns:minmax(0,1fr) 110px; gap:10px; flex:1; min-width:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.source-board-page .feed-search-tools:has(.feed-purpose-options[open]) { grid-template-columns:minmax(0,1fr); }
.source-board-page .feed-search-input-row { gap:10px; }
.source-board-page .feed-search-input-row input { min-height:44px; padding:10px 16px; border-radius:6px; font-size:14px; }
.source-board-page #feed-search-submit { min-height:44px; min-width:90px; border-radius:6px; background:var(--highlight); color:#fffdf8; }
.source-board-page #feed-search-submit:hover { background:var(--highlight-deep); }
.feed-purpose-options { margin-top:0; font-size:11px; }
.feed-purpose-options > summary { cursor:pointer; width:fit-content; min-height:44px; padding:12px 0; color:var(--text-muted); }
.feed-purpose-options[open] { padding-bottom:8px; }
.source-board-page .feed-search-purpose { min-height:36px; font-size:12px; }
.source-board-page .board-toolbar { gap:6px; padding:0 0 6px; border-bottom:1px solid #00304926; }
.source-board-page .board-groups { gap:5px; }
.source-board-page .board-group { min-height:40px; padding:8px 12px; border:1px solid #b9cbd5; border-radius:6px; background:var(--bg-surface); font-size:12px; }
.source-board-page .board-group[aria-pressed="true"] { background:var(--highlight); color:#fffdf8; border-color:var(--highlight); }
.source-board-page .board-management-actions { gap:6px; }
.source-board-page .board-management-actions button { min-height:40px; padding:8px 10px; border:0; background:transparent; font-size:12px; }
.board-meta-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 16px; margin:6px 0 12px; font-size:11px; color:var(--text-muted); }
.board-updates { flex:1; min-width:220px; }
.board-updates > summary { cursor:pointer; width:fit-content; padding:4px 0; }
.board-updates[open] { flex-basis:100%; order:3; }
.board-updates .board-update-message { margin:8px 0; line-height:1.8; }
.board-status-summary { color:var(--text-muted); }
.board-update-message { margin:0 0 10px; font-size:11px; line-height:1.7; }
.board-meta-controls .feed-new-filter { display:flex; align-items:center; gap:6px; min-height:32px; font-size:11px; }
.board-meta-controls .feed-new-filter input { accent-color:var(--accent); }
.source-board-page .board-reading-row { margin:0 0 8px; }
.source-board-page .board-reading-note { font-size:11px; }
.source-board-page .source-board { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; align-items:stretch; }
.source-board-page .source-panel { display:flex; flex-direction:column; border:1px solid #00304926; border-radius:8px; box-shadow:none; }
.source-board-page .source-panel-header { min-height:68px; padding:12px 14px; gap:10px; background:transparent; border-bottom:1px solid #00304916; }
.source-board-page .source-mark { width:34px; height:34px; border-radius:7px; background:#e5f0f5; }
.source-mark img { width:22px; height:22px; display:block; object-fit:contain; }
.source-board-page .source-panel h3 { font-size:15px; line-height:1.45; }
.source-board-page .source-panel-heading p { font-size:10px; margin-top:3px; }
.source-board-page .source-headlines { flex:1; padding:0 10px; }
.source-board-page .source-headline { position:relative; min-height:62px; grid-template-columns:18px minmax(0,1fr) 30px; gap:5px; padding:7px 0; border-radius:0; border-bottom:1px solid #00304912; }
.source-board-page .source-headline:last-child { border-bottom:0; }
.source-board-page .headline-number { padding-top:3px; font-size:10px; }
.source-board-page .headline-link { padding:0 0 3px; font-size:14px; line-height:1.55; }
.source-board-page .headline-link > span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.source-board-page .headline-kind,.source-board-page .headline-heat { font-size:9px; }
.source-board-page .headline-save { width:30px; min-height:30px; padding:4px; }
.source-board-page .headline-save svg { width:15px; height:15px; }
.source-board-page .headline-repo-name { margin:0; font-size:10px; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-board-page .headline-repository .headline-repo-name { max-width:calc(100% - 55px); }
.source-board-page .headline-explanation:not([open]) { position:absolute; right:35px; bottom:7px; margin:0; }
.source-board-page .headline-explanation > summary { min-height:16px; padding:0; font-size:10px; color:var(--accent); }
.source-board-page .headline-explanation > summary > span { display:none; }
.source-board-page .headline-explanation[open] { margin:4px 0 2px; font-size:11px; line-height:1.65; }
.source-board-page .headline-preview { margin:0; font-size:10px; }
.source-board-page .headline-preview > summary { min-height:16px; padding:0; }
.source-board-page .headline-preview > summary span { display:none; }
.source-board-page .headline-preview:not([open]) { position:absolute; right:1px; bottom:5px; }
.source-board-page .headline-preview:not([open]) > summary { list-style:none; font-size:9px; }
.source-board-page .headline-preview:not([open]) > summary::-webkit-details-marker { display:none; }
.source-board-page .source-panel-footer { min-height:46px; margin-top:auto; padding:7px 14px 8px; background:var(--bg-surface); border-top:1px solid #00304916; align-items:flex-start; gap:6px; font-size:10px; }
.source-panel-pagination { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.source-panel-pagination button { min-height:28px; padding:3px 0; font-size:11px; }
.source-reading-details { font-size:10px; line-height:1.6; }
.source-reading-details > summary { cursor:pointer; padding:3px 0; }
.source-reading-details .board-reading-note { margin:5px 0; }
.source-board-page .source-panel-error { margin:8px 14px; font-size:11px; }
.board-highlights { margin-top:20px; padding-top:12px; border-top:1px solid #00304926; }
.board-highlights > summary { cursor:pointer; min-height:36px; font-size:13px; font-weight:600; }
.board-highlights .daily-highlights { margin:10px 0; }
@media(max-width:1190px) { .source-board-page .source-board { grid-template-columns:repeat(3,minmax(0,1fr)); } .board-topbar { flex-wrap:wrap; } .board-topbar .feed-search-tools { flex-basis:65%; } }
@media(max-width:900px) { .source-board-page .source-board { grid-template-columns:repeat(2,minmax(0,1fr)); } .source-board-page,.board-site-header .site-header-inner { padding-left:20px; padding-right:20px; } .board-site-header .site-header-inner { flex-wrap:wrap; } .board-management-actions { margin-left:auto; } }
@media(max-width:600px) {
  .source-board-page { padding:12px 14px 36px; }
  .board-site-header .site-header-inner { padding:10px 14px; }
  .board-site-header .nav-tab { padding:8px 6px; font-size:12px; min-height:44px; }
  .source-board-page .public-preview-note { font-size:10px; gap:2px; }
  .board-topbar { gap:4px; }
  .board-topbar .feed-search-tools { flex-basis:100%; grid-template-columns:minmax(0,1fr); gap:0; }
  .board-intro-compact { width:100%; }
  .board-intro-compact .topic-actions { justify-content:flex-end; }
  .source-board-page .feed-search-input-row { gap:6px; flex-wrap:wrap; }
  .source-board-page .feed-search-input-row input { flex-basis:auto; font-size:16px; }
  .source-board-page #feed-search-submit { min-width:62px; padding:10px; }
  .source-board-page #feed-search-clear { order:3; min-height:44px; }
  .feed-purpose-options > summary { min-height:44px; padding-top:12px; }
  .source-board-page .board-groups { gap:5px; }
  .source-board-page .board-group,.source-board-page .board-management-actions button,.source-board-page .feed-search-purpose { min-height:44px; }
  .source-board-page .source-board { grid-template-columns:minmax(0,1fr); gap:12px; }
  .source-board-page .source-panel-header { padding:14px; }
  .source-board-page .source-headline { min-height:68px; grid-template-columns:20px minmax(0,1fr) 44px; }
  .source-board-page .headline-link { font-size:14px; }
  .source-board-page .headline-save { width:44px; min-height:44px; }
  .source-board-page .headline-explanation:not([open]) { position:static; margin:0; }
  .source-board-page .headline-preview:not([open]) { position:static; }
  .source-board-page .headline-preview:not([open]) > summary { font-size:11px; list-style:disclosure-closed; }
  .source-board-page .headline-repository .headline-repo-name { max-width:100%; }
  .source-board-page .headline-explanation > summary,.source-board-page .headline-preview > summary,.source-panel-pagination button,.source-reading-details > summary,.board-meta-controls .feed-new-filter { min-height:44px; padding-top:10px; }
}

/* Six destinations stay visible and tappable on narrow screens. */
@media (max-width: 600px) {
  .site-header .main-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:4px; }
  .site-header .nav-tab { min-width:0; justify-content:center; }
}
