/* 心知 AIHOT-Med · v11 「刊物」视觉：纸感底色、衬线标题、克制的单一强调色 */
:root {
  --bg-primary: #f5f2ea;
  --bg-secondary: #ece8dd;
  --bg-tertiary: #e4dfd1;
  --bg-card: #fffdf8;
  --bg-card-hover: #faf7ef;
  --border: #ddd6c6;
  --border-subtle: #c9c1ae;
  --text-primary: #1f1c17;
  --text-secondary: #4d483f;
  --text-muted: #6b6558;
  --accent: #9b2335;
  --on-accent: #ffffff;
  --accent-hover: #7e1a29;
  --accent-light: #f3e2df;
  --teal: #2f6b57;
  --emerald: #2f6b57;
  --emerald-light: #e3eee8;
  --rose: #9b2335;
  --rose-light: #f3e2df;
  --amber: #8a5a12;
  --amber-light: #f4ead2;
  --purple: #5b4b8a;
  --purple-light: #ebe7f3;
  --ink: #1f1c17;
  --on-ink: #fffdf8;
  --shadow-sm: 0 1px 0 rgba(31, 28, 23, 0.04);
  --shadow-md: 0 8px 24px -12px rgba(31, 28, 23, 0.25);
  --shadow-lg: 0 24px 60px -20px rgba(31, 28, 23, 0.38);
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg-primary: #14120f;
  --bg-secondary: #1c1a16;
  --bg-tertiary: #26231d;
  --bg-card: #1a1814;
  --bg-card-hover: #211f1a;
  --border: #2f2b24;
  --border-subtle: #443f34;
  --text-primary: #ece6d8;
  --text-secondary: #c2bba9;
  --text-muted: #908977;
  --accent: #e0707a;
  --on-accent: #14120f;
  --accent-hover: #f08c94;
  --accent-light: rgba(224, 112, 122, 0.14);
  --teal: #6fb59a;
  --emerald: #6fb59a;
  --emerald-light: rgba(111, 181, 154, 0.14);
  --rose: #e0707a;
  --rose-light: rgba(224, 112, 122, 0.14);
  --amber: #d9a84c;
  --amber-light: rgba(217, 168, 76, 0.12);
  --purple: #a99bd6;
  --purple-light: rgba(169, 155, 214, 0.14);
  --ink: #ece6d8;
  --on-ink: #14120f;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; color: inherit; }
::selection { background: var(--accent-light); color: var(--text-primary); }
.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; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.dialog-open { overflow: hidden; }

/* ============ Header ============ */
header.app-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-container {
  max-width: 1280px; margin: 0 auto; padding: 0 24px; height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}
.brand-section { flex: 0 0 auto; }
.brand-logo { display: flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none !important; }
.brand-mark {
  font-family: var(--font-serif); font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1;
  color: var(--accent);
}
.brand-image { display: block; width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; padding-left: 10px; border-left: 1px solid var(--border-subtle); }
.logo-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.brand-text small { font-size: 11px; color: var(--text-muted); letter-spacing: .02em; margin-top: 2px; }
.brand-tag, .logo-accent { display: none; }

.header-nav { display: flex; align-items: stretch; gap: 4px; height: 100%; flex: 1 1 auto; }
.nav-tab-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; border: 0; background: none; cursor: pointer;
  font-size: 14.5px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; flex: 0 0 auto;
  transition: color .15s;
}
.nav-tab-btn::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav-tab-btn:hover { color: var(--text-primary); }
.nav-tab-btn.active { color: var(--text-primary); font-weight: 700; }
.nav-tab-btn.active::after { transform: scaleX(1); }
.nav-tab-btn .badge { display: none; font-size: 11.5px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; max-width: 100%; }
.nav-tab-btn .badge[title="加载中"], .nav-tab-btn .badge[aria-label="加载中"] { display: inline-block; line-height: 1.2; }
.nav-tab-btn.active .badge { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.search-wrapper { position: relative; width: 250px; }
.search-input {
  width: 100%; height: 38px; padding: 0 48px 0 14px; font: inherit; font-size: 14px;
  color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-full);
  transition: border-color .15s, box-shadow .15s, width .2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.search-shortcut {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 500 11px var(--font-mono); color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; line-height: 17px; pointer-events: none;
}
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--radius-full); color: var(--text-secondary);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.huddle-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; cursor: pointer; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--on-ink); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius-full);
  transition: background .15s, transform .15s;
}
.huddle-btn:hover { background: var(--accent); border-color: var(--accent); }
.huddle-btn:active { transform: scale(.97); }
.huddle-counter {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 700; border-radius: var(--radius-full); background: var(--on-ink); color: var(--ink); font-variant-numeric: tabular-nums;
}
.huddle-btn:hover .huddle-counter { color: var(--accent); }

/* ============ Layout ============ */
.app-container {
  max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px;
  display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 44px; align-items: start;
}
.app-container.full-width-layout { grid-template-columns: minmax(0, 1fr); }
.app-container.full-width-layout .main-content { max-width: 840px; margin: 0 auto; width: 100%; }
main.main-content { min-width: 0; }
.content-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.source-status-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--radius-md); background: none;
  font: inherit; font-size: 12.5px; color: var(--text-muted); cursor: pointer; white-space: nowrap;
}
.source-status-btn:hover, .source-status-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-light); }

/* ============ Sidebar ============ */
.sidebar-filter-help { margin: 0 0 16px; font-size: 12px; line-height: 1.7; color: var(--text-secondary); }
.sidebar-filter-help span { color: var(--text-muted); }
.facet-option-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.facet-option-row > .filter-item-btn, .facet-option-row > .accordion-journal-btn { flex: 1; min-width: 0; width: auto; }
.facet-option-row .filter-item-btn > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.browse-only-btn, .sidebar-clear-btn { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 12px; }
.browse-only-btn { flex: 0 0 auto; padding: 6px 4px; border-radius: var(--radius-sm); white-space: nowrap; }
.browse-only-btn:hover, .sidebar-clear-btn:hover { background: var(--accent-light); }
.sidebar-card { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.sidebar-card:last-child { border-bottom: 0; }
.sidebar-title {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--text-muted);
}
.sidebar-reset-btn { border: 0; background: none; font-size: 12px; color: var(--text-muted); cursor: pointer; letter-spacing: 0; font-weight: 500; }
.sidebar-reset-btn:hover { color: var(--accent); }
.filter-list { list-style: none; }
.filter-item-btn {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left; font-size: 14px; color: var(--text-secondary); border-radius: var(--radius-md);
  transition: background .12s, color .12s;
}
.filter-item-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.filter-item-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.filter-item-btn.active .filter-count { color: var(--accent); }
.tier-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-subtle); flex: 0 0 auto; }
.dot-all { background: var(--text-muted); }
.filter-item-btn.active .tier-dot { background: var(--accent); }
.dot-general,.dot-flagship,.dot-ep,.dot-hf,.dot-cad,.dot-imaging,.dot-neuro,.dot-aimed,.dot-tech,.dot-team { background: var(--border-subtle); }

.accordion-group { border-bottom: 1px solid var(--border); }
.accordion-group:last-child { border-bottom: 0; }
.accordion-heading { display: flex; align-items: center; gap: 4px; }
.accordion-heading .accordion-header { flex: 1; min-width: 0; width: auto; overflow-wrap: anywhere; }
.accordion-header.active { color: var(--accent); font-weight: 600; }
.accordion-expand-btn { flex: 0 0 auto; display: grid; place-items: center; width: 28px; min-height: 32px; border: 0; border-radius: var(--radius-sm); background: none; cursor: pointer; }
.accordion-expand-btn:hover { background: var(--bg-secondary); }
.accordion-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0;
  border: 0; background: none; cursor: pointer; text-align: left; font-size: 14px; font-weight: 500; color: var(--text-primary);
}
.accordion-header:hover { color: var(--accent); }
.accordion-arrow { font-size: 9px; color: var(--text-muted); transition: transform .2s; }
.accordion-group.open .accordion-arrow { transform: rotate(90deg); }
.accordion-content { display: none; padding: 0 0 10px; }
.accordion-group.open .accordion-content { display: block; }
.accordion-journal-btn {
  display: block; width: 100%; padding: 6px 10px; border: 0; background: none; text-align: left; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); border-radius: var(--radius-sm);
}
.accordion-journal-btn:hover { background: var(--bg-secondary); }
.accordion-journal-btn.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.journal-filter-label { min-width: 0; overflow-wrap: anywhere; }
.facet-option-row > .accordion-journal-btn { display: flex; align-items: center; gap: 8px; }
.filter-count { flex-shrink: 0; }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: var(--text-secondary);
  background: none; border: 1px solid var(--border); border-radius: var(--radius-full); transition: all .12s;
}
.tag-chip:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.tag-chip.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.tag-option { max-width: 100%; }
.tag-option .tag-chip { min-width: 0; overflow-wrap: anywhere; }
.heuristic-note { font-size: 10.5px; font-weight: 500; color: var(--text-muted); margin-left: 4px; letter-spacing: 0; }

/* ============ Intro / notes / lanes ============ */
.home-intro { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 20px; counter-reset: step; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--border); }
.home-intro li { counter-increment: step; padding: 12px 18px 12px 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.home-intro li + li { padding-left: 18px; border-left: 1px solid var(--border); }
.home-intro b { display: block; font-family: var(--font-serif); font-size: 15px; color: var(--text-primary); }
.home-intro b::before { content: counter(step, cjk-decimal) "　"; color: var(--accent); }
.home-step { display: none; }

.mode-note {
  margin: 0 0 18px; padding: 2px 0 2px 14px; font-size: 13px; line-height: 1.7; color: var(--text-secondary);
  background: none; border: 0; border-left: 2px solid var(--amber);
}
.weekly-status { margin-bottom: 20px; padding: 2px 0 2px 14px; font-size: 13.5px; line-height: 1.75; color: var(--text-secondary); border-left: 2px solid var(--amber); }

.lane-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 12px; scrollbar-width: none; }
.lane-bar::-webkit-scrollbar { display: none; }
.lane-label, .range-label { font-size: 12px; color: var(--text-muted); margin-right: 6px; letter-spacing: .04em; }
.lane-chip {
  padding: 5px 13px; font-size: 13.5px; cursor: pointer; color: var(--text-secondary);
  background: none; border: 1px solid transparent; border-radius: var(--radius-full); transition: all .12s; white-space: nowrap;
}
.lane-chip small { margin-left: 4px; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lane-chip:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lane-chip.active { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.lane-chip.active small { color: inherit; opacity: .7; }
.range-sep { display: inline-block; width: 1px; height: 16px; background: var(--border-subtle); margin: 0 6px; }
.range-bar { margin-top: -4px; }

.more-filters-basic label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--text-muted); letter-spacing: .04em; }
.more-filters-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.more-filters-row .active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.journal-followed { color: var(--accent); }
.more-filters-basic select, .sort-select {
  min-height: 36px; max-width: 100%; padding: 6px 30px 6px 10px; font: inherit; font-size: 13.5px; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer;
}
.more-filters-basic select:hover, .sort-select:hover { border-color: var(--border-subtle); }
.browse-help { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--text-muted); }

.ai-digest { margin: 0 0 10px; }
.ai-digest .brief-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 0; margin: 0; background: none; font-size: 13px; color: var(--text-muted); }
.ai-digest .brief-box .btn-sm { min-height: 32px; }
.ai-digest[hidden] { display: none !important; }

/* ============ Stream toolbar ============ */
.stream-toolbar {
  position: sticky; top: var(--sticky-header-h, var(--header-h)); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; margin: 0 0 4px; background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.active-filters-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.sidebar-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.active-filters-label { font-size: 12px; color: var(--text-muted); }
.sidebar-clear-btn { padding: 4px 6px; border-radius: var(--radius-sm); }
.filter-badge-active { max-width: 100%; }
.filter-badge-label { min-width: 0; overflow-wrap: anywhere; }
.filter-badge-remove { flex-shrink: 0; }
.empty-filter-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.results-meta { font-size: 13px; color: var(--text-muted); }
.results-meta b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.filter-badge-active { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; font-size: 12.5px; color: var(--accent); background: var(--accent-light); border-radius: var(--radius-full); }
.filter-badge-remove { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.stream-controls { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.view-toggle { display: inline-flex; padding: 2px; background: var(--bg-secondary); border-radius: var(--radius-full); }
.view-toggle-btn { padding: 4px 13px; font-size: 13px; border: 0; background: none; cursor: pointer; color: var(--text-muted); border-radius: var(--radius-full); }
.view-toggle-btn.active { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.btn-sm.filter-toggle-btn { display: inline-flex; flex: 0 0 auto; }
.btn-sm.filter-toggle-btn[hidden] { display: none; }
.btn-sm.filter-toggle-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }
/* 更多筛选 folded away on wide screens: the list takes the full column. */
@media (min-width: 1025px) {
  .app-container.filters-collapsed:not(.full-width-layout) { grid-template-columns: minmax(0, 1fr); }
  .app-container.filters-collapsed:not(.full-width-layout) aside.sidebar { display: none; }
  .app-container.filters-collapsed:not(.full-width-layout) .main-content { max-width: 980px; margin: 0 auto; width: 100%; }
}

/* ============ Day heading ============ */
.day-heading {
  display: flex; align-items: baseline; gap: 12px; margin: 34px 0 0; padding-bottom: 8px;
  font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--text-primary); border-bottom: 2px solid var(--ink);
}
.day-heading:first-child { margin-top: 20px; }
.day-heading small { font-family: var(--font-sans); font-weight: 400; font-size: 12.5px; color: var(--text-muted); }

/* ============ Article entry ============ */
.articles-stream { display: block; }
.article-card {
  position: relative; isolation: isolate; padding: 24px 0 22px; background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none;
}
.article-card::before { content: ""; position: absolute; inset: 0 -16px; background: var(--bg-card); border-radius: var(--radius-lg); opacity: 0; transition: opacity .18s; z-index: -1; }
.article-card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.meta-badges { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; min-width: 0; font-size: 13px; color: var(--text-muted); }
.meta-badges > *:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--border-subtle); font-weight: 400; }
.journal-badge, .journal-nature, .journal-elsevier, .journal-aha, .journal-lancet, .journal-oxford, .journal-jama, .journal-bmj, .journal-nejm, .journal-wiley, .journal-pubmed, .journal-tech,
[data-theme="dark"] .journal-nature, [data-theme="dark"] .journal-elsevier, [data-theme="dark"] .journal-aha, [data-theme="dark"] .journal-lancet, [data-theme="dark"] .journal-oxford,
[data-theme="dark"] .journal-jama, [data-theme="dark"] .journal-bmj, [data-theme="dark"] .journal-nejm, [data-theme="dark"] .journal-wiley, [data-theme="dark"] .journal-pubmed, [data-theme="dark"] .journal-tech {
  background: none; border: 0; padding: 0; color: var(--text-primary); font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
}
.design-pill { background: none; border: 0; padding: 0; font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.design-rct { color: var(--accent); font-weight: 700; }
.design-validation, .design-meta, .design-cohort, .design-guideline { color: var(--text-secondary); }
.tag-pill { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--text-muted); }
.kind-pill { border: 0; font-weight: 500; }
.date-badge { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.article-title-zh {
  font-family: var(--font-serif); font-size: 20px; line-height: 1.5; font-weight: 600; color: var(--text-primary); margin: 0 0 6px; 
}
.article-title-zh.ql-title { font-size: 19px; font-weight: 600; color: var(--text-primary); }
.verified-badge {
  display: inline-block; margin-right: 8px; padding: 0 6px; font: 600 11px/18px var(--font-sans); letter-spacing: .04em; vertical-align: 3px;
  color: var(--teal); border: 1px solid currentColor; border-radius: 3px;
}
.content-label { display: inline-block; margin-right: 8px; padding: 0 5px; font: 500 11px/17px var(--font-sans); color: var(--text-muted); border: 1px solid var(--border-subtle); border-radius: 3px; vertical-align: 3px; }
.article-title { font-family: var(--font-serif); font-size: 18px; line-height: 1.5; font-weight: 600; margin: 0 0 8px; color: var(--text-primary); }
.article-title-zh ~ .article-title { font-size: 14.5px; font-weight: 400; color: var(--text-secondary); line-height: 1.6; }
.title-open { border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; text-align: left; cursor: pointer; width: 100%; letter-spacing: inherit; }
.title-open:hover { color: var(--accent); }
.article-abstract { font-size: 15.5px; line-height: 1.85; color: var(--text-secondary); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.article-card:has(.card-limit) .article-abstract { -webkit-line-clamp: unset; display: block; }

.card-limit, .card-question { font-size: 14.5px; line-height: 1.8; margin: 12px 0 0; padding: 0 0 0 14px; color: var(--text-secondary); background: none; border-radius: 0; }
.card-limit { border-left: 2px solid var(--accent); }
.card-question { border-left: 2px solid var(--border-subtle); }
.card-limit b, .card-question b { color: var(--text-primary); font-weight: 700; margin-right: 4px; }
.article-card-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }

.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.action-buttons-group { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text-primary); text-decoration: none !important;
  background: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.btn-sm:hover { border-color: var(--text-primary); background: var(--bg-card); }
.btn-sm:active { transform: scale(.97); }
.btn-sm.btn-primary { color: var(--on-ink); background: var(--ink); border-color: var(--ink); font-weight: 600; }
.btn-sm.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-sm.active { color: var(--accent); border-color: var(--accent); background: var(--accent-light); font-weight: 600; }
.btn-sm.btn-share { border-color: transparent; color: var(--text-secondary); padding: 0 10px; }
.btn-sm.btn-share:hover { color: var(--text-primary); background: var(--bg-secondary); border-color: transparent; }
.btn-sm:disabled { opacity: .45; cursor: not-allowed; }
.card-actions > div:last-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.doi-link { font: 11.5px var(--font-mono); color: var(--text-muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-muted { color: var(--text-muted); font-size: 12.5px; }

/* ============ Compact list ============ */
.articles-compact-list { display: block; }
.compact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); transition: background .12s; }
.compact-row:hover { background: linear-gradient(90deg, transparent, var(--bg-card-hover) 8px, var(--bg-card-hover) calc(100% - 8px), transparent); }
.compact-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.compact-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left;
  font-family: var(--font-serif); font-size: 16.5px; font-weight: 600; line-height: 1.5; color: var(--text-primary); background: none; border: 0; padding: 0; cursor: pointer; width: auto;
}
/* long-title: keep keyboard focus inside the title's row. */
.compact-title:focus-visible { outline-offset: -2px; }
.compact-title:hover { color: var(--accent); }
.compact-zh { font-family: var(--font-serif); font-size: 14px; line-height: 1.5; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.compact-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
.compact-meta > *:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--border-subtle); }
.compact-meta .journal-badge { white-space: normal; }
.compact-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.compact-actions .btn-sm { min-height: 30px; padding: 0 11px; font-size: 13px; }
.articles-compact-list .day-heading { margin: 26px 0 0; padding: 0 0 8px; background: none; font-size: 16px; }

.load-more-btn { display: block; margin: 28px auto 0; padding: 10px 34px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text-primary); background: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); transition: all .15s; }
.load-more-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.empty-state { padding: 72px 20px; text-align: center; color: var(--text-muted); }
.empty-state h3 { font-family: var(--font-serif); font-size: 18px; color: var(--text-primary); margin-bottom: 8px; }
.doi-search-notice, .doi-identity-notice, .doi-library-notice { padding: 18px 20px; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.doi-search-notice h3 { margin: 0 0 6px; font-size: 18px; color: var(--text-primary); }
.doi-search-notice p, .doi-identity-notice p { margin: 6px 0 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.doi-identity-notice { border-left: 3px solid var(--accent); }
.doi-library-notice { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--text-muted); }
.doi-empty { padding: 38px 20px; }
.doi-empty .btn-sm { margin-top: 16px; }
.doi-filter-badge { max-width: 100%; min-width: 0; }
.doi-filter-value { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.doi-filter-badge .filter-badge-remove { flex-shrink: 0; }
.fulltext-state { font-size: 12px; color: var(--text-muted); }
.ft-status.ft-compact { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-basis: 100%; margin-top: 8px; }
.ft-form[hidden] { display: none; }
.ft-form label { font-size: 13px; color: var(--text-secondary); }
.ft-form input { min-height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text-primary); }
.ft-error { color: var(--accent); font-size: 13px; }
/* 卡片 / 阅读台内口令下载：复用 .ft-form，另补提交中状态与换行 */
.ft-dl-form { box-sizing: border-box; max-width: 100%; min-width: 0; }
.ft-dl-form label { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; }
.ft-dl-form input { box-sizing: border-box; flex: 1 1 120px; min-width: 0; max-width: 100%; }
.ft-dl-form .ft-error { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.ft-dl-form .ft-error:empty { display: none; }
.ft-dl-form.is-busy { cursor: progress; }
.ft-dl-form.is-busy label { opacity: .6; }
.ft-dl-form button[type="submit"]:disabled { opacity: .55; cursor: progress; }
.ft-dl-form.is-busy button[type="submit"]::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ft-dl-spin .8s linear infinite; }
@keyframes ft-dl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ft-dl-form.is-busy button[type="submit"]::before { animation: none; } }
.drawer-footer .ft-dl-form { order: 10; margin-top: 0; }
/* 口令框展开时，所在的按钮行换行，表单独占下一行；未展开时不改变原有布局 */
.card-source-actions:has(> .ft-dl-form:not([hidden])), .compact-actions:has(> .ft-dl-form:not([hidden])), .compact-actions:has(> .ft-form:not([hidden])) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-source-actions > .ft-dl-form, .compact-actions > .ft-dl-form, .compact-actions > .ft-form { flex: 1 1 100%; width: 100%; }
@media (max-width: 640px) {
  .ft-dl-form { gap: 6px; }
  .ft-dl-form label { flex: 1 1 100%; }
  .ft-dl-form input { min-height: 44px; font-size: 16px; }
  .ft-dl-form button[type="submit"] { min-height: 44px; flex: 1 1 100%; }
  a[data-ft-download]:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
}
.ft-status.ft-full { margin: 8px 0 10px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.ft-steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0 0 6px; padding: 0; font-size: 12px; }
.ft-steps li { padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); }
.ft-steps li.done { color: var(--text-secondary); border-color: var(--text-muted); }
.ft-steps li.current { color: var(--on-ink); background: var(--ink); border-color: var(--ink); font-weight: 600; }
.ft-steps li.stop { color: var(--accent); border-color: var(--accent); background: var(--accent-light); font-weight: 600; }
.ft-line { margin: 0 0 6px; color: var(--text-primary); overflow-wrap: anywhere; }
.ft-eta { display: block; margin-top: 2px; font-size: 13px; color: var(--text-secondary); }
.ft-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ft-link { font-size: 13px; color: var(--text-secondary); }
.ft-maint { display: block; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.fulltext-review { color: var(--accent); }
.card-actions > div:last-child { flex-wrap: wrap; }

/* ============ Reader drawer ============ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20, 18, 15, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.reader-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(700px, 100vw); display: flex; flex-direction: column;
  background: var(--bg-card); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform .3s var(--ease); visibility: hidden;
}
.reader-drawer.open { transform: none; visibility: visible; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 22px 10px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
#drawerJournalBadges { display: flex; flex-wrap: wrap; align-items: baseline; }
#drawerJournalBadges > *:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--border-subtle); font-weight: 400; }
.drawer-close-btn { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; margin: -6px -8px 0 0; border: 0; border-radius: var(--radius-full); background: none; cursor: pointer; font-size: 24px; line-height: 1; color: var(--text-muted); }
.drawer-close-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 22px 28px; overscroll-behavior: contain; }
.drawer-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 22px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg-card); }
.drawer-footer #drawerExternalLink { margin-left: auto; }
.drawer-meta-line { font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.drawer-title-zh { font-family: var(--font-serif); font-size: 24px; line-height: 1.4; font-weight: 600; margin: 0 0 6px;  }
.drawer-title-en { font-size: 16px; line-height: 1.45; font-weight: 400; color: var(--text-secondary); margin: 0 0 10px; }
.drawer-title-zh:only-of-type, h2.drawer-title-en:first-child { color: var(--text-primary); }
.drawer-section { margin: 0 0 14px; }
.drawer-section-title { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.drawer-section-title small { font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: var(--text-muted); }
.drawer-section p { line-height: 1.85; color: var(--text-secondary); }
.editorial-box { padding: 0 0 0 16px; border-left: 2px solid var(--teal); font-size: 16px; line-height: 1.9; color: var(--text-primary); background: none; }
.editorial-box p { margin: 0 0 8px; }
.editorial-box p:last-child { margin-bottom: 0; }
.clinical-question-box { margin-top: 14px; padding: 12px 16px; background: var(--bg-secondary); border-radius: var(--radius-md); font-size: 14px; }
.clinical-question-box b { display: block; font-size: 12px; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.clinical-question-box p { margin: 0 0 4px; line-height: 1.75; color: var(--text-primary); }
.structured-abstract { display: flex; flex-direction: column; gap: 14px; }
.abstract-section-block { padding: 0; border: 0; }
.abstract-section-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.abstract-section-block p { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text-primary); }
.quant-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 0 0 12px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--border); }
.quant-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 0; }
.quant-card + .quant-card { padding-left: 14px; border-left: 1px solid var(--border); }
.quant-label { font-size: 11.5px; letter-spacing: .06em; color: var(--text-muted); }
.quant-value { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text-primary) !important; word-break: break-word; }
.quant-value a { color: var(--accent); }
.metric-details { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.metric-details summary, .reading-tips summary { cursor: pointer; font-weight: 600; color: var(--text-secondary); }
.reading-tips summary small { font-weight: 400; color: var(--text-muted); }
.reading-tips ul { margin: 10px 0 0 18px; font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); }
.drawer-authors-box { margin: 0 0 10px; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.drawer-authors-line { line-height: 1.7; }
.drawer-affiliations-line { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.appraisal-container { display: flex; flex-direction: column; gap: 12px; }
.pillar-card { padding: 0 0 0 14px; border-left: 2px solid var(--border-subtle); background: none; border-radius: 0; }
.pillar-methodology { border-left-color: var(--teal); } .pillar-tradeoffs { border-left-color: var(--amber); } .pillar-barriers { border-left-color: var(--accent); } .pillar-questions { border-left-color: var(--purple); }
.pillar-header { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--text-primary); margin-bottom: 4px; }
.pillar-content { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.pillar-question-item { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.pillar-question-item:last-child { border-bottom: 0; }
.citation-actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn-cite { padding: 4px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text-secondary); background: none; border: 1px solid var(--border); border-radius: var(--radius-full); }
.btn-cite:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* AI blocks */
.quicklook, .brief-box { padding: 12px 14px; margin: 0 0 12px; background: var(--bg-secondary); border: 0; border-radius: var(--radius-md); }
.brief-box { margin: 8px 0 14px; }
.quicklook .drawer-section-title { border-bottom: 0; padding-bottom: 0; margin-bottom: 6px; }
.ql-flag { font-weight: 400; color: var(--amber); margin-left: 4px; }
.ql-line { margin: 6px 0; line-height: 1.8; }
.ql-meta { margin: 4px 0; font-size: 13px; color: var(--text-muted); }
.ql-findings { margin: 8px 0; padding-left: 18px; }
.ql-findings li { margin-bottom: 8px; line-height: 1.75; }
.ql-findings blockquote { margin: 3px 0 0; padding-left: 10px; border-left: 2px solid var(--border-subtle); font-size: 12.5px; color: var(--text-muted); font-style: italic; }
.brief-box p { margin: 4px 0; line-height: 1.8; }
.brief-done ul, .brief-done ol { margin: 6px 0; padding-left: 20px; }
.brief-papers small { color: var(--text-muted); }
.ql-title { color: var(--text-primary); }

/* Public-abstract study structure and explicit morning-huddle comparison */
.study-box { margin: 10px 0 14px; padding: 12px 14px; background: var(--bg-secondary); border-radius: var(--radius-md); }
.study-box .drawer-section-title { margin-bottom: 8px; }
.study-boundary, .study-meta, .study-selection-help { margin: 6px 0 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }
.study-box .study-boundary { color: var(--text-secondary); }
.study-error { margin: 8px 0; font-size: 13px; line-height: 1.7; color: var(--amber); }
.study-fields { margin: 12px 0; }
.study-fields > div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.study-fields dt { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.study-fields dd { margin: 0; min-width: 0; }
.study-field-text { margin: 0 !important; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-quote { margin-top: 6px; font-size: 12px; line-height: 1.7; }
.study-quote summary, .study-checklist summary { cursor: pointer; color: var(--accent); }
.study-quote blockquote { margin: 6px 0 2px; padding: 4px 0 4px 10px; border-left: 2px solid var(--border-subtle); color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.study-checklist { margin: 14px 0; font-size: 13px; line-height: 1.8; }
.study-checklist p { font-size: 12.5px; color: var(--text-muted); margin: 8px 0; }
.study-checklist ul { padding-left: 20px; margin: 8px 0; }
.study-checklist li { margin: 4px 0; overflow-wrap: anywhere; }
.study-select { display: flex; align-items: center; gap: 7px; width: fit-content; margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); cursor: pointer; }
.study-select input { margin: 0; accent-color: var(--accent); min-width: 18px; height: 18px; }
.study-select:has(input:disabled) { color: var(--text-muted); cursor: default; }
.study-table-scroll { max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 6px; overscroll-behavior-x: contain; }
.study-table-scroll:focus-visible, .study-select input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.study-table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.7; }
.study-table caption { padding: 8px 12px; text-align: left; font-size: 12px; color: var(--text-muted); }
.study-table th, .study-table td { padding: 10px; border-top: 1px solid var(--border); border-right: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.study-table th:last-child, .study-table td:last-child { border-right: 0; }
.study-table thead th { min-width: 180px; max-width: 260px; font-size: 12.5px; text-align: left; font-weight: 600; }
.study-table th:first-child { min-width: 5.5em; width: 5.5em; text-align: left; }
.study-table thead small { display: block; margin-top: 5px; font-weight: 400; color: var(--text-muted); }
.study-paper-number { color: var(--accent); }
.study-missing { color: var(--text-muted); font-size: 12.5px; line-height: 1.7; }
.study-table a { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .study-box { padding: 12px; }
  .study-fields > div { grid-template-columns: 1fr; gap: 4px; }
  .study-table thead th { min-width: 170px; }
  .study-table th:first-child { min-width: 5em; }
}

/* ============ Modal (huddle) ============ */
.modal-backdrop { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 18, 15, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-backdrop.open { display: flex; }
.modal-dialog { width: min(640px, 100%); max-height: min(720px, 90vh); display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: var(--font-serif); font-size: 18px !important; font-weight: 700 !important; }
.modal-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 24px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); }
.huddle-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.huddle-item:last-child { border-bottom: 0; }
.huddle-item-content h4 { font-family: var(--font-serif); font-size: 15px; line-height: 1.5; font-weight: 700; margin-bottom: 3px; overflow-wrap: anywhere; }
.huddle-item-meta { font-size: 12.5px; color: var(--text-muted); }
/* long-title: both checkbox labels and export notices repeat the original title. */
[data-citation-export] { overflow-wrap: anywhere; }

/* ==== shortlist share ==== */
.shortlist-share-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
#copyShortlistShareBtn, #sharedShortlistBanner button { min-width: 44px; min-height: 44px; }
#shortlistShareCopyNotice, #shortlistShareCopyField { width: 100%; color: var(--text-secondary); font-size: 13px; }
#shortlistShareCopyNotice:empty, #sharedShortlistNotice:empty { display: none; }
#shortlistShareCopyField input {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); background: var(--bg-secondary);
}
#sharedShortlist { width: 100%; max-width: 840px; margin: 0 auto; }
#sharedShortlist:not([hidden]) ~ section,
body:has(#sharedShortlist:not([hidden])) :is(#appSidebar, #toolRow, #quickBar, #qfSummary) { display: none !important; }
#sharedShortlistBanner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-bottom: 16px; padding: 12px 16px; color: var(--text-primary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
}
#sharedShortlistTitle { font-size: 18px; }
#sharedShortlistNotice { width: 100%; margin: 0; color: var(--text-secondary); font-size: 13px; }
#sharedShortlistRows .topic-badge { cursor: default; }
#sharedShortlistMissing {
  padding: 8px 12px; color: var(--text-primary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
}
#sharedShortlistMissing summary { padding: 10px 0; cursor: pointer; }
#sharedShortlistMissingIds { white-space: pre-line; overflow-wrap: anywhere; }

/* ============ Weekly ============ */
.weekly-container { max-width: 760px; margin: 0 auto; }
.weekly-hero { padding: 8px 0 22px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.weekly-hero h2 { font-family: var(--font-serif); font-size: 28px; line-height: 1.45; font-weight: 700; margin: 12px 0 8px; }
.weekly-hero .text-secondary { color: var(--text-secondary); margin-bottom: 8px; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 20px 0; border-bottom: 1px solid var(--border); }
.evidence-stat { padding: 8px 16px 16px 0; display: flex; flex-direction: column; gap: 2px; }
.evidence-stat + .evidence-stat { padding-left: 16px; border-left: 1px solid var(--border); }
.evidence-stat strong { font-family: var(--font-serif); font-size: 24px; line-height: 1.25; color: var(--accent); }
.evidence-stat span { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.weekly-toc { position: sticky; top: var(--sticky-header-h, var(--header-h)); z-index: 10; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 20px; padding: 10px 0; background: color-mix(in srgb, var(--bg-primary) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.weekly-toc a { font-size: 13.5px; padding: 0; color: var(--text-secondary); border: 0; background: none; border-radius: 0; }
.weekly-toc a:hover { color: var(--accent); background: none; text-decoration: none; }
.weekly-full-report { max-width: 720px; }
.weekly-full-report h3[id] { scroll-margin-top: 120px; }
.weekly-full-report h3 { font-family: var(--font-serif); font-size: 20px; margin: 0 0 12px; }
.weekly-full-report h4 { font-family: var(--font-serif); font-size: 16px; }
.weekly-full-report p, .weekly-full-report li { font-size: 15.5px; line-height: 1.95; color: var(--text-primary); }
.weekly-table { min-width: 520px; }
.weekly-table th { font-size: 12px; letter-spacing: .06em; color: var(--text-muted); background: none !important; }
/* Example full-text reading (demo-reading.html, loaded on demand into the reading panel) */
.demo-report { margin-top: 24px; line-height: 1.75; }
.demo-report .demo-first-section { margin-top: 20px; }
.demo-list { padding-left: 20px; margin: 10px 0; }
.demo-subhead { margin-top: 16px; }
.demo-table-scroll { overflow-x: auto; margin-top: 10px; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.demo-table th, .demo-table td { padding: 8px 12px; text-align: left; }
.demo-table thead tr { background: var(--bg-secondary); border-bottom: 2px solid var(--border); }
.demo-table tbody tr { border-bottom: 1px solid var(--border); }
.demo-questions { margin-top: 24px; }
.next-candidates { margin-bottom: 24px; }
.next-title { font-family: var(--font-serif); font-size: 17px; margin: 0 0 10px; }
.next-title small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.7; }
.next-item { padding: 14px 0; border-bottom: 1px solid var(--border); background: none; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.next-item-title { margin: 6px 0; font-family: var(--font-serif); font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.next-item-actions { display: flex; gap: 8px; }

/* ============ Sources ============ */
.sources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; }
.source-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.source-item-name { font-weight: 500; }
.source-status-badge { font-size: 12px; font-weight: 600; }
.source-status-ok { color: var(--teal); }
.source-status-err { color: var(--accent); }

/* ============ Toast / footer ============ */
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 16px); padding: 10px 20px; font-size: 14px; color: var(--on-ink); background: var(--ink); border-radius: var(--radius-full); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Tablet / mobile ============ */
@media (max-width: 1100px) {
  .header-container { gap: 16px; padding: 0 16px; }
  .brand-text small { display: none; }
  .search-wrapper { width: 190px; }
  .search-shortcut { display: none; }
  .nav-tab-btn { padding: 0 10px; }
  .nav-tab-btn::after { left: 10px; right: 10px; }
}
@media (max-width: 1024px) {
  .app-container { grid-template-columns: 1fr; gap: 0; padding: 20px 18px 48px; }
  .stream-toolbar { flex-wrap: wrap; }
  .active-filters-bar { flex: 1 1 100%; }
  .browse-only-btn, .accordion-expand-btn { min-height: 40px; min-width: 40px; }
  .home-intro li { padding: 10px 12px 10px 0; }
  .home-intro li + li { padding-left: 12px; }
}
@media (max-width: 720px) {
  :root { --header-h: 52px; }
  body { font-size: 15px; }
  header.app-header { position: static; }
  .header-container { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "brand theme huddle" "nav nav nav" "search search search"; height: auto; padding: 10px 16px 0; gap: 8px 8px; }
  .brand-section { grid-area: brand; }
  .header-actions { display: contents; }
  #themeToggle { grid-area: theme; }
  .huddle-btn { grid-area: huddle; height: 36px; padding: 0 13px; }
  .search-wrapper { grid-area: search; width: 100%; order: 0; margin-bottom: 10px; }
  .search-input { height: 42px; font-size: 15px; }
  .header-nav { grid-area: nav; height: auto; overflow-x: auto; margin: 0 -16px; padding: 0 10px; scrollbar-width: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .header-nav::-webkit-scrollbar { display: none; }
  .nav-tab-btn { height: 46px; padding: 0 13px; font-size: 15px; }
  .nav-tab-btn::after { left: 13px; right: 13px; }
  .nav-tab-btn .badge { display: none; font-size: 11px; }
  .nav-tab-btn .badge[title="加载中"], .nav-tab-btn .badge[aria-label="加载中"] { display: inline-block; font-size: 10px; line-height: 1.1; }
  .brand-mark { font-size: 24px; }
  .stream-toolbar { top: 0; padding: 8px 0; }
  .stream-controls { width: 100%; justify-content: space-between; }
  .sort-select { flex: 1; min-width: 0; }
  .app-container { padding: 14px 16px 40px; }
  .article-card { padding: 20px 0 18px; }
  .article-card::before { display: none; }
  .article-title-zh { font-size: 19px; }
  .article-title { font-size: 17px; }
  .drawer-title-zh { font-size: 23px; }
  .card-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .card-actions > div:last-child { justify-content: space-between; }
  .action-buttons-group .btn-sm { flex: 1 1 auto; min-height: 40px; }
  .btn-sm { min-height: 40px; }
  .compact-actions .btn-sm { min-height: 36px; }
  .compact-row { grid-template-columns: 1fr; }
  .compact-actions { justify-content: flex-start; }
  .lane-bar { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; }
  .lane-bar > * { flex: 0 0 auto; }
  .lane-chip { padding: 7px 13px; }
  .reader-drawer { width: 100vw; border-left: 0; }
  .drawer-header { padding: 10px 16px; }
  .drawer-body { padding: 12px 16px 24px; }
  .drawer-footer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .drawer-footer .btn-sm { flex: 1 1 auto; min-height: 42px; }
  .drawer-footer #drawerExternalLink { margin-left: 0; flex-basis: 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-dialog { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
  .weekly-hero h2 { font-size: 24px; }
  .home-intro { margin-bottom: 12px; }
  .home-intro li span { display: none; }
  .home-intro b { font-size: 14px; }
  .home-intro b::before { content: counter(step, cjk-decimal) " "; }
  .mode-note { font-size: 12.5px; line-height: 1.65; margin-bottom: 12px; }
  .browse-help { display: none; }
  .ai-digest .brief-box { flex-direction: column; align-items: flex-start; }
  .source-status-btn { min-height: 40px; }
  #toast { bottom: 20px; max-width: 90vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  header.app-header, aside.sidebar, .content-tools, .stream-toolbar, .card-actions, .drawer-footer, #toast { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 界面风格「临床期刊」(唯一风格,html[data-style="a"] 固定由页面头部设置):白底蓝灰、盒状卡片、期刊名作标签 ---------- */
html[data-style="a"] {
  --bg-primary: #eef2f7; --bg-secondary: #e6ebf2; --bg-tertiary: #dde4ee; --bg-card: #ffffff; --bg-card-hover: #f8fafd;
  --border: #dbe2ec; --border-subtle: #c3cddb; --text-primary: #16202e; --text-secondary: #38465a; --text-muted: #55647a;
  --accent: #1b4f9c; --on-accent: #ffffff; --accent-hover: #143d7a; --accent-light: #e3ecf8; --teal: #0f7b6c; --rose: #b4232a; --rose-light: #fbe9ea;
  --amber: #86570f; --amber-light: #f6ecd6; --ink: #16202e; --on-ink: #ffffff; --radius-md: 6px; --radius-lg: 8px;
}
html[data-style="a"][data-theme="dark"] {
  --bg-primary: #0e1520; --bg-secondary: #172130; --bg-tertiary: #1e2b3d; --bg-card: #141d2b; --bg-card-hover: #19243a;
  --border: #25334a; --border-subtle: #34445e; --text-primary: #e7edf6; --text-secondary: #bcc8d9; --text-muted: #8a9bb3;
  --accent: #78aeff; --on-accent: #0e1520; --accent-hover: #a0c5ff; --accent-light: rgba(120,174,255,.15); --teal: #5cc4b0; --rose: #ff8b8f; --rose-light: rgba(255,139,143,.13);
  --amber: #dbb35a; --amber-light: rgba(219,179,90,.12); --ink: #e7edf6; --on-ink: #0e1520;
}
html[data-style="a"] header.app-header { background: var(--bg-card); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-style="a"] .brand-mark { color: var(--accent); font-weight: 700; }
html[data-style="a"] .nav-tab-btn.active::after { height: 3px; }
html[data-style="a"] .app-container { padding-top: 24px; }
html[data-style="a"] .article-card { margin: 0 0 14px; padding: 20px 24px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
html[data-style="a"] .article-card::before { display: none; }
html[data-style="a"] .article-card:hover { border-color: var(--border-subtle); box-shadow: 0 4px 16px -8px rgba(22,32,46,.25); }
html[data-style="a"] .journal-badge { color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; font-weight: 700; }
html[data-style="a"] .design-rct { color: var(--teal); }
html[data-style="a"] .day-heading { margin: 26px 0 12px; padding: 0 0 0 12px; border: 0; border-left: 3px solid var(--accent); font-size: 15px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
html[data-style="a"] .day-heading:first-child { margin-top: 12px; }
html[data-style="a"] .articles-compact-list .day-heading { padding: 0 0 0 12px; }
html[data-style="a"] .compact-row { padding: 14px 18px; margin: 0 0 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
html[data-style="a"] .compact-row:hover { background: var(--bg-card-hover); }
html[data-style="a"] .lane-chip { border-radius: 6px; border-color: var(--border); background: var(--bg-card); }
html[data-style="a"] .lane-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html[data-style="a"] .btn-sm { border-radius: 6px; }
html[data-style="a"] .btn-sm.btn-primary, html[data-style="a"] .huddle-btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html[data-style="a"] .btn-sm.btn-primary:hover, html[data-style="a"] .huddle-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
html[data-style="a"] .huddle-btn { border-radius: 8px; }
html[data-style="a"] .huddle-counter { background: #fff; color: var(--accent); }
html[data-style="a"] .stream-toolbar { background: color-mix(in srgb, var(--bg-primary) 92%, transparent); }
html[data-style="a"] .view-toggle { border-radius: 8px; } html[data-style="a"] .view-toggle-btn { border-radius: 6px; }
html[data-style="a"] aside.sidebar .sidebar-card { padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px; }
html[data-style="a"] .filter-item-btn.active { background: var(--accent-light); color: var(--accent); }
html[data-style="a"] .tag-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html[data-style="a"] .quicklook, html[data-style="a"] .brief-box { background: var(--bg-secondary); }
html[data-style="a"] .drawer-section-title { border-bottom-color: var(--border); }
html[data-style="a"] .home-intro { border-top-color: var(--accent); }
@media (max-width: 720px) { html[data-style="a"] .article-card { padding: 16px 16px 14px; } html[data-style="a"] .app-container { padding-top: 12px; } html[data-style="a"] .compact-row { padding: 12px 14px; } }

.brand-mark { white-space: nowrap; flex: 0 0 auto; writing-mode: horizontal-tb; }
@media (max-width: 720px) {
  .brand-section { min-width: 0; gap: 8px; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-text > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { gap: 6px; }
}

/* 媒体关注角标(TCTMD 等新闻源报道过的文献) */
.media-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; color: var(--accent); background: var(--accent-light); border: 1px solid transparent; text-decoration: none; }
.media-pill:hover { border-color: var(--accent); }

/* 自动精选 / 近 7 天精读榜 */
.auto-pick-pill { color: var(--accent); background: var(--accent-light); border-color: transparent; font-weight: 600; }
.weekly-auto-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.weekly-rank { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-light); }
.weekly-auto-title { margin-top: 6px; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.weekly-auto-title a { color: inherit; text-decoration: none; }
.weekly-auto-title a:hover { color: var(--accent); text-decoration: underline; }
.weekly-auto-en { margin-top: 2px; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.weekly-auto-line { margin-top: 6px; font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); }
.tag-pill.auto-pick-pill { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12px; line-height: 1.7; background: var(--accent-light); color: var(--accent); border: 0; }

/* Weekly board: two reading lanes and a narrower deep-read column. */
.app-container.sources-layout .main-content { max-width: none; }
.sources-heading { margin-bottom: 24px; }
.sources-heading h2 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 8px; }
.sources-heading p { color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.sources-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.sources-summary > div { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 22px; display: flex; align-items: baseline; gap: 12px; }
.sources-summary strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.sources-summary span { color: var(--text-muted); font-size: 13px; }
.source-summary-attention strong { color: var(--amber); }
.source-report-age { color: var(--text-muted); font-size: 12px; line-height: 1.8; margin-bottom: 24px; }
.source-report-stale { color: var(--amber); }
.sources-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sources-grid .source-item { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 16px; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.source-item-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.source-item-name { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; flex: 1 1 140px; }
.source-status-badge { flex: 0 0 auto; padding: 3px 8px; border-radius: var(--radius-full); background: var(--bg-secondary); font-size: 11px; line-height: 1.5; }
.source-status-ok { color: var(--teal); }
.source-status-err { color: var(--amber); background: var(--amber-light); }
.source-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: auto 0 0; }
.source-counts dt { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.source-counts dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.source-cache-note { font-size: 11px; color: var(--amber); line-height: 1.8; }
.source-detail-note { font-size: 12px; color: var(--text-muted); line-height: 1.8; overflow-wrap: anywhere; }
.source-item-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 10.5px; line-height: 1.8; }
@media (max-width: 1000px) { .sources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sources-grid { grid-template-columns: minmax(0, 1fr); }
  .sources-summary { gap: 8px; }
  .sources-summary > div { flex-direction: column; gap: 4px; padding: 14px 10px; }
  .sources-summary strong { font-size: 24px; }
  .sources-summary span { font-size: 11px; }
}
.header-container { max-width: 1440px; gap: 20px; }
.header-actions { gap: 8px; }
.header-actions .search-wrapper { width: clamp(150px, 15vw, 230px); }
.header-actions .source-status-btn { flex: 0 0 auto; }
.app-container.weekly-layout { max-width: 1440px; }
.app-container.weekly-layout .main-content { max-width: none; }
.weekly-container { max-width: none; display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.weekly-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.weekly-card-grid .weekly-auto-item { margin: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); gap: 10px; align-items: stretch; }
.weekly-card-grid .weekly-rank { align-self: flex-start; }
.weekly-card-content { min-width: 0; display: flex; flex-direction: column; width: 100%; }
.weekly-card-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.weekly-card-grid .weekly-auto-title { font-size: 18px; margin-top: 12px; overflow-wrap: anywhere; }
.weekly-auto-en, .weekly-auto-line { overflow-wrap: anywhere; }
.weekly-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }
.weekly-card-actions .btn-sm { white-space: normal; text-align: left; }
.weekly-deep-read { min-width: 0; border-left: 1px solid var(--border); padding-left: 24px; }
.weekly-total { margin-left: 8px; color: var(--text-muted); font: 500 13px var(--font-sans); }
.weekly-group { margin-bottom: 30px; scroll-margin-top: 100px; }
.weekly-group-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; font-size: 18px; }
.weekly-group-title span { font: 400 12px var(--font-sans); color: var(--text-muted); }
.weekly-group-empty, .weekly-prep-note { font-size: 12px; color: var(--text-muted); }
.weekly-group-empty { margin: 0; padding: 12px 0; }
.weekly-prep-note { margin: 10px 0 0; }
@media (max-width: 720px) { .weekly-group { scroll-margin-top: 240px; } }

/* Keep the English abstract available beside a verified API translation. */
.reader-drawer { width: min(1120px, 100vw); }
.abstract-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.abstract-columns.abstract-only { grid-template-columns: minmax(0, 1fr); }
.abstract-columns.abstract-pending { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.abstract-pending .abstract-translation { border-left: 0; border-bottom: 1px solid var(--border); padding: 0 0 14px; }
.abstract-pending .abstract-column-title { margin-bottom: 8px; }
.huddle-original-title { margin: 5px 0 8px; color: var(--text-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.compact-original-title { margin-top: 5px; font: 12px/1.6 var(--font-sans); color: var(--text-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.huddle-icon { display: none; }
.special-search-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 13px; overflow-wrap: anywhere; }
.sources-grid .special-search-status, .sources-grid .special-search-empty { grid-column: 1 / -1; }
.special-search-status .search-scope { flex-basis: 100%; color: var(--text-muted); }
.special-search-status .btn-sm { min-height: 44px; }
.brief-help, .brief-coverage { font-size: 12px; color: var(--text-muted); }
.brief-coverage { flex-basis: 100%; }
.design-pill.design-unverified { background: none !important; color: var(--text-muted) !important; font-weight: 400; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.publication-status-pill { color: var(--text-primary); border: 1px solid currentColor; font-weight: 700; }
.publication-status { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 10px; margin: 6px 0; border: 1px solid var(--border); border-left: 3px solid var(--text-primary); border-radius: 4px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.publication-status strong { flex-basis: 100%; }
.selection-storage-note { color: var(--text-muted); font-size: 12px; }
@media (max-width: 720px) {
  html[data-style] header.app-header { position: sticky; top: 0; background: var(--bg-primary); }
  html[data-style] .header-container { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand huddle theme" "nav nav nav" "search search sources"; }
  html[data-style] .header-actions .huddle-btn { justify-self: end; padding: 0 8px; gap: 4px; min-width: 44px; min-height: 44px; }
  html[data-style] #themeToggle { min-width: 44px; min-height: 44px; }
  html[data-style] .header-actions .source-status-btn, html[data-style] .search-input { min-height: 44px; }
  html[data-style] .brand-logo { min-height: 44px; min-width: 44px; }
  html[data-style] .stream-toolbar { top: var(--sticky-header-h, var(--header-h)); }
  .weekly-group { scroll-margin-top: calc(var(--mobile-header-h, 168px) + 12px); }
  .huddle-label { display: none; }
  .huddle-icon { display: inline; font-size: 20px; }
  html[data-style] .header-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 0; overflow: visible; }
  html[data-style] .header-nav .nav-tab-btn { min-width: 0; width: 100%; min-height: 44px; height: auto; padding: 3px 2px; font-size: 13px; line-height: 1.2; flex-direction: column; justify-content: center; gap: 1px; }
  html[data-style] .header-nav .nav-tab-btn .badge { display: none; }
  html[data-style] .header-nav .nav-tab-btn .badge[title="加载中"], html[data-style] .header-nav .nav-tab-btn .badge[aria-label="加载中"] { display: inline-block; font-size: 10px; line-height: 1.1; }
}
.abstract-original, .abstract-translation { min-width: 0; overflow-wrap: anywhere; }
.abstract-translation { border-left: 1px solid var(--border); padding-left: 28px; }
.abstract-column-title { font: 600 13px var(--font-sans); color: var(--text-muted); margin-bottom: 14px; }
.abstract-jump-nav { display: none; }
.back-to-top { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--bg-card); color: var(--accent); font: 24px var(--font-sans); cursor: pointer; box-shadow: var(--shadow-sm); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body.dialog-open .back-to-top { display: none; }
@media (max-width: 720px) { .back-to-top { right: max(14px, env(safe-area-inset-right)); bottom: calc(76px + env(safe-area-inset-bottom)); } }
.abstract-column-title { scroll-margin-top: 58px; }
@media (max-width: 720px) {
  .abstract-jump-nav { display: flex; position: sticky; top: -1px; z-index: 2; gap: 8px; padding: 8px 0 12px; margin-bottom: 10px; background: var(--bg-card); border-bottom: 1px solid var(--border); }
  .abstract-jump-nav .btn-sm { flex: 1; min-height: 44px; justify-content: center; }
}

/* Curated: long abstracts stay in one wide reading column; tools sit to the right. */
.app-container.curated-layout .main-content { max-width: none; }
.stream-content, .stream-rail { min-width: 0; }
.curated-layout .stream-reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.stream-rail .home-intro { grid-template-columns: minmax(0, 1fr); margin: 0 0 28px; }
.stream-rail .home-intro li { padding: 16px 0; border-left: 0; box-shadow: none; background: none; border-radius: 0; }
.stream-rail .home-intro li + li { border-top: 1px solid var(--border); }
.stream-rail .lane-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.stream-rail .lane-label { flex-basis: 100%; margin-bottom: 4px; font-weight: 600; }
.stream-rail .lane-chip { max-width: 100%; white-space: normal; text-align: left; }
@media (max-width: 1000px) {
  .curated-layout .stream-reading-layout { display: flex; flex-direction: column; gap: 20px; }
  .stream-content, .stream-rail { width: 100%; }
  .stream-rail { order: -1; }
  .stream-rail .home-intro { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
  .stream-rail .home-intro li { padding: 10px 8px; }
  .stream-rail .home-intro li + li { border-top: 0; border-left: 1px solid var(--border); }
}
@media (min-width: 721px) and (max-width: 1250px) {
  .header-container { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 8px 18px; }
  .header-nav { height: 40px; justify-content: flex-start; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .header-actions .search-wrapper { flex: 1; margin-right: auto; }
}
@media (max-width: 1000px) {
  .weekly-container { grid-template-columns: minmax(0, 1fr); }
  .weekly-deep-read { border-left: 0; border-top: 1px solid var(--border); padding: 24px 0 0; }
}
@media (max-width: 720px) {
  .card-actions > div { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .card-actions .action-buttons-group { width: 100%; }
  .header-container { grid-template-columns: 1fr auto auto; grid-template-areas: "brand brand theme" "huddle huddle sources" "nav nav nav" "search search search"; gap: 8px; }
  .header-actions .source-status-btn { grid-area: sources; justify-self: end; }
  .header-actions .huddle-btn { justify-self: start; }
  .header-actions .search-wrapper { width: 100%; }
  .abstract-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .abstract-translation { border-left: 0; border-top: 1px solid var(--border); padding: 20px 0 0; }
}
@media (max-width: 640px) {
  .weekly-card-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .weekly-card-grid .weekly-auto-item { padding: 16px 12px; }
}

.content-status { display:flex; flex-wrap:wrap; gap:8px 24px; padding:10px 24px; font-size:12px; line-height:1.6; color:var(--text-muted); border-bottom:1px solid var(--border); }
.content-status b { color:var(--text-secondary); font-weight:600; }
.weekly-abstract { margin-top:8px; font-size:13px; line-height:1.7; }
.weekly-abstract summary { cursor:pointer; color:var(--accent); }
.weekly-abstract p { white-space:pre-wrap; color:var(--text-secondary); overflow-wrap:anywhere; }
@media (max-width:720px) { .content-status { padding:8px 16px; gap:4px 16px; } }

/* Shared journal indicator component. */
.journal-metrics-badge { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .4rem; max-width: 100%; min-width: 0; font-size: .72rem; line-height: 1.45; color: var(--text-muted, #566375); vertical-align: baseline; }
.journal-metric-token { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.filter-badge-active { flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; }
.filter-badge-active .journal-metrics-badge { flex-basis: 100%; order: 2; }
.journal-metrics-details { min-width: 0; max-width: 100%; font-size: .78rem; line-height: 1.5; }
.journal-metrics-details summary { cursor: pointer; overflow-wrap: anywhere; }
.journal-metrics-details p, .journal-metrics-details li { overflow-wrap: anywhere; }
.journal-metrics-details small { display: block; }
.journal-metrics-details summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.journal-filter-label { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; overflow-wrap: anywhere; }
.journal-filter-item .journal-metrics-details { margin: 0 12px 10px; }
.compact-meta { flex-wrap: wrap; }
.source-journal-metrics { margin: 8px 0; }
.drawer-header #drawerJournalBadges { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; min-width: 0; }
.huddle-item-meta .journal-metrics-badge { display: inline-flex; }
[data-journal-metrics] { display: block; margin-top: 6px; }

.static-journal-metric { display: block; margin-top: 6px; }
.static-journal-metric [data-journal-metrics] { display: inline; margin-left: 6px; }

/* Header wraps at tablet widths too; anchor and keyboard offsets follow measured surfaces. */
html { scroll-padding-top: calc(var(--sticky-header-h, var(--header-h)) + var(--sticky-toolbar-h, 0px) + 12px); }
.weekly-group { scroll-margin-top: 0; }
.weekly-full-report h3[id] { scroll-margin-top: var(--sticky-toc-h, 0px); }
:where(.article-card,.compact-row,.weekly-auto-item,.library-row) :is(button,a,input,select) { scroll-margin-top: calc(var(--sticky-header-h, var(--header-h)) + var(--sticky-toolbar-h, 0px) + 12px); }

/* Daily AI full-text readings: keep the existing right-hand reading surface. */
.deep-reading-status { margin: 0 0 6px; font-size: 14px; color: var(--text-primary); line-height: 1.7; }
.deep-reading-status b { color: var(--accent); }
.deep-reading-timing, .deep-reading-scope, .deep-reading-shortfall, .deep-reading-empty { font-size: 13px; line-height: 1.75; color: var(--text-muted); margin: 0 0 16px; }
.deep-reading-shortfall { color: var(--text-secondary); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.deep-reading-batch, .deep-reading-demo-label { font-size: 14px; line-height: 1.6; margin: 18px 0 10px; color: var(--text-secondary); }
.deep-reading-batch span { font-weight: normal; color: var(--text-muted); margin-left: 8px; }
.deep-reading-body { padding: 0 14px 16px; }
.deep-reading-original { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.deep-reading-section h5 { font-size: 15px; margin: 18px 0 6px; color: var(--text-primary); }
.deep-reading-section > p { font-size: 16px; line-height: 1.85; margin: 0 0 8px; color: var(--text-primary); }
.deep-reading-evidence { margin: 8px 0 16px; font-size: 14px; color: var(--text-secondary); }
.deep-reading-evidence > summary { cursor: pointer; min-height: 32px; line-height: 2; }
.deep-reading-evidence blockquote { margin: 8px 0; padding: 8px 12px; border-left: 2px solid var(--border); }
.deep-reading-evidence blockquote p { margin: 0 0 4px; font-size: 14px; line-height: 1.75; }
.deep-reading-evidence cite { font-size: 12px; color: var(--text-muted); }
.deep-reading-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.deep-reading-history { margin: 16px 0 24px; padding-top: 14px; border-top: 1px solid var(--border); }
.deep-reading-history > summary { cursor: pointer; color: var(--text-secondary); font-size: 14px; min-height: 44px; line-height: 2; margin-bottom: 10px; }
.deep-reading-demo-label { padding-top: 16px; border-top: 1px solid var(--border); }

/* ---- v15 卡片与移动端整理：中文要点先行、元信息不再夹点、操作更轻、首屏更早见到正文 ---- */
.meta-badges { align-items: center; gap: 4px 10px; }
.meta-badges > *::after, .meta-badges > *:not(:last-child)::after, #drawerJournalBadges > *::after, #drawerJournalBadges > *:not(:last-child)::after { content: none !important; display: none; }
.drawer-header #drawerJournalBadges { align-items: center; gap: 4px 10px; }
.meta-badges > .journal-badge { margin-right: 2px; }
.article-abstract { -webkit-line-clamp: 3; }
.card-lead { margin: 2px 0 0; font-size: 15.5px; line-height: 1.75; color: var(--text-primary); }
.card-lead .content-label { vertical-align: 1px; }
.card-why { margin: 6px 0 0; font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.card-why b { font-weight: 600; color: var(--text-muted); }
.card-actions { margin-top: 4px; }
.card-source-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
/* The same filled button repeated on every card shouted; an outline keeps it findable but quiet. */
html[data-style="a"] .article-card .btn-sm.btn-primary { background: transparent; color: var(--accent); border-color: var(--accent); }
html[data-style="a"] .article-card .btn-sm.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.drawer-body details[data-journal-metrics-details], .drawer-body .journal-metric-details { margin-bottom: 8px; }
.radar-archive-note { margin: 0 0 12px; padding: 8px 12px; font-size: 13px; color: var(--text-secondary); background: var(--bg-secondary); border-radius: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1000px) {
  /* The header tabs already name each column; topics become one swipeable row. */
  .stream-rail .home-intro { display: none; }
  .stream-rail .lane-bar { flex-wrap: nowrap; overflow-x: auto; align-items: center; gap: 6px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .stream-rail .lane-label { flex: 0 0 auto; flex-basis: auto; margin: 0 4px 0 0; }
  .stream-rail .lane-chip { flex: 0 0 auto; white-space: nowrap; }
  .stream-rail .day-bar { padding-right: 24px; overscroll-behavior-x: contain; min-width: 0; max-width: 100%; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 32px), transparent 100%); }
  .curated-layout .stream-reading-layout { gap: 8px; }
}
@media (max-width: 720px) {
  .card-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .card-actions .action-buttons-group { width: auto; }
  .card-source-actions { width: 100%; gap: 8px; }
  .card-source-actions .btn-sm { padding-left: 10px; padding-right: 10px; }
  .card-lead { font-size: 15px; }
}
@media (max-width: 720px) {
  header.app-header { transition: transform .22s ease; will-change: transform; }
  html.header-tucked header.app-header { transform: translateY(-100%); }
  html.header-tucked .stream-toolbar, html.header-tucked .weekly-toc { transition: top .22s ease; }
}
@media (prefers-reduced-motion: reduce) { header.app-header, html.header-tucked .stream-toolbar { transition: none; } }

/* ---- v15.1 手机雷达首屏：综述按钮去说明 ---- */
@media (max-width: 720px) {
  .ai-digest .brief-box { flex-direction: row; align-items: center; }
  .ai-digest .brief-help { display: none; }
}
@media (max-width: 720px) {
  .drawer-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .drawer-footer .btn-sm { min-height: 38px; padding: 6px 8px; justify-content: center; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .drawer-footer [hidden] { display: none !important; }
  .drawer-footer #drawerPdfLink:not([hidden]) { grid-column: 1 / -1; }
}

/* ---- v16 近7天榜：榜单主栏 + 精读目录右栏，精读在独立阅读面板中打开 ---- */
.weekly-card-actions .btn-sm:focus-visible { outline-color: var(--accent); }
.deep-reading-history > summary:focus-visible, .deep-reading-evidence > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.weekly-container { grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 340px); gap: 32px; }
.weekly-pane-switch { display: none; }

/* Board heading: one line of facts, details behind 榜单说明. */
.weekly-head { margin-bottom: 12px; }
.weekly-head .next-title { margin-bottom: 4px; }
.weekly-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }
.weekly-stale { font-weight: 600; color: var(--amber); }
.weekly-info > summary { cursor: pointer; color: var(--accent); list-style: none; }
.weekly-info > summary::-webkit-details-marker { display: none; }
.weekly-info > summary::after { content: ' ▾'; font-size: 10px; }
.weekly-info[open] > summary::after { content: ' ▴'; }
.weekly-info-body { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-secondary); max-width: 640px; }
.weekly-info-body p { margin: 0 0 6px; }
.weekly-info-body p:last-child { margin: 0; }
.weekly-info-body .weekly-preparation { margin: 0 0 6px; font-size: inherit; }

/* Category filter + view switch, pinned under the header while the list scrolls. */
.weekly-bar { position: sticky; top: var(--sticky-header-h, var(--header-h)); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 18px; padding: 10px 0; background: color-mix(in srgb, var(--bg-primary) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); transition: top .22s ease; }
.weekly-category-nav { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.weekly-category-nav::-webkit-scrollbar { display: none; }
.weekly-category-nav button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.weekly-category-nav button span { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.weekly-category-nav button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.weekly-category-nav button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-ink, #fff); }
.weekly-category-nav button[aria-pressed="true"] span { color: inherit; opacity: .8; }
.weekly-category-nav button:disabled { opacity: .45; cursor: default; }
.weekly-view-toggle { flex: 0 0 auto; }
.weekly-group { scroll-margin-top: calc(var(--sticky-header-h, var(--header-h)) + 64px); }

/* Titles open the on-site reader (abstract + links), not the publisher page. */
.weekly-auto-title .title-open, .weekly-row-title .title-open { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.weekly-auto-title .title-open:hover, .weekly-row-title .title-open:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.weekly-deep-badge { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; vertical-align: 2px; border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); border-radius: var(--radius-full); background: color-mix(in srgb, var(--teal) 10%, transparent); color: var(--teal); font: 500 12px var(--font-sans); white-space: nowrap; cursor: pointer; }
.weekly-deep-badge:hover { background: var(--teal); color: var(--on-ink, #fff); }

/* 列表 view: one row per paper. */
.weekly-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.weekly-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.weekly-row .weekly-rank { margin-top: 1px; }
.weekly-row-main { min-width: 0; }
.weekly-row-title { font-size: 15.5px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
/* long-title: the title button reaches the row edge on mobile. */
.weekly-row-title .title-open:focus-visible { outline-offset: -2px; }
/* long-title: keep the reading action usable beside a wrapping title. */
.weekly-row-title .weekly-deep-badge { min-height: 32px; }
.weekly-row-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 3px; font-size: 12.5px; color: var(--text-muted); }
.weekly-row-meta > span + span::before { content: '·'; margin: 0 6px; }
.weekly-row-journal { color: var(--text-secondary); }
.weekly-row-line { margin-top: 4px; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.weekly-row-line .content-label { margin-right: 6px; }
.weekly-star { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--bg-card); color: var(--text-muted); font-size: 16px; line-height: 1; cursor: pointer; }
.weekly-star:hover { border-color: var(--accent); color: var(--accent); }
.weekly-star.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

.weekly-next { margin: 8px 0 24px; padding-top: 14px; border-top: 1px solid var(--border); }
.weekly-next > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-secondary); min-height: 36px; line-height: 2.2; }
.weekly-next > summary small { margin-left: 8px; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.weekly-next-note { font-size: 12.5px; line-height: 1.7; color: var(--text-muted); margin: 8px 0; }

/* Right rail: a pinned, self-scrolling index of readings. */
.weekly-deep-read { position: sticky; top: calc(var(--sticky-header-h, var(--header-h)) + 16px); max-height: calc(100vh - var(--sticky-header-h, var(--header-h)) - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 16px 24px; border-left: 1px solid var(--border); scrollbar-width: thin; transition: top .22s ease; }
.weekly-deep-read .next-title { margin-bottom: 6px; }
.deep-reading-label { margin: 0 0 6px; }
.deep-reading-status { margin: 0; font-size: 13.5px; }
.deep-reading-timing { margin: 0 0 10px; font-size: 12px; }
.deep-reading-shortfall { font-size: 12.5px; margin: 0 0 12px; }
.deep-reading-batch { margin: 14px 0 6px; font-size: 13px; }
.deep-reading-list { display: grid; }
.deep-reading-item { display: grid; gap: 3px; width: 100%; padding: 10px 10px; margin: 0; border: 0; border-radius: var(--radius-md); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.deep-reading-item + .deep-reading-item { box-shadow: 0 -1px 0 var(--border); }
.deep-reading-item:hover { background: var(--bg-card-hover, var(--bg-secondary)); }
.deep-reading-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.deep-reading-item.active { background: var(--accent-light); box-shadow: inset 3px 0 0 var(--accent); }
.deep-reading-item-title { font-family: var(--font-serif); font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--text-primary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
/* long-title: never truncate a reading title that has no native full title. */
.deep-reading-item[data-deep-reading]:not([title]) .deep-reading-item-title { -webkit-line-clamp: unset; }
.deep-reading-item small, .deep-reading-item .deep-reading-topic { font-size: 12px; line-height: 1.6; color: var(--text-muted); overflow-wrap: anywhere; }
.deep-reading-item .deep-reading-topic { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.deep-reading-go { font-size: 12.5px; color: var(--accent); }
.deep-reading-history { margin: 14px 0 8px; padding-top: 10px; }
.deep-reading-history > summary { font-size: 13px; min-height: 36px; margin-bottom: 0; }
.deep-reading-day { margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.deep-reading-day span { font-weight: 400; margin-left: 6px; }
.deep-reading-history .btn-sm { margin-top: 10px; }
.deep-reading-demo-label { margin: 16px 0 4px; padding-top: 12px; font-size: 13px; }

/* Reading panel: header, section list and footer stay put; only the text scrolls. */
.reader-drawer.deep-reader { width: min(860px, 100vw); }
.deep-reader-head { display: flex; align-items: flex-start; gap: 16px; padding: 18px 28px 12px; border-bottom: 1px solid var(--border); }
.deep-reader-heading { flex: 1; min-width: 0; }
.deep-reader-heading h2 { margin: 6px 0 4px; font-family: var(--font-serif); font-size: 20px; line-height: 1.5; text-wrap: balance; overflow-wrap: anywhere; }
.deep-reader-meta { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.deep-reader-head .drawer-close-btn { margin: -4px -10px 0 0; width: 40px; height: 40px; border: 1px solid var(--border); font-size: 22px; }
.deep-reader-toc { display: flex; gap: 4px; padding: 8px 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.deep-reader-toc::-webkit-scrollbar { display: none; }
.deep-reader-toc[hidden] { display: none; }
.deep-reader-toc button { flex: 0 0 auto; padding: 4px 10px; border: 0; border-radius: var(--radius-full); background: none; color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.deep-reader-toc button:hover { color: var(--accent); }
.deep-reader-toc button[aria-current="true"] { background: var(--bg-card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.deep-reader-body { padding: 22px 28px 48px; }
.deep-reader-body > * { max-width: 700px; }
.deep-reader-body .deep-reading-original { margin: 0 0 4px; font-size: 13.5px; }
.deep-reader-body .deep-reading-scope { margin: 0 0 8px; }
.deep-reader-body .deep-reading-section { scroll-margin-top: 12px; }
.deep-reader-body .deep-reading-section h3 { margin: 22px 0 6px; font-family: var(--font-serif); font-size: 17px; color: var(--text-primary); }
.deep-reader-body .weekly-hero { margin-top: 0; }
.deep-reader-body .weekly-hero h2 { display: none; }
.deep-reader-body .weekly-full-report h3[id] { scroll-margin-top: 12px; }
.deep-reader-foot { justify-content: flex-start; }
.deep-reader-pos { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.deep-reader-links { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.deep-reader-foot [hidden] { display: none !important; }

@media (max-width: 1000px) {
  .weekly-container { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .weekly-pane-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-secondary); }
  .weekly-pane-switch button { min-height: 40px; border: 0; border-radius: var(--radius-md); background: none; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .weekly-pane-switch button span { font-weight: 400; color: var(--text-muted); margin-left: 2px; font-variant-numeric: tabular-nums; }
  .weekly-pane-switch button[aria-selected="true"] { background: var(--bg-card); color: var(--accent); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
  .weekly-container[data-pane="board"] .weekly-deep-read, .weekly-container[data-pane="reading"] .weekly-board-pane { display: none; }
  .weekly-deep-read { position: static; max-height: none; overflow: visible; padding: 0; border: 0; }
  .weekly-deep-read .next-title { display: none; }
  .deep-reading-item { margin: 0; width: 100%; padding: 12px 0; border-radius: 0; }
  .deep-reading-item.active { padding-left: 10px; }
  .deep-reading-item-title { font-size: 15.5px; }
}
@media (max-width: 720px) {
  .weekly-bar { padding: 8px 0; margin-bottom: 12px; }
  .weekly-category-nav button { min-height: 38px; }
  .weekly-view-toggle .view-toggle-btn { padding-left: 10px; padding-right: 10px; }
  .weekly-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; }
  .weekly-row-title { font-size: 15px; }
  .weekly-deep-badge { margin: 4px 0 0; }
  .weekly-row-title .weekly-deep-badge, .weekly-auto-title .weekly-deep-badge { display: flex; width: fit-content; margin-left: 0; }
  .deep-reader-head { padding: calc(10px + env(safe-area-inset-top)) 14px 10px; gap: 10px; flex-direction: row-reverse; }
  .deep-reader-head .drawer-close-btn { margin: 0; }
  .deep-reader-heading h2 { font-size: 17px; margin-top: 4px; }
  .deep-reader-toc { padding: 6px 10px; }
  .deep-reader-body { padding: 16px 16px 36px; }
  .deep-reader-foot { display: flex; flex-wrap: wrap; }
  .deep-reader-foot #deepReaderPrev, .deep-reader-foot #deepReaderNext { flex: 1 1 0; }
  .deep-reader-pos { order: -1; flex-basis: 100%; text-align: center; }
  .deep-reader-links { flex-basis: 100%; margin: 0; }
  .deep-reader-links .btn-sm { flex: 1 1 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .weekly-bar, .weekly-deep-read { transition: none; } }
.deep-reader-head, .deep-reader-toc, .deep-reader-foot { flex: 0 0 auto; }
@media (max-width: 720px) {
  .deep-reader-foot #deepReaderPrev { order: 0; }
  .deep-reader-pos { order: 1; flex: 0 0 auto; flex-basis: auto; padding: 0 4px; }
  .deep-reader-foot #deepReaderNext { order: 2; }
  .deep-reader-links { order: 3; }
}

/* ---- v16 每日精选：按日查看，右栏放日期与主题 ---- */
.stream-rail .day-bar { margin-bottom: 22px; }
.stream-rail .day-bar[hidden] { display: none; }
.stream-rail .day-bar .lane-chip { font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .stream-rail .day-bar { margin-bottom: 8px; }
}
@media (min-width: 1001px) {
  .curated-layout .stream-rail { position: sticky; top: calc(var(--sticky-header-h, var(--header-h)) + 16px); max-height: calc(100vh - var(--sticky-header-h, var(--header-h)) - 32px); overflow-y: auto; scrollbar-width: thin; }
}

/* ---- v17 文献雷达：说明一行、综述按钮进工具栏、卡片操作精简 ---- */
.mode-note { margin: 0 0 14px; padding: 0; border: 0; font-size: 13px; color: var(--text-muted); }
.mode-note .mode-note-more { display: none; }
.mode-note.note-open .mode-note-more { display: inline; color: var(--text-secondary); }
.mode-note-toggle { margin-left: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; }
.mode-note-toggle::after { content: " ▾"; font-size: 10px; }
.mode-note.note-open .mode-note-toggle::after { content: " ▴"; }
.mode-note.note-open .mode-note-toggle { display: block; margin: 4px 0 0; }

.stream-toolbar .ai-digest { margin: 0; }
.ai-digest.digest-idle .brief-box { padding: 0; }
.ai-digest.digest-idle .brief-help { display: none; }
.btn-sm.brief-start { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-sm.brief-start:hover { background: var(--accent-light); border-color: var(--accent); }
.stream-toolbar + .ai-digest { margin: 12px 0 4px; }

.card-actions { margin-top: 14px; }
.btn-sm.card-star { color: var(--text-secondary); border-color: transparent; padding: 0 10px; }
.btn-sm.card-star:hover { color: var(--accent); background: var(--accent-light); border-color: transparent; }
.btn-sm.card-star.active { color: var(--accent); background: none; border-color: transparent; }
.btn-sm.card-star span { font-size: 15px; }
.card-source-actions { gap: 4px 14px !important; font-size: 13px; }
.card-source-actions .btn-sm:not(.btn-primary), .card-link {
  min-height: 0; padding: 4px 0; border: 0; border-radius: 0; background: none !important; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none;
}
.card-source-actions .btn-sm:not(.btn-primary):hover, .card-link:hover { color: var(--text-primary); text-decoration: underline !important; }

@media (max-width: 1000px) {
  .stream-toolbar > .active-filters-bar { flex: 1 1 0; min-width: 0; }
  .stream-toolbar > .stream-controls { flex: 1 1 100%; }
  .stream-controls .sort-select { flex: 1 1 0; min-width: 0; }
  .stream-toolbar .ai-digest.digest-idle .btn-sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
}
@media (max-width: 720px) {
  .card-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
  .card-actions .action-buttons-group { flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
  .card-actions .action-buttons-group .btn-primary { flex: 1 1 auto; }
  .card-actions .action-buttons-group .card-star, .card-actions .action-buttons-group .btn-share { flex: 0 0 auto; }
  .card-actions > div.card-source-actions:last-child { flex-basis: 100%; justify-content: flex-start; }
  .stream-controls { flex-wrap: nowrap; gap: 8px; }
  .stream-controls .ai-digest.digest-idle .btn-sm { padding: 0 9px; }
  .stream-controls .view-toggle-btn { padding: 4px 10px; }
  .article-title-zh + .article-title .title-open { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---- v18 信源状态：总数即筛选，异常在前，一行一个信源 ---- */
.sources-summary .source-filter { display: flex; align-items: baseline; gap: 12px; padding: 14px 20px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .12s, background .12s; }
.sources-summary .source-filter:hover { border-color: var(--border-subtle); }
.sources-summary .source-filter[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); box-shadow: inset 0 0 0 1px var(--accent); }
.sources-summary .source-filter strong { font-size: 24px; }
.sources-grid { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sources-grid .special-search-status, .sources-grid .special-search-empty { margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.special-search-empty .btn-sm { margin-left: 10px; }
.source-group-title { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 10px 20px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-secondary); background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.source-group-title span { font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sources-grid .source-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px 150px; grid-template-areas: "head counts foot" "metrics counts foot" "cache cache cache" "note note note";
  align-items: center; gap: 2px 24px; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none;
}
.sources-grid .source-item:last-child { border-bottom: 0; }
.sources-grid .source-needs-attention { box-shadow: inset 3px 0 0 var(--amber); }
.source-item-head { grid-area: head; flex-wrap: nowrap; align-items: baseline; justify-content: flex-start; gap: 10px; }
.source-item-name { flex: 0 1 auto; font-size: 14.5px; }
.source-journal-metrics { grid-area: metrics; margin: 0; font-size: 11.5px; color: var(--text-muted); }
.source-journal-metrics .journal-metrics-badge { display: none; }
.source-journal-metrics .journal-metrics-details summary { font-size: 11.5px; }
.sources-grid .source-counts { grid-area: counts; margin: 0; gap: 12px; }
.source-counts dt { margin-bottom: 0; font-size: 11px; }
.source-counts dd { font-size: 14px; }
.source-cache-note { grid-area: cache; margin: 6px 0 0; }
.source-detail-note { grid-area: note; margin: 4px 0 0; }
.source-item-foot { grid-area: foot; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; padding: 0; border: 0; font-size: 11px; text-align: right; }
@media (max-width: 1000px) {
  .sources-grid .source-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "metrics metrics" "counts foot" "cache cache" "note note"; gap: 6px 16px; }
}
@media (max-width: 720px) {
  .sources-summary .source-filter { flex-direction: column; gap: 2px; padding: 10px 12px; }
  .sources-summary .source-filter strong { font-size: 22px; }
  .sources-grid { margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .sources-grid .source-item { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "metrics" "counts" "cache" "note" "foot"; padding: 12px 16px; }
  .source-item-head { flex-wrap: wrap; justify-content: space-between; }
  .sources-grid .source-counts { display: flex; gap: 14px; }
  .source-counts > div { display: flex; align-items: baseline; gap: 4px; }
  .source-item-foot { flex-direction: row; justify-content: space-between; text-align: left; }
  .source-group-title { padding: 8px 16px; }
}

/* ---- 手机适配 2026-11-12：筛选全部可见、顶栏压低、触控区 ≥44px、阅读台页脚不挡正文 ---- */
@media (max-width: 720px) {


  /* 触控区 ≥44px */
  .btn-sm, .action-buttons-group .btn-sm, .compact-actions .btn-sm { min-height: 44px; }
  .stream-controls .sort-select, .sort-select, .more-filters-basic select { min-height: 44px; }
  .view-toggle-btn { min-height: 40px; padding: 0 14px; }
  .ai-digest .brief-box .btn-sm, .stream-toolbar .ai-digest.digest-idle .btn-sm { min-height: 44px; }
  .card-source-actions .btn-sm:not(.btn-primary), .card-link, .ft-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
  .compact-actions .ft-status.ft-compact { flex: 1 1 100%; justify-content: space-between; gap: 6px 10px; }
  .card-source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; }
  .ft-form input, .ft-form .btn-sm { min-height: 44px; font-size: 16px; }
  .ft-actions { gap: 4px 14px; }
  .filter-badge-remove { min-width: 44px; min-height: 44px; margin: -14px -12px -14px -6px; padding: 0; }
  .sidebar-reset-btn, .browse-only-btn, .sidebar-clear-btn, .accordion-expand-btn { min-height: 44px; min-width: 44px; padding: 0 10px; }
  .mode-note-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  .drawer-close-btn { width: 44px; height: 44px; margin: -10px -12px 0 0; }
  .stream-toolbar, html[data-style] .stream-toolbar { position: static; }

  /* 「更多筛选」底部抽屉：遮罩更实，抽屉更高 */

  /* 阅读台：页脚压成一行，正文留底部间距 */
  .drawer-body { padding-bottom: 28px; }
  .drawer-footer { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .drawer-footer .btn-sm { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; font-size: 14px; }
  .drawer-footer #drawerPdfLink:not([hidden]) { grid-column: auto; flex: 1.2 1 0; }
  .drawer-footer #drawerExternalLink { flex: 1 1 0; margin-left: 0; }
  .drawer-footer #drawerCopyShareBtn { flex: 1 1 100%; order: 9; min-height: 40px; }
}


/* ======== 2026-11-12 界面收敛：顶栏只放四个栏目；筛选行 = 放大镜 + 筛选项 + 筛选；卡片只留一个主按钮 ======== */
/* 顶栏 */
.header-container, html[data-style] .header-container { display: flex; align-items: stretch; justify-content: flex-start; grid-template-areas: none; gap: 0; }
.header-nav { flex: 1 1 auto; }
@media (max-width: 720px) {
  html[data-style] .header-container { display: block; height: auto; padding: 0 12px; }
}

/* 工具行：放大镜 · 领域/时间/全文 · 筛选 */
.tool-bar { max-width: 1440px; margin: 0 auto; padding: 4px 16px 0; }
.tool-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tool-row [hidden] { display: none !important; }
.tool-btn { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-secondary); cursor: pointer; }
.tool-btn:hover, .tool-btn.active { color: var(--accent); }
.tool-row .lane-bar { display: flex; margin: 0; padding: 0; overflow: visible; min-width: 0; }
.tool-row #streamLaneSlot { min-width: 0; flex: 0 1 auto; }
.tool-row .lane-label, .tool-row .range-label { display: none; }
.lane-select, .range-select { font: inherit; font-size: 13px; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; height: 36px; min-height: 36px; padding: 0 22px 0 10px; min-width: 0; max-width: 100%; }
.tool-row-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tool-row-end:empty { display: none; }
.tool-row .filter-toggle-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--text-secondary); font-size: 13px; }
.tool-row-end:not(:empty) ~ .filter-toggle-btn { margin-left: 0; }
.tool-row .filter-toggle-btn.active { color: var(--accent); background: none; }
.filter-count { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; }
.search-panel { padding: 2px 0 6px; max-width: 560px; }
.search-panel .search-wrapper { width: 100%; }
.search-panel .search-input { width: 100%; padding-right: 48px; }
.search-clear { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.search-input:placeholder-shown + .search-clear { display: none; }
.search-input::-webkit-search-cancel-button { display: none; }
.stream-toolbar, html[data-style] .stream-toolbar { position: static; padding: 4px 0; margin: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.stream-toolbar:has(.active-filters-bar:empty) { display: none; }
.panel-controls .stream-controls { flex-wrap: wrap; }
.panel-range:empty, .mode-note:empty { display: none; }
.panel-range .range-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.panel-range .range-select, .panel-range .lane-bar { width: 100%; }
.minor-note { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.mode-note { margin-bottom: 14px; }

/* 「共 N 篇」放在第一个标题右边，灰色小字 */
.day-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.heading-total { margin-left: auto; font: 400 12px var(--font-sans); color: var(--text-muted); white-space: nowrap; }
.stream-total { text-align: right; padding: 8px 0 0; }

/* 页脚：精选清单、深浅色、信源状态 */
.app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; max-width: 1440px; margin: 28px auto 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.app-footer .huddle-btn, html[data-style="a"] .app-footer .huddle-btn { display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 10px; border: 0; background: none; color: var(--text-secondary); font-size: 13px; box-shadow: none; }
.app-footer .huddle-btn:hover { background: none; color: var(--accent); }
.app-footer .huddle-label { display: inline; }
.app-footer .huddle-icon { display: inline; font-size: 15px; }
.app-footer .huddle-counter { color: var(--text-muted); background: none; padding: 0; }
.app-footer .icon-btn, .app-footer .source-status-btn { min-width: 44px; min-height: 44px; color: var(--text-secondary); font-size: 13px; }

/* 卡片：干货优先；元信息行放状态标签与唯一主按钮；其余是不加框文字 */
.article-card { padding: 8px 0; }
.article-card::before { display: none; }
.card-top { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 8px; margin-bottom: 3px; }
.card-top .journal-badge { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.card-top .ft-status.ft-compact { display: contents; }
.ft-compact .ft-summary { display: none; }
.card-top > .btn-primary, .card-top > a[data-ft-download], .card-top > .ft-status.ft-compact > .btn-primary { margin-left: auto; flex: 0 0 auto; }
.card-top > .btn-sm, .card-top > .ft-status.ft-compact > .btn-sm { min-height: 28px; padding: 0 11px; font-size: 12.5px; }
.card-top > .ft-form, .compact-actions > .ft-form { flex: 1 0 100%; width: 100%; margin-top: 4px; }
html[data-style] .article-card .journal-badge { color: var(--text-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.article-card .date-badge { font: 400 12px var(--font-sans); }
.article-title-zh, .article-title-zh.ql-title, .article-title { font-size: 16px; line-height: 1.42; margin: 0 0 2px; }
.article-title-en-hit { margin: 0 0 2px; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.article-gist { margin: 0 0 2px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card-actions { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 0 10px; margin-top: 0; }
.card-actions > div:last-child, .card-actions .action-buttons-group { width: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 2px 6px; flex-wrap: wrap; }
.card-actions > div.card-source-actions:last-child { flex-basis: auto; }
.card-source-actions { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.text-btn { display: inline-flex; align-items: center; min-height: 26px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; text-decoration: none; }
.text-btn:hover { color: var(--accent); text-decoration: underline; }
.text-btn.active { color: var(--accent); }
.ft-status.ft-compact { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 6px; justify-content: flex-start; }
.fulltext-state { font-size: 12px; color: var(--text-muted); }
.ft-failed .fulltext-state, .ft-review .fulltext-state { color: var(--rose); }
html[data-style] .article-card .btn-sm.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
html[data-style] .article-card .btn-sm.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* 阅读台页脚：下载 PDF 实心，其余不实心 */
.cite-menu > summary { list-style: none; cursor: pointer; }
.cite-menu > summary::-webkit-details-marker { display: none; }
.cite-menu-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cite-section { border-top: 0; padding-top: 8px; }
.citation-actions-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }

@media (max-width: 720px) {
  .tool-bar { padding: 2px 12px 0; }
  .tool-btn, .tool-row .filter-toggle-btn, .tool-row .lane-select, .tool-row .range-select { min-height: 44px; height: 44px; }
  .tool-btn { width: 44px; margin-left: -10px; }
  .tool-row { gap: 6px; }
  .tool-row #streamLaneSlot { flex: 1.12 1 0; }
  .tool-row #rangeBar, .tool-row #ftBar { flex: 1 1 0; min-width: 0; }
  .tool-row .lane-select, .tool-row .range-select { width: 100%; font-size: 12.5px; padding: 0 14px 0 6px; }
  .tool-row .filter-toggle-btn { padding: 0 4px; margin-right: -4px; }
  .search-panel { max-width: none; }
  .card-top > .btn-sm, .card-top > a[data-ft-download]:not([hidden]), .card-top > .ft-status.ft-compact > .btn-sm { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; }
  .card-actions { margin-top: 0; }
  .article-card { padding: 8px 0; }
  .text-btn { min-height: 44px; padding: 0 5px; }
  .drawer-footer #drawerCopyShareBtn { flex: 1 1 0; order: 0; min-height: 44px; }
  .drawer-footer #drawerPdfLink:not([hidden]) { flex: 1.3 1 0; }
  .app-footer { margin-top: 20px; }
}
html[data-style] .article-card { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; margin: 0; padding: 8px 0; }
html[data-style] .article-card:hover { box-shadow: none; transform: none; }
.article-card .content-label { border: 0; padding: 0; margin-right: 6px; background: none; color: var(--text-muted); font-size: 11px; font-weight: 400; vertical-align: 1px; }
.compact-title .content-label, .weekly-auto-title .content-label, .weekly-row-title .content-label { vertical-align: 1px; margin-right: 6px; }
html[data-style] .day-heading { margin: 10px 0 2px; }
@media (max-width: 720px) {
  html[data-style] .article-card { padding: 7px 0; }
  .text-btn { min-height: 40px; }
}
@media (max-width: 720px) { .card-actions .card-source-actions { width: auto; gap: 8px !important; } .card-actions { flex-wrap: nowrap; } }
.panel-controls .stream-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-controls .stream-controls .sort-select { flex: 1 1 100%; width: 100%; }
.panel-controls .stream-controls .ai-digest { flex: 1 1 100%; }
.panel-controls .ai-digest .btn-sm, .panel-controls .ai-digest .brief-box { width: 100%; }
#panelRangeSlot .lane-bar { display: block; overflow: visible; margin: 0; padding: 0; }
#panelRangeSlot .range-select { width: 100%; }
.drawer-region:empty { display: none; }
.ft-status.ft-full { margin-bottom: 10px; }

/* 阅读台：正文底部留白 = 底栏实测高度 + 安全区 + 16px，滚到底最后一个按钮完整可见 */
.drawer-body { padding-bottom: calc(var(--drawer-foot-h, 64px) + env(safe-area-inset-bottom) + 16px); scroll-padding-bottom: calc(var(--drawer-foot-h, 64px) + env(safe-area-inset-bottom) + 16px); }
@media (max-width: 720px) { @supports (height: 100dvh) { .reader-drawer { bottom: auto; height: 100dvh; } } }

/* ======== 筛选面板：手机底部弹出、电脑右侧滑出；条件点选即生效 ======== */
.app-container, .app-container:not(.weekly-layout):not(.sources-layout) { grid-template-columns: minmax(0, 1fr); }
.app-container:not(.full-width-layout):not(.weekly-layout):not(.sources-layout) .main-content { max-width: 980px; margin: 0 auto; width: 100%; }
aside.sidebar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; display: flex; flex-direction: column; width: min(380px, 100vw); max-height: none; padding: 0;
  background: var(--bg-card); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(100%); visibility: hidden; transition: transform .25s var(--ease), visibility 0s linear .25s; }
aside.sidebar.open { transform: none; visibility: visible; transition: transform .25s var(--ease), visibility 0s; }
body:has(aside.sidebar.open)::after { content: ""; position: fixed; inset: 0; z-index: 115; background: rgba(20, 18, 15, .5); }
body:has(aside.sidebar.open) { overflow: hidden; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; flex: 0 0 auto; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--border); }
.sheet-head b { font-size: 15px; font-weight: 600; }
.panel-reset { justify-self: start; min-height: 44px; padding: 0 8px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.panel-reset:hover { color: var(--accent); }
.sheet-close { justify-self: end; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--text-secondary); font-size: 24px; line-height: 1; cursor: pointer; border-radius: 8px; }
.panel-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 16px 16px; }
.panel-group { margin: 14px 0 0; }
.panel-group h3 { margin: 0 0 6px; font: 600 12.5px var(--font-sans); color: var(--text-muted); }
.panel-options { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-opt { min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: none; font: inherit; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.panel-opt:hover { border-color: var(--text-muted); }
.panel-opt[aria-pressed="true"] { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.panel-more { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 6px; }
.panel-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 13px; color: var(--text-muted); }
.panel-more .sidebar-card { padding: 8px 0 14px; margin-bottom: 8px; }
.panel-foot { flex: 0 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg-card); }
.panel-foot .btn-sm { width: 100%; min-height: 44px; justify-content: center; font-size: 15px; }
@media (max-width: 720px) {
  aside.sidebar { top: auto; left: 0; right: 0; width: auto; max-height: 88vh; border-left: 0; border-radius: 16px 16px 0 0; transform: translateY(100%); }
  aside.sidebar.open { transform: none; }
  body:has(aside.sidebar.open)::after { background: rgba(20, 18, 15, .6); }
}
@media (prefers-reduced-motion: reduce) { aside.sidebar, aside.sidebar.open { transition: none; } }

/* 列表头：共 N 篇 · 排序 · 详细/列表 · AI 综述 */
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 4px 0; font-size: 12.5px; color: var(--text-muted); }
.list-head[hidden], .list-head .ai-digest[hidden] { display: none; }
.list-head .heading-total { margin: 0; font: 400 12.5px var(--font-sans); }
.list-head .stream-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-left: auto; }
.list-head .sort-select { height: 32px; min-height: 32px; border: 0; background: transparent; font-size: 12.5px; color: var(--text-secondary); padding: 0 4px; width: auto; }
.list-head .view-toggle { background: none; padding: 0; gap: 2px; }
.list-head .view-toggle-btn { min-height: 32px; padding: 0 6px; font-size: 12.5px; background: none; box-shadow: none; border-radius: 6px; }
.list-head .view-toggle-btn.active { color: var(--text-primary); font-weight: 600; background: none; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }
.list-head .ai-digest.digest-idle { margin: 0; }
.list-head .ai-digest.digest-idle .btn-sm, .list-head .ai-digest.digest-idle .brief-start { border: 0; background: none; padding: 0 4px; min-height: 32px; font-size: 12.5px; color: var(--accent); box-shadow: none; }
.list-head .ai-digest.digest-idle .btn-sm:hover { text-decoration: underline; background: none; }
.list-head + .ai-digest { flex: 1 1 100%; margin: 6px 0; }
@media (max-width: 720px) {
  .list-head .sort-select, .list-head .view-toggle-btn, .list-head .ai-digest.digest-idle .btn-sm { min-height: 44px; }
  .list-head .view-toggle-btn { min-width: 44px; }
  .list-head .stream-controls { margin-left: 0; gap: 0 4px; }
}
.list-head { flex-wrap: nowrap; }
.list-head .stream-controls { flex-wrap: nowrap; flex: 0 1 auto; min-width: 0; }
.list-head .stream-controls .sort-select, .list-head .sort-select { flex: 0 0 auto; width: auto; min-width: 0; max-width: 9em; margin: 0; }
.list-head .stream-controls .ai-digest.digest-idle .btn-sm, .list-head .ai-digest.digest-idle .brief-box .btn-sm, .list-head .ai-digest.digest-idle .brief-box { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 4px !important; }
.list-head .ai-digest.digest-idle .brief-box { display: flex; align-items: center; }
.list-head .stream-controls .ai-digest.digest-idle .btn-sm { font-size: 12.5px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.list-head .heading-total { white-space: nowrap; }
.list-head { gap: 0 8px; }
.list-head .stream-controls, .list-head .stream-controls .ai-digest { gap: 0; }
.list-head .sort-select { padding: 0 14px 0 2px; background-position: right 2px center; background-size: 10px; text-overflow: clip; }
.list-head .view-toggle-btn { padding: 0 5px; }
@media (max-width: 720px) { .list-head .view-toggle-btn { min-width: 40px; } .list-head .stream-controls .ai-digest.digest-idle .btn-sm { padding: 0 2px !important; } }
.panel-group[hidden] { display: none; }
.panel-group .panel-options + .panel-options { margin-top: 8px; }
.panel-follow { margin: 8px 6px 0 0; }
.panel-group .sidebar-card, .panel-more .sidebar-card { padding: 8px 0 6px; margin: 6px 0 0; border: 0; background: none; box-shadow: none; }
.panel-group .sidebar-card .sidebar-title, .panel-more .sidebar-card .sidebar-title { font-size: 12.5px; }
.panel-foot .btn-sm[data-empty="1"] { background: var(--bg-card); color: var(--accent); border: 1px solid var(--accent); }
@media (max-width: 379px) { .app-footer > .view-toggle { display: inline-flex; align-items: center; } .app-footer .view-toggle-btn { min-height: 44px; min-width: 44px; font-size: 13px; background: none; box-shadow: none; } .app-footer .view-toggle-btn.active { color: var(--text-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; } }
.panel-group .sidebar-card, .panel-more .sidebar-card { border: 0 !important; background: none !important; box-shadow: none !important; padding: 8px 0 6px !important; }
.panel-body .filter-item-btn.active .filter-count { color: var(--on-accent); }

/* 面板里所有可选项统一成平铺小块：不显示数字，没有各组单独的重置 */
.panel-sub { margin: 14px 0 6px; font: 500 12px var(--font-sans); color: var(--text-muted); }
.panel-more .panel-sub:first-of-type { margin-top: 4px; }
.panel-body .panel-options { gap: 6px; }
.panel-body .panel-opt, .panel-body .tag-chip { display: inline-flex; align-items: center; min-height: 44px; width: auto; max-width: 100%; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: none; font: inherit; font-size: 14px; color: var(--text-secondary); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.panel-body .panel-opt[aria-pressed="true"], .panel-body .panel-opt.active, .panel-body .tag-chip.active, .panel-body .accordion-heading.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.panel-body .is-empty { opacity: .5; }
.panel-body .accordion-group { display: contents; border: 0; }
.panel-body .accordion-heading.panel-opt { padding: 0 0 0 14px; gap: 0; }
.panel-body .accordion-heading .accordion-header { display: inline-flex; align-items: center; width: auto; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: inherit; font-weight: inherit; }
.panel-body .accordion-expand-btn { width: 40px; min-height: 44px; min-width: 40px; border: 0; background: none; }
.panel-body .accordion-content { display: none; flex: 1 1 100%; padding: 2px 0 8px 10px; margin-left: 4px; border-left: 2px solid var(--border); }
.panel-body .accordion-group.open .accordion-content { display: flex; flex-wrap: wrap; }
.panel-body .panel-opt .journal-filter-label { display: inline; flex: none; }
.panel-body .panel-options[hidden], .panel-body .panel-sub[hidden] { display: none; }
/* 手机端「下载 PDF」及卡片/阅读台主按钮触控高度不低于 44px（放在文件末尾，盖过上面桌面端尺寸） */
@media (max-width: 640px) {
  .ft-dl-form.ft-dl-form button[type="submit"], .ft-dl-form.ft-dl-form input { min-height: 44px; }
  .card-top > a[data-ft-download]:not([hidden]), .card-top > .btn-sm, .card-top > .ft-status.ft-compact > .btn-sm,
  .ft-actions a[data-ft-download]:not([hidden]), .drawer-footer a[data-ft-download]:not([hidden]),
  .drawer-fulltext a[data-ft-download]:not([hidden]), .drawer-fulltext .ft-head-action .btn-sm { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; }
  .drawer-fulltext .ft-head { flex-wrap: wrap; row-gap: 6px; }
  .drawer-fulltext .ft-head .ft-line { flex: 1 1 140px; }
}
/* 口令框展开时：整行归下载区，☆精选、官网原文落到下一行 */
.card-actions:has(.ft-dl-form:not([hidden])) { flex-wrap: wrap !important; }
.card-actions .card-source-actions:has(> .ft-dl-form:not([hidden])) { flex: 1 1 100%; width: 100% !important; }

/* 全文状态与信源状态使用同一组主题色；徽标作为紧凑小圆角标签贴在元信息行后。 */
.ft-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 1px 7px; border-radius: var(--radius-full); background: var(--bg-secondary); color: var(--text-muted); font-size: 11.5px; font-weight: 600; line-height: 1.45; white-space: nowrap; }
.ft-badge-ready { color: var(--emerald); background: var(--emerald-light); }
.ft-badge-queued, .ft-badge-running, .ft-badge-verifying { color: var(--amber); background: var(--amber-light); }
.ft-badge-failed, .ft-badge-review { color: var(--rose); background: var(--rose-light); }
.ft-status.ft-full { border-left: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--text-muted); }
.ft-status.ft-ready { box-shadow: inset 3px 0 0 var(--emerald); }
.ft-full.ft-queued, .ft-full.ft-running, .ft-full.ft-verifying { box-shadow: inset 3px 0 0 var(--amber); }
.ft-full.ft-failed, .ft-full.ft-review { box-shadow: inset 3px 0 0 var(--rose); }
.ft-summary { flex-basis: 100%; font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.ft-link { border: 0; background: none; }
.drawer-fulltext { margin: 4px 0 10px; }
.drawer-fulltext:has(> [data-drawer-ft-status]:empty):has(> #drawerPdfLink[hidden]) { margin: 0; }
.drawer-fulltext .ft-status { margin-bottom: 0; }
.drawer-fulltext .ft-status.ft-full { margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.drawer-fulltext .ft-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drawer-fulltext .ft-head .ft-line { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-fulltext .ft-head-action { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; }
.drawer-fulltext .ft-head-action .btn-sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }
.drawer-fulltext .ft-head-action:empty, .drawer-fulltext .ft-dl-slot:empty { display: none; }
.drawer-fulltext .ft-dl-slot > .ft-form, .drawer-fulltext .ft-form { margin-top: 4px; }
.drawer-fulltext .ft-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--text-muted); }
.drawer-fulltext .ft-steps li { padding: 0; border: 0; border-radius: 0; background: none; }
.drawer-fulltext .ft-steps li:not(:last-child)::after { content: "→"; margin-left: 6px; color: var(--border-subtle); font-weight: 400; }
.drawer-fulltext .ft-steps li.current { color: var(--text-primary); background: none; font-weight: 600; }
.drawer-fulltext .ft-steps li.stop { color: var(--accent); background: none; font-weight: 600; }
.drawer-fulltext .ft-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.drawer-fulltext .ft-eta { display: inline; margin: 0; font-size: 12px; }
.drawer-fulltext .ft-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-fulltext .ft-link { font-size: 12px; }
.drawer-fulltext .ft-maint { margin-top: 2px; }
@media (max-width: 640px) {
  .drawer-fulltext .ft-head { flex-wrap: wrap; row-gap: 6px; }
  .drawer-fulltext .ft-head .ft-line { flex: 1 1 140px; }
  .drawer-fulltext a[data-ft-download]:not([hidden]), .drawer-fulltext .ft-head-action .btn-sm { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: auto; }
}
@media (max-width: 768px) {
  .drawer-footer .text-btn, .ft-link { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 480px) {
  html[data-style] .search-panel .search-input, .search-input { min-height: 44px; height: 44px; font-size: 16px; }
}

/* 列表改版（前端）：机器内容标签、近7天榜说明行、「未申请」灰标、AI 综述入口不再显示；☆精选 / 官网原文 / 获取全文并到右侧操作列 */
.content-label, .ql-flag, .deep-reading-label, .weekly-meta, .ft-badge-none, #aiDigest, .ai-digest { display: none !important; }
.article-card.has-side-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
.article-card.has-side-actions > .card-main { grid-column: 1; min-width: 0; }
.article-card.has-side-actions > .doi-status, .article-card.has-side-actions > .ft-status.ft-full { grid-column: 1 / -1; }
.article-card.has-side-actions > .card-side-actions { grid-column: 2; grid-row: 1; }
.card-side-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
.card-side-actions .ft-status.ft-compact { display: contents; }
.card-side-actions > .btn-sm, .card-side-actions > .ft-status > .btn-sm { margin: 0; }
.card-side-actions > .ft-form { flex-basis: auto; width: min(320px, 70vw); }
.card-side-actions .text-btn { justify-content: flex-end; white-space: nowrap; }
@media (max-width: 720px) { .article-card.has-side-actions { column-gap: 10px; } .card-side-actions .btn-sm, .card-side-actions .text-btn { min-height: 44px; } }

/* 列表右列（紧凑视图、近7天榜） */
.compact-row > .compact-main { grid-column: 1; grid-row: 1; min-width: 0; }
.compact-main .compact-title { overflow-wrap: anywhere; max-width: 100%; }
.compact-row > .compact-actions { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; flex-wrap: nowrap; gap: 4px; min-width: 0; }
.compact-actions .ft-status.ft-compact { display: contents; }
.compact-actions > .btn-sm, .compact-actions > .ft-status > .btn-sm { margin: 0; white-space: nowrap; }
.compact-actions .text-btn { justify-content: flex-end; white-space: nowrap; }
.compact-actions:has(> .ft-form:not([hidden]), > .ft-dl-form:not([hidden])) { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 8px; }
.compact-actions:has(> .ft-form:not([hidden]), > .ft-dl-form:not([hidden])) > .ft-form,
.compact-actions:has(> .ft-form:not([hidden]), > .ft-dl-form:not([hidden])) > .ft-dl-form { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; }
.compact-actions > .ft-form input { min-width: 0; max-width: 100%; }
.weekly-card-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
.weekly-card-body { min-width: 0; }
.weekly-card-actions { flex-direction: column; align-items: flex-end; flex-wrap: nowrap; margin-top: 0; padding-top: 0; min-width: 0; max-width: 7.5em; }
.weekly-card-actions .btn-sm { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.35; padding-top: 6px; padding-bottom: 6px; }
.weekly-row-actions { display: flex; flex-direction: column; align-items: flex-end; justify-self: end; }
@media (max-width: 720px) {
  .compact-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; }
  .compact-actions .btn-sm, .compact-actions .text-btn, .weekly-card-actions .btn-sm { min-height: 44px; }
}

/* =====================================================================
   文献卡片 v2：目录式 + 按宽度分档（覆盖上方旧卡片规则）
     ≤600   手机/窄外屏：单列，标题占满整宽，操作条在卡片底部一行
     601–1199  折叠内屏/三折（含近正方形）：右侧横排操作，间距按宽度夹紧
     ≥1200  桌面
   横屏矮屏（高 ≤540）仍用单列底栏，避免横置手机被当成桌面。
   ===================================================================== */

.articles-stream,
#weeklyAuto,
#streamSection,
.weekly-board {
  container-type: inline-size;
  container-name: list;
}

/* ---- 日期分组：细线，不要蓝竖条 ---- */
html[data-style] .articles-stream .day-heading {
  display: flex; align-items: baseline; gap: 8px;
  margin: clamp(20px, 4cqi, 36px) 0 0; padding: 0 0 10px;
  border: 0; border-bottom: 1px solid var(--text-primary);
  font: 600 13px/1.4 var(--font-sans); letter-spacing: .02em; color: var(--text-primary);
}
html[data-style] .articles-stream .day-heading:first-child { margin-top: 8px; }
html[data-style] .articles-stream .day-heading small {
  font-size: 12px; font-weight: 400; color: var(--text-muted); letter-spacing: 0;
}

/* ---- 默认（手机档，≤600）：单列，底栏横排 ---- */
html[data-style] .article-card.has-side-actions {
  position: relative; isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  column-gap: 0; align-items: start;
  margin: 0; padding: 16px 0 8px;
  background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none;
}
.article-card.has-side-actions > .card-main,
.article-card.has-side-actions .card-main {
  min-width: 0; max-width: none; grid-column: 1;
}
html[data-style] .article-card.has-side-actions .card-top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 0;
  margin: 0 0 4px; font-size: 12px; line-height: 18px;
}
html[data-style] .article-card.has-side-actions .journal-badge {
  padding: 0; border: 0; background: none; border-radius: 0;
  font: 600 12px/18px var(--font-sans); letter-spacing: .01em; text-transform: none;
  color: var(--text-secondary); overflow-wrap: anywhere; max-width: 100%;
}
html[data-style] .article-card.has-side-actions .date-badge {
  font: 400 12px/18px var(--font-sans); font-variant-numeric: tabular-nums;
  color: var(--text-muted); white-space: nowrap;
}
html[data-style] .article-card.has-side-actions .date-badge::before {
  content: "·"; margin: 0 6px; color: var(--border-subtle);
}
html[data-style] .article-card.has-side-actions .article-title {
  margin: 0; font: 600 clamp(16px, 2.8cqi + 14px, 17px)/1.5 var(--font-sans);
  letter-spacing: 0; color: var(--text-primary);
}
.article-card.has-side-actions .title-open { display: block; width: 100%; padding: 0; text-align: left; overflow-wrap: anywhere; }
/* long-title: keep keyboard focus inside the card. */
.article-card.has-side-actions .title-open:focus-visible { outline-offset: -2px; }
.article-card.has-side-actions .title-open:hover { color: var(--accent); text-decoration: none; }
.article-card.has-side-actions .article-title-en,
.article-card.has-side-actions .article-title-en-hit {
  margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted);
}
.article-card.has-side-actions .article-title-en,
.compact-row .article-title-en {
  display: block; overflow-wrap: anywhere; white-space: normal;
  font-family: var(--font-sans); font-weight: 400;
}
/* Only subtitles longer than two lines receive an expansion button. */
.article-title-en > span { display: block; }
.article-title-en[data-collapsed] > span {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.article-title-en > button {
  display: block; padding: 0; border: 0; background: transparent; color: var(--accent);
  font: inherit; text-decoration: underline; cursor: pointer;
}
html[data-style] .article-card.has-side-actions .article-gist {
  margin: 6px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.article-card.has-side-actions .content-label,
.article-card.has-side-actions .card-side-actions .ft-summary,
.article-card.has-side-actions .card-side-actions .fulltext-state:not(.fulltext-review),
.article-card.has-side-actions .card-side-actions .ft-badge { display: none !important; }

.article-card.has-side-actions .card-side-actions {
  display: flex; flex-direction: row !important; align-items: center; justify-content: flex-end;
  flex-wrap: nowrap;
  grid-column: 1 !important; grid-row: auto !important;
  gap: 0; margin: 8px 0 0; white-space: nowrap; min-width: 0;
}
.card-side-actions .ft-status.ft-compact { display: inline-flex; align-items: center; gap: 4px; }
.card-side-actions .card-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text-muted); cursor: pointer;
  transition: background .12s, color .12s; flex: 0 0 auto;
}
.card-side-actions .card-icon-btn svg { width: 20px; height: 20px; }
.card-side-actions .card-icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.card-side-actions .card-icon-btn.active,
.card-side-actions .card-icon-btn[aria-pressed="true"] { color: var(--amber); }
.article-card.has-side-actions .card-side-actions .text-btn,
.article-card.has-side-actions .card-side-actions .text-btn.card-source {
  min-height: 44px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; font-weight: 400; color: var(--text-muted); text-decoration: none;
  justify-content: center;
}
.article-card.has-side-actions .card-side-actions .text-btn:hover {
  background: var(--bg-secondary); color: var(--text-primary); text-decoration: none;
}
html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm,
html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; height: 44px; padding: 0 16px; margin: 0 0 0 6px;
  font: 600 15px/1 var(--font-sans); letter-spacing: .02em;
  color: var(--accent); background: var(--accent-light);
  border: 1px solid transparent; border-radius: 8px; box-shadow: none; text-decoration: none;
  flex: 0 0 auto;
}
html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm:hover,
html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:hover {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-card));
  color: var(--accent-hover); border-color: transparent;
}
.article-card.has-side-actions .card-side-actions:has(.ft-form:not([hidden]), .ft-dl-form:not([hidden])) {
  flex-wrap: wrap; max-width: none; white-space: normal;
}
.card-side-actions .ft-form, .card-side-actions .ft-dl-form { flex: 1 1 100%; margin-top: 6px; width: min(320px, 100%); }

@container list (max-width: 359px) {
  html[data-style] .article-card.has-side-actions { padding: 14px 0 6px; }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 16px; }
  .article-card.has-side-actions .card-side-actions .text-btn { padding: 0 8px; font-size: 13px; }
  html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm,
  html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:not([hidden]) {
    padding: 0 12px; font-size: 14px; margin-left: 2px;
  }
}
@media (max-width: 359px) {
  html[data-style] .article-card.has-side-actions { padding: 14px 0 6px; }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 16px; }
}

/* ---- 折叠档 601–1199：右侧横排操作，与标题齐平；不是拉宽的手机，也不是压窄的桌面 ---- */
@container list (min-width: 601px) {
  html[data-style] .article-card.has-side-actions {
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: clamp(16px, 3cqi, 28px);
    padding: 14px 0 16px;
  }
  .article-card.has-side-actions .card-main { max-width: 42em; }
  html[data-style] .article-card.has-side-actions .card-top { margin-bottom: 6px; font-size: 12.5px; }
  html[data-style] .article-card.has-side-actions .journal-badge,
  html[data-style] .article-card.has-side-actions .date-badge { font-size: 12.5px; line-height: 18px; }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 16.5px; }
  .article-card.has-side-actions .article-title-en,
  .article-card.has-side-actions .article-title-en-hit { font-size: 13px; }
  html[data-style] .article-card.has-side-actions .article-gist {
    font-size: 14px; -webkit-line-clamp: 2;
  }
  .article-card.has-side-actions .card-side-actions {
    grid-column: 2 !important; grid-row: 1 !important; flex-direction: row !important;
    margin-top: 20px; gap: 4px;
  }
  .card-side-actions .card-icon-btn { width: 32px; height: 32px; border-radius: 6px; }
  .card-side-actions .card-icon-btn svg { width: 18px; height: 18px; }
  .article-card.has-side-actions .card-side-actions .text-btn { min-height: 32px; padding: 0 8px; font-size: 13px; border-radius: 6px; }
  html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm,
  html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:not([hidden]) {
    min-height: 32px; height: 32px; padding: 0 14px; margin-left: 4px;
    font-size: 13px; border-radius: 6px;
  }
  .article-card.has-side-actions .card-side-actions:has(.ft-form:not([hidden]), .ft-dl-form:not([hidden])) { max-width: 320px; }
}
@media (min-width: 601px) {
  html[data-style] .article-card.has-side-actions {
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: clamp(16px, 2.4vw, 28px);
    padding: 14px 0 16px;
  }
  .article-card.has-side-actions .card-main { max-width: 42em; }
  html[data-style] .article-card.has-side-actions .article-gist { font-size: 14px; -webkit-line-clamp: 2; }
  .article-card.has-side-actions .card-side-actions {
    grid-column: 2 !important; grid-row: 1 !important; flex-direction: row !important;
    margin-top: 20px; gap: 4px;
  }
  .card-side-actions .card-icon-btn { width: 32px; height: 32px; border-radius: 6px; }
  .card-side-actions .card-icon-btn svg { width: 18px; height: 18px; }
  .article-card.has-side-actions .card-side-actions .text-btn { min-height: 32px; padding: 0 8px; font-size: 13px; border-radius: 6px; }
  html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm,
  html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:not([hidden]) {
    min-height: 32px; height: 32px; padding: 0 14px; margin-left: 4px;
    font-size: 13px; border-radius: 6px;
  }
}

/* 三折全开（约 10 寸）：更从容，但仍比桌面紧 */
@container list (min-width: 1024px) {
  html[data-style] .article-card.has-side-actions { padding: 18px 0 20px; column-gap: clamp(20px, 3cqi, 28px); }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 17px; }
  .article-card.has-side-actions .card-main { max-width: 46em; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  html[data-style] .article-card.has-side-actions { padding: 18px 0 20px; }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 17px; }
}

/* 桌面 ≥1200 */
@container list (min-width: 1200px) {
  html[data-style] .article-card.has-side-actions { padding: 20px 0 22px; column-gap: 32px; }
  html[data-style] .article-card.has-side-actions .article-title { font-size: 17px; }
  .article-card.has-side-actions .card-main { max-width: 46em; }
}
@media (min-width: 1200px) {
  html[data-style] .article-card.has-side-actions { padding: 20px 0 22px; column-gap: 32px; }
}
@media (hover: hover) and (min-width: 601px) and (min-height: 541px) {
  html[data-style] .article-card.has-side-actions::before {
    content: ""; display: block; position: absolute; inset: 0 -16px; z-index: -1;
    background: var(--bg-card); border-radius: 8px; opacity: 0; transition: opacity .15s;
  }
  html[data-style] .article-card.has-side-actions:hover::before { opacity: 1; }
}

/* 近正方形内屏：收紧垂直节奏 */
@media (min-width: 601px) and (max-width: 920px) and (max-height: 950px) {
  html[data-style] .articles-stream .day-heading { margin-top: 22px; padding-bottom: 8px; }
  html[data-style] .article-card.has-side-actions { padding: 12px 0 14px; }
  .article-card.has-side-actions .card-side-actions { margin-top: 16px; }
}

/* 横屏矮屏：单列底栏 */
@media (max-height: 540px) {
  html[data-style] .article-card.has-side-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 10px 0 6px; column-gap: 0;
  }
  .article-card.has-side-actions .card-main { max-width: none; }
  html[data-style] .article-card.has-side-actions .article-gist { -webkit-line-clamp: 2; margin-top: 4px; }
  .article-card.has-side-actions .card-side-actions {
    grid-column: 1 !important; grid-row: auto !important; flex-direction: row !important; margin-top: 4px;
  }
  .card-side-actions .card-icon-btn { width: 40px; height: 40px; }
  .article-card.has-side-actions .card-side-actions .text-btn { min-height: 40px; }
  html[data-style] .article-card.has-side-actions .card-side-actions .btn-sm,
  html[data-style] .article-card.has-side-actions .card-side-actions a[data-ft-download]:not([hidden]) {
    min-height: 40px; height: 40px;
  }
  html[data-style] .articles-stream .day-heading { margin-top: 16px; }
}

/* =====================================================================
   近 7 天榜：与列表同一套目录式节奏（原先卡片样式未覆盖到这里）
   ===================================================================== */
html[data-style] .weekly-head .next-title {
  font: 600 17px/1.4 var(--font-sans); color: var(--text-primary);
}
html[data-style] .weekly-head .weekly-total { font-weight: 400; color: var(--text-muted); font-size: 13px; }
html[data-style] #weeklyAuto .weekly-group-title {
  display: flex; align-items: baseline; gap: 8px;
  margin: 28px 0 0; padding: 0 0 10px;
  border: 0; border-bottom: 1px solid var(--text-primary);
  font: 600 13px/1.4 var(--font-sans); color: var(--text-primary);
}
html[data-style] #weeklyAuto .weekly-group-title span { font-weight: 400; color: var(--text-muted); font-size: 12px; }
html[data-style] #weeklyAuto .weekly-card-grid {
  display: flex; flex-direction: column; gap: 0;
  margin: 0; padding: 0;
}
html[data-style] #weeklyAuto .weekly-card-grid .weekly-auto-item,
html[data-style] #weeklyAuto .next-item.weekly-auto-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px;
  margin: 0; padding: 16px 0 12px;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: none; box-shadow: none; align-items: start;
}
html[data-style] #weeklyAuto .weekly-rank {
  font: 600 13px/1.4 var(--font-sans); color: var(--text-muted);
  background: none; width: auto; min-width: 1.5em; padding: 4px 0 0; border-radius: 0;
}
html[data-style] #weeklyAuto .weekly-card-content { display: flex; flex-direction: column; align-items: stretch; min-width: 0; width: 100%; }
html[data-style] #weeklyAuto .weekly-card-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px;
  margin: 0 0 4px; font-size: 12px; color: var(--text-muted);
}
html[data-style] #weeklyAuto .weekly-card-meta .journal-badge {
  padding: 0; border: 0; background: none; border-radius: 0;
  font: 600 12px/18px var(--font-sans); letter-spacing: .01em; text-transform: none;
  color: var(--text-secondary);
}
html[data-style] #weeklyAuto .weekly-card-meta .date-badge {
  font: 400 12px/18px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-muted);
}
html[data-style] #weeklyAuto .weekly-auto-title {
  margin: 0; font: 600 17px/1.5 var(--font-sans); color: var(--text-primary);
}
html[data-style] #weeklyAuto .weekly-auto-title .title-open { display: block; width: 100%; padding: 0; text-align: left; }
html[data-style] #weeklyAuto .weekly-auto-title .title-open:hover { color: var(--accent); text-decoration: none; }
html[data-style] #weeklyAuto .weekly-auto-en {
  margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
html[data-style] #weeklyAuto .weekly-auto-line {
  margin: 6px 0 0; font-size: 14px; line-height: 1.65; color: var(--text-secondary);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
html[data-style] #weeklyAuto .weekly-card-actions {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-end;
  flex-wrap: nowrap; gap: 4px; margin: 8px 0 0; padding: 0;
}
html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text-muted); box-shadow: none; appearance: none; -webkit-appearance: none;
}
html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn svg { width: 20px; height: 20px; }
html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn.active,
html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn[aria-pressed="true"] { color: var(--amber); }
html[data-style] #weeklyAuto .weekly-card-actions .btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; height: 44px; padding: 0 16px; margin: 0;
  font: 600 14px/1 var(--font-sans); color: var(--accent);
  background: var(--accent-light); border: 0; border-radius: 8px; box-shadow: none; white-space: nowrap;
}
html[data-style] #weeklyAuto .weekly-card-actions .btn-sm:hover {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-card)); color: var(--accent-hover);
}
html[data-style] #weeklyAuto .content-label { display: none !important; }

@media (min-width: 601px) {
  html[data-style] #weeklyAuto .weekly-card-grid .weekly-auto-item,
  html[data-style] #weeklyAuto .next-item.weekly-auto-item { padding: 14px 0 14px; gap: 10px 16px; }
  html[data-style] #weeklyAuto .weekly-auto-title { font-size: 16.5px; }
  html[data-style] #weeklyAuto .weekly-card-actions .btn-sm { min-height: 32px; height: 32px; font-size: 13px; padding: 0 14px; border-radius: 6px; }
  html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn { width: 32px; height: 32px; border-radius: 6px; }
  html[data-style] #weeklyAuto .weekly-card-actions .card-icon-btn svg { width: 18px; height: 18px; }
}
@media (min-width: 1024px) {
  html[data-style] #weeklyAuto .weekly-auto-title { font-size: 17px; }
  html[data-style] #weeklyAuto .weekly-card-grid .weekly-auto-item,
  html[data-style] #weeklyAuto .next-item.weekly-auto-item { padding: 18px 0 16px; }
}
@media (min-width: 601px) and (max-width: 920px) and (max-height: 950px) {
  html[data-style] #weeklyAuto .weekly-card-grid .weekly-auto-item,
  html[data-style] #weeklyAuto .next-item.weekly-auto-item { padding: 12px 0; }
  html[data-style] #weeklyAuto .weekly-group-title { margin-top: 20px; }
}

/* 英文原题：手机档（≤600）不显示，更宽显示浅色副标题 */
@media (max-width: 600px) {
  .article-card.has-side-actions .article-title-en,
  .article-card.has-side-actions .article-title-en-hit,
  html[data-style] #weeklyAuto .weekly-auto-en { display: none !important; }
}
@container list (max-width: 600px) {
  .article-card.has-side-actions .article-title-en,
  .article-card.has-side-actions .article-title-en-hit,
  html[data-style] #weeklyAuto .weekly-auto-en { display: none !important; }
}
/* 研究类型小标签与近 7 天榜同一套 .design-pill */
html[data-style] .article-card.has-side-actions .card-top .design-pill { margin-left: 8px; flex: 0 0 auto; }

/* ===== fix1 / 预览反馈 ===== */

/* 5. 搜索放大镜放到页签行右侧，点开再展开搜索框；空工具行不占位 */
header.app-header .header-container {
  display: flex; align-items: center; gap: 0;
}
header.app-header .search-toggle {
  margin-left: auto; flex: 0 0 auto;
  width: 44px; height: 44px; color: var(--text-secondary);
}
header.app-header .search-toggle:hover,
header.app-header .search-toggle.active { color: var(--accent); background: var(--bg-secondary); }
.tool-row > :empty { display: none; }
.tool-row:not(:has(> :not([hidden]))) { display: none; }
.tool-bar:not(:has(.search-panel:not([hidden]))):not(:has(.quick-bar:not([hidden]))):not(:has(.qf-summary:not([hidden]))):not(:has(.tool-row > :not([hidden]))) { display: none; }
@media (max-width: 720px) {
  html[data-style] .header-container {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    height: auto;
    min-height: 48px;
    padding: 0 6px 0 8px;
    grid-template-columns: none;
    grid-template-areas: none;
  }
  html[data-style] .header-nav {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    grid-template-columns: none;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  html[data-style] .header-nav .nav-tab-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 44px;
    padding: 0 4px;
    font-size: 13px;
    justify-content: center;
  }
}

/* 2. 分类 chip 选中态：浅蓝底 + 蓝字，保证对比度（不改筛选抽屉） */
html[data-style] .weekly-category-nav button[aria-pressed="true"] {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
html[data-style] .weekly-category-nav button[aria-pressed="true"] span {
  color: var(--accent);
  opacity: 1;
}
html[data-style] .lane-chip.active,
html[data-style] .day-bar .lane-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
html[data-style] .lane-chip.active small { color: inherit; opacity: .75; }

/* 3. 详细|列表挪到标题行，chip 行独占全宽，不再被挡住 */
html[data-style] .weekly-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px;
}
html[data-style] .weekly-head .next-title { margin: 0; flex: 1 1 auto; min-width: 0; }
html[data-style] .weekly-head .weekly-view-toggle { flex: 0 0 auto; margin-left: auto; }
html[data-style] .weekly-bar {
  display: block;
  justify-content: unset;
  min-width: 0;
  max-width: 100%;
}
html[data-style] .weekly-category-nav {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
  padding-right: 20px;
}
@media (min-width: 900px) {
  html[data-style] .weekly-category-nav {
    mask-image: none;
    -webkit-mask-image: none;
    padding-right: 0;
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* 1. 列表（紧凑行）与近7天榜共用卡片操作条：☆、官网、浅蓝「获取全文」 */
.compact-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0; }
.compact-row .card-side-actions,
.weekly-auto-item .card-side-actions,
.weekly-row .card-side-actions {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-end;
  flex-wrap: nowrap; gap: 0; margin: 8px 0 0; white-space: nowrap; min-width: 0;
}
.compact-row .card-side-actions .ft-status.ft-compact,
.weekly-auto-item .card-side-actions .ft-status.ft-compact,
.weekly-row .card-side-actions .ft-status.ft-compact { display: inline-flex; align-items: center; gap: 4px; }
.compact-row .article-title-en { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.compact-row .card-icon-btn,
.weekly-row .card-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text-muted); cursor: pointer; flex: 0 0 auto;
}
.compact-row .card-icon-btn.active,
.compact-row .card-icon-btn[aria-pressed="true"],
.weekly-row .card-icon-btn.active,
.weekly-row .card-icon-btn[aria-pressed="true"] { color: var(--amber); }
html[data-style] .compact-row .card-side-actions .text-btn,
html[data-style] .weekly-auto-item .card-side-actions .text-btn,
html[data-style] .weekly-row .card-side-actions .text-btn {
  min-height: 44px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; font-weight: 400; color: var(--text-muted); text-decoration: none;
  justify-content: center;
}
html[data-style] .compact-row .card-side-actions .btn-sm,
html[data-style] .compact-row .card-side-actions a[data-ft-download]:not([hidden]),
html[data-style] .weekly-auto-item .card-side-actions .btn-sm,
html[data-style] .weekly-auto-item .card-side-actions a[data-ft-download]:not([hidden]),
html[data-style] .weekly-row .card-side-actions .btn-sm,
html[data-style] .weekly-row .card-side-actions a[data-ft-download]:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; height: 44px; padding: 0 16px; margin: 0 0 0 6px;
  font: 600 15px/1 var(--font-sans); letter-spacing: .02em;
  color: var(--accent); background: var(--accent-light);
  border: 1px solid transparent; border-radius: 8px; box-shadow: none; text-decoration: none;
  flex: 0 0 auto;
}
html[data-style] .compact-row { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; margin: 0; padding: 16px 0 8px; }
html[data-style] .compact-row:hover { background: none; }
html[data-style] .articles-compact-list { container-type: inline-size; container-name: list; }
@media (max-width: 600px) {
  .compact-row .article-title-en { display: none !important; }
  html[data-style] .weekly-row {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 16px 0 8px;
  }
  html[data-style] .weekly-row .card-side-actions { grid-column: 1 / -1; }
}
@media (min-width: 601px) {
  .compact-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(16px, 2.4vw, 28px); padding: 14px 0 16px; align-items: start; }
  .compact-row .card-side-actions,
  .weekly-row .card-side-actions { margin-top: 20px; }
  .compact-row .card-icon-btn,
  .weekly-row .card-icon-btn { width: 32px; height: 32px; border-radius: 6px; }
  html[data-style] .compact-row .card-side-actions .text-btn,
  html[data-style] .weekly-row .card-side-actions .text-btn,
  html[data-style] .weekly-auto-item .card-side-actions .text-btn { min-height: 32px; padding: 0 8px; font-size: 13px; }
  html[data-style] .compact-row .card-side-actions .btn-sm,
  html[data-style] .compact-row .card-side-actions a[data-ft-download]:not([hidden]),
  html[data-style] .weekly-auto-item .card-side-actions .btn-sm,
  html[data-style] .weekly-auto-item .card-side-actions a[data-ft-download]:not([hidden]),
  html[data-style] .weekly-row .card-side-actions .btn-sm,
  html[data-style] .weekly-row .card-side-actions a[data-ft-download]:not([hidden]) {
    min-height: 32px; height: 32px; padding: 0 14px; font-size: 13px; border-radius: 6px;
  }
  html[data-style] .weekly-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
}

/* 4+6. 阅读台：首屏顺序、底部操作栏与列表一致 */
html[data-style] .drawer-title-en {
  margin: 0 0 6px; font: 600 clamp(18px, 4.2vw, 22px)/1.4 var(--font-sans); color: var(--text-primary);
}
html[data-style] .drawer-title-zh {
  margin: 0 0 10px; font: 400 15px/1.5 var(--font-sans); color: var(--text-secondary);
}
html[data-style] .drawer-takeaway {
  margin: 0 0 14px; font-size: 15.5px; line-height: 1.65; color: var(--text-primary);
}
html[data-style] .drawer-header #drawerJournalBadges {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0;
  font-size: 12px; line-height: 18px;
}
html[data-style] .drawer-header .journal-badge {
  padding: 0; border: 0; background: none; border-radius: 0;
  font: 600 12px/18px var(--font-sans); text-transform: none; letter-spacing: .01em; color: var(--text-secondary);
}
html[data-style] .drawer-header .date-badge { font: 400 12px/18px var(--font-sans); color: var(--text-muted); }
html[data-style] .abstract-reader .drawer-section-title { margin-bottom: 8px; }
html[data-style] .abs-tabs {
  display: inline-flex; align-items: center; gap: 2px; margin: 0 0 10px;
  padding: 2px; border-radius: 8px; background: var(--bg-secondary);
}
html[data-style] .abs-tab {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 6px;
  background: none; color: var(--text-muted); font: 600 13px/1 var(--font-sans); cursor: pointer;
}
html[data-style] .abs-tab.is-active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html[data-style] .abs-panel p,
html[data-style] .abstract-reader .structured-abstract p { margin: 0 0 12px; font-size: 16px; line-height: 1.8; }
html[data-style] .ft-hint {
  margin: 8px 0 0; padding: 0; border: 0; background: none;
  font-size: 12.5px; line-height: 1.55; color: var(--text-muted);
}
html[data-style] .drawer-fulltext { margin: 8px 0 0; }
html[data-style] .drawer-bylines { margin: 12px 0 0; font-size: 13px; color: var(--text-secondary); }
html[data-style] .drawer-bylines > summary {
  cursor: pointer; list-style: none; min-height: 32px; display: flex; align-items: center;
  color: var(--text-secondary);
}
html[data-style] .drawer-bylines > summary::-webkit-details-marker { display: none; }
html[data-style] .drawer-bylines > summary::after { content: " ▾"; color: var(--text-muted); font-size: 10px; }
html[data-style] .drawer-bylines[open] > summary::after { content: " ▴"; }
html[data-style] .drawer-bylines-full { margin: 6px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); }
html[data-style] .drawer-bylines-full p { margin: 0 0 6px; line-height: 1.65; }
html[data-style] .drawer-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
html[data-style] .metric-details { margin: 12px 0 0; font-size: 13px; }
html[data-style] .metric-details > summary { cursor: pointer; color: var(--text-secondary); min-height: 32px; }

/* 阅读台底栏：☆ + 官网 + 浅蓝获取全文，一行固定 */
html[data-style] .drawer-footer,
html[data-style] .reader-drawer .drawer-footer {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  grid-template-columns: none;
}
html[data-style] .drawer-footer .card-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text-muted); flex: 0 0 auto;
}
html[data-style] .drawer-footer .card-icon-btn.active,
html[data-style] .drawer-footer .card-icon-btn[aria-pressed="true"] { color: var(--amber); }
html[data-style] .drawer-footer .text-btn.card-source,
html[data-style] .drawer-footer #drawerExternalLink {
  min-height: 44px; padding: 0 10px; margin-left: 0; flex: 0 0 auto;
  color: var(--text-muted); font-size: 14px; font-weight: 400;
}
html[data-style] .drawer-footer #drawerCopyShareBtn { flex: 0 0 auto; min-height: 44px; order: 0; font-size: 13px; color: var(--text-muted); }
html[data-style] .drawer-ft-slot {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end;
}
html[data-style] .drawer-footer .btn-sm,
html[data-style] .drawer-footer a.btn-sm,
html[data-style] .drawer-footer #drawerPdfLink:not([hidden]),
html[data-style] .drawer-ft-slot .btn-sm,
html[data-style] .drawer-ft-slot a[data-ft-download]:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; height: 44px; padding: 0 16px; margin: 0;
  font: 600 15px/1 var(--font-sans);
  color: var(--accent) !important; background: var(--accent-light) !important;
  border: 1px solid transparent !important; border-radius: 8px; box-shadow: none;
  text-decoration: none; flex: 0 0 auto; width: auto !important;
  grid-column: auto;
}
html[data-style] .drawer-footer .ft-form { flex: 1 1 100%; width: 100%; margin-top: 4px; }
html[data-style] .drawer-footer #drawerInstitutionLoginLink,
html[data-style] .drawer-footer #drawerInstitutionLink { flex-basis: 100%; margin-left: 0; }

@media (min-width: 721px) {
  html[data-style] .drawer-footer { padding: 10px 22px; }
}

/* compact 列表在 ≤600 必须单列底栏，压过旧的两列规则 */
@media (max-width: 600px) {
  html[data-style] .compact-row,
  .compact-row,
  html[data-style="a"] .compact-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    column-gap: 0 !important;
    padding: 16px 0 8px !important;
    margin: 0 !important;
    background: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html[data-style] .compact-row .card-side-actions,
  .compact-row .card-side-actions,
  html[data-style] .weekly-row .card-side-actions {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin-top: 8px !important;
    justify-content: flex-end;
  }
  html[data-style] .articles-compact-list .day-heading,
  html[data-style="a"] .articles-compact-list .day-heading {
    margin: clamp(20px, 4cqi, 36px) 0 0 !important;
    padding: 0 0 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--text-primary) !important;
    font: 600 13px/1.4 var(--font-sans) !important;
    letter-spacing: .02em;
  }
  html[data-style] .compact-row .journal-badge,
  html[data-style="a"] .compact-row .journal-badge {
    padding: 0; border: 0; background: none; border-radius: 0;
    font: 600 12px/18px var(--font-sans); letter-spacing: .01em; text-transform: none;
    color: var(--text-secondary);
  }
  html[data-style] .compact-title { font: 600 16px/1.5 var(--font-sans); color: var(--text-primary); }
}


/* ===== fix2 / 快捷筛选条 ===== */
#toolRow { display: none !important; }
#filterToggleBtn { display: none !important; }
.quick-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 6px;
  min-width: 0;
}
.qf-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.qf-chips::-webkit-scrollbar { display: none; }
.qf-chips.qf-fade {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.qf-chip, .qf-scope {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  font: 13px/1.2 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
.qf-scope { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.qf-chip.is-on, .qf-scope.is-on,
html[data-style="a"] .qf-chip.is-on,
html[data-style="a"] .qf-scope.is-on {
  background: var(--accent-light);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.qf-caret { font-size: 10px; margin-left: 1px; opacity: .7; }
.qf-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  padding: 0 0 8px;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 28px;
}
.qf-sum-item, .qf-sum-action {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 2px;
  min-height: 32px;
}
.qf-dot { color: var(--text-tertiary, #8a93a3); padding: 0 4px; }
.qf-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 60, .28);
  z-index: 79;
  /* Non-modal popover: keep mobile visual scrim without blocking #quickBar toggles or page controls. */
  pointer-events: none;
}
.qf-pop {
  position: fixed;
  z-index: 80;
  background: var(--bg-card, #fff);
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(15, 30, 60, .16);
  border: 1px solid var(--border);
  overflow: auto;
  padding: 0 0 12px;
}
.qf-pop.is-sheet {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto !important;
  max-width: none !important;
  max-height: 80vh;
  border-radius: 16px 16px 0 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.qf-pop:not(.is-sheet) {
  border-radius: 12px;
  max-height: 70vh;
}
.qf-pop.is-inline {
  position: relative;
  z-index: auto;
  box-sizing: border-box;
  width: min(420px, calc(100% - 32px));
  max-height: min(260px, 34vh);
  margin: 0 auto;
  box-shadow: none;
}
.qf-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card, #fff);
  padding: 12px 14px 8px;
  z-index: 1;
}
.qf-pop-head strong { font-size: 15px; font-weight: 650; }
.qf-pop-close {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  cursor: pointer;
}
.qf-search-wrap { padding: 0 14px 8px; }
.qf-search {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 15px;
  background: var(--bg-card, #fff);
  color: var(--text-primary);
}
.qf-search::placeholder { color: var(--text-muted); opacity: 1; }
.qf-hint, .qf-empty {
  margin: 0 14px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
/* ==== topic multi-tag ==== */
.qf-pop.is-inline:has(.topic-picker) {
  max-height: min(424px, 48vh);
}
.topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding: 0 10px;
}
.topic-options .qf-opt {
  justify-content: flex-start;
  min-height: 36px;
  overflow-wrap: anywhere;
}
.topic-options .qf-opt.is-empty,
.qf-chip-main.is-empty {
  opacity: .55;
}
.topic-options .qf-opt:disabled {
  opacity: .55;
  cursor: default;
}
.topic-group {
  margin: 7px 0 0;
  border-top: 1px solid var(--border);
}
.topic-group h4 span {
  margin-inline-start: 6px;
  color: var(--text-muted);
  font-weight: 400;
}
.topic-summary, .topic-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}
.topic-badges {
  gap: 4px;
  margin-top: 6px;
  max-width: 100%;
}
.topic-badge, .topic-badge-more {
  max-width: 100%;
  padding: 3px 7px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.topic-badge {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.topic-badge:hover, .topic-badge[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}
/* ==== end topic multi-tag ==== */
.qf-sec { padding: 4px 0 8px; }
.qf-sec h4, .qf-pop h4 {
  margin: 10px 14px 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
}
.qf-jrow {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
}
.qf-jrow.is-on { background: var(--accent-light); }
.qf-jstar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}
.qf-jstar.is-starred { color: var(--accent); }
.qf-jname {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
  padding: 0 8px 0 0;
}
.qf-jname small, .qf-opt small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
}
.qf-jlabel { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qf-jname small { flex: 0 0 auto; white-space: nowrap; }
.qf-jname small:last-child { min-width: 4ch; text-align: right; }
.qf-jname:disabled { cursor: default; }
.qf-opt-list { display: flex; flex-direction: column; padding: 0 8px; }
.qf-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 14px;
  color: inherit;
  cursor: pointer;
}
.qf-opt.is-on,
html[data-style="a"] .qf-opt.is-on {
  background: var(--accent-light);
  color: var(--accent);
}
.qf-preset-row { display: flex; align-items: center; }
.qf-preset-row .qf-opt { flex: 1; }
.qf-preset-del {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
}
@media (min-width: 601px) {
  .qf-chip, .qf-scope { min-height: 34px; }
  .qf-jstar, .qf-jname, .qf-opt { min-height: 36px; }
  .qf-backdrop { background: transparent; }
  .qf-scope { max-width: 28vw; }
}


/* ===== fix3 / 期刊档次条 ===== */
#curatedTopicsSlot, #laneBar.topic-bar { display: none !important; }
.qf-chip, .qf-scope {
  position: relative;
  min-height: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 30px;
  gap: 0;
}
.qf-chip::after, .qf-scope::after, .qf-chip-caret::after, .qf-chip-main::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  min-width: 44px;
  height: 44px;
}
.qf-split {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: visible;
  position: relative;
  background: var(--bg-card, #fff);
  height: 30px;
}
.qf-split .qf-chip {
  border: 0;
  background: transparent;
  height: 30px;
  min-height: 30px;
}
/* Extend the hit area vertically without covering the other half of the split control. */
.qf-split .qf-chip::after { min-width: 0; }
.qf-split .qf-chip-main { padding: 0 4px 0 10px; border-radius: 999px 0 0 999px; }
.qf-split .qf-chip-caret { padding: 0 8px 0 2px; border-radius: 0 999px 999px 0; min-width: 24px; }
.qf-split.is-on,
html[data-style="a"] .qf-split.is-on {
  background: var(--accent-light);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.qf-split.is-on .qf-chip,
html[data-style="a"] .qf-split.is-on .qf-chip {
  color: var(--accent);
  background: transparent;
}
.qf-suggested {
  color: var(--accent);
  font-size: 11px;
  min-width: 2em;
  font-weight: 650;
}
.qf-jrow.is-empty .qf-jname { opacity: .55; }
.qf-pop-actions { padding: 0 8px 4px; }
@media (max-width: 600px) {
  .quick-bar { gap: 6px; flex-wrap: wrap; }
  .qf-scope { max-width: 100%; flex: 0 1 auto; min-width: 0; padding: 0 8px; }
  .qf-chips { gap: 6px; flex: 1 1 100%; width: 100%; }
}

/* 摘要明显不完整时的提示（只在判定为只有结论段时出现） */
.abs-incomplete-note { margin: 6px 0 0; font-size: 11.5px; color: var(--text-muted); }

/* Deferred data loading status */
.data-loading-note { padding: 24px 0; color: var(--text-muted); font-size: 14px; }
.data-loading-note .btn-sm { margin-left: 8px; }
.sources-grid .data-loading-note { grid-column: 1 / -1; padding: 20px 0; }

/* 本浏览器申请记录 & 页脚自适应 */
.app-footer { flex-wrap: wrap; gap: 8px; }
.requests-btn { gap: 6px; }
.req-disclosure {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-subtle, rgba(27, 79, 156, 0.06));
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.req-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-card);
}
.req-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.req-item-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}
.req-status-badge {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
}
.req-status-ready { background: rgba(16, 185, 129, 0.14); color: #059669; }
html[data-theme="dark"] .req-status-ready { color: #34d399; }
.req-status-failed, .req-status-manual_needed, .req-status-review { background: rgba(239, 68, 68, 0.14); color: #dc2626; }
html[data-theme="dark"] .req-status-failed, html[data-theme="dark"] .req-status-manual_needed, html[data-theme="dark"] .req-status-review { color: #f87171; }
.req-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.req-item-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.req-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.doi-library-notice .btn-sm { margin-left: 6px; margin-top: 4px; }

/* ==== reading mode ==== */
#drawerExpandBtn { flex: 0 0 auto; margin-inline-start: auto; }
#readerDrawer [hidden].reading-toolbar,
#readerDrawer [hidden].reading-neighbors,
#readerDrawer #drawerCloseBtn[hidden],
#readerDrawer #drawerExpandBtn[hidden],
#readerDrawer #readingToc [hidden] { display: none; }
#readerDrawer:not(.reading-mode) .reading-content-note { display: none; }

#readerDrawer.reading-mode {
  --reading-width: 760px;
  --reading-gutter: clamp(18px, 4vw, 44px);
  --reading-inner: min(var(--reading-width), calc(100% - 2 * var(--reading-gutter)));
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 101;
  border: 0;
  box-shadow: none;
  background: var(--bg-card);
}

.reading-mode .drawer-header {
  display: block;
  padding: env(safe-area-inset-top, 0px) 0 8px;
}

.reading-toolbar, .reading-neighbors {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reading-toolbar, .reading-mode #drawerJournalBadges {
  width: var(--reading-inner);
  margin-inline: auto;
}

.reading-toolbar { justify-content: space-between; padding-block: 6px; }
.reading-toolbar .btn-sm, .reading-toolbar .card-star { min-height: 44px; }
.reading-toolbar .card-star {
  width: 44px;
  flex: 0 0 44px;
  color: var(--text-muted);
}
.reading-toolbar .card-star[aria-pressed="true"] { color: var(--amber); }
.reading-position { color: var(--text-secondary); font-size: 13px; text-align: center; }
.reading-neighbors button:disabled { color: var(--text-muted); opacity: 0.65; }

#readingProgress:not([hidden]) {
  display: block;
  flex: 0 0 3px;
  inline-size: 100%;
  block-size: 3px;
  appearance: none;
  border: 0;
  background: var(--bg-secondary);
  accent-color: var(--accent);
}
#readingProgress::-webkit-progress-bar { background: var(--bg-secondary); }
#readingProgress::-webkit-progress-value { background: var(--accent); }
#readingProgress::-moz-progress-bar { background: var(--accent); }

.reading-mode #drawerBody {
  min-height: 0;
  padding: 24px 0 36px;
  scroll-padding-block: 12px;
}
.reading-mode .drawer-region {
  width: var(--reading-inner);
  margin-inline: auto;
  overflow-wrap: anywhere;
}
.reading-mode .drawer-region + .drawer-region { margin-top: 20px; }
html[data-style] .reading-mode .drawer-title-en {
  font-size: clamp(21px, 3.5vw, 29px);
  line-height: 1.28;
  text-wrap: pretty;
}
html[data-style] .reading-mode .drawer-title-zh { font-size: clamp(17px, 2.4vw, 21px); }
.reading-mode :is(.structured-abstract, .abs-panel, .drawer-takeaway) { font-size: 16px; line-height: 1.75; }
.reading-content-note {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.reading-toc:not([hidden]) { display: block; width: var(--reading-inner); margin: 8px auto 0; }
.reading-toc nav { display: flex; flex-wrap: wrap; gap: 4px; }
#readingTocToggle { min-height: 34px; }
#readingTocToggle[aria-expanded="false"] + nav { display: none; }
.reading-toc nav button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: start;
}
.reading-toc nav button:hover, .reading-toc nav button[aria-current] {
  background: var(--accent-light);
  color: var(--accent);
}

html[data-style] #readerDrawer.reading-mode .drawer-footer {
  padding: 4px max(var(--reading-gutter), calc((100% - var(--reading-width)) / 2)) calc(4px + env(safe-area-inset-bottom, 0px));
  justify-content: space-between;
}
#readerDrawer.reading-mode .drawer-footer:not(:has(> :not([hidden]))) {
  padding-block: 0 env(safe-area-inset-bottom, 0px);
  border: 0;
}

@media (min-width: 1280px) {
  .reading-toc:not([hidden]) {
    position: absolute;
    inset-inline-start: calc(50% + var(--reading-width) / 2 + 32px);
    inset-block-start: 128px;
    width: min(172px, calc(50% - var(--reading-width) / 2 - 50px));
    margin: 0;
    border-inline-start: 1px solid var(--border);
    padding-inline-start: 12px;
  }
  #readingTocToggle { display: none; }
  #readingTocToggle[aria-expanded="false"] + nav, .reading-toc nav { display: grid; }
}
@media (max-width: 540px) {
  .reading-toolbar .btn-sm { padding-inline: 8px; white-space: nowrap; }
  .reading-neighbors { flex: 1; justify-content: center; flex-wrap: wrap; gap: 2px 8px; }
  .reading-position { order: 1; flex: 0 0 100%; }
  .reading-mode #drawerBody { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #readerDrawer.reading-mode { transition: none; }
}
@media print {
  html:has(#readerDrawer.reading-mode) { background: #fff !important; color-scheme: light !important; }
  body:has(#readerDrawer.reading-mode) { overflow: visible; }
  body:has(#readerDrawer.reading-mode) > :not(#readerDrawer),
  #readerDrawer.reading-mode :is(.reading-toolbar, #readingToc, #readingProgress, .drawer-footer, .ft-actions, .ft-form, button, [data-ft-download]) {
    display: none !important;
  }
  #readerDrawer.reading-mode {
    position: static;
    display: block;
    height: auto;
    background: #fff;
    --bg-card: #fff;
    --bg-primary: #fff;
    --bg-secondary: #f4f4f4;
    --bg-tertiary: #eee;
    --text-primary: #000;
    --text-secondary: #222;
    --text-muted: #333;
    --accent: #000;
  }
  #readerDrawer.reading-mode #drawerBody { overflow: visible; padding-block: 14px; }
  #readerDrawer.reading-mode :is(.drawer-region, #drawerJournalBadges) { width: 100%; }
}
