/* ============ THEME TOKENS ============ */
:root[data-theme="light"] {
  --bg: #F7F6F2;
  --bg-elev: #FFFFFF;
  --bg-sunken: #EEEDE7;
  --bg-soft: #F2F1EB;
  --ink: #1C1C1C;
  --ink-soft: #3F3F3D;
  --ink-mute: #757470;
  --ink-faint: #A8A8A2;
  --rule: #E2E0D8;
  --rule-strong: #C9C7BD;
  --accent: #8B2E1F;
  --accent-hover: #A23827;
  --accent-soft: #F0E2DD;
  --accent-ink: #5A1E14;
  --pos: #2F5D44;
  --pos-soft: #E2EBE2;
  --neg: #9B3A2A;
  --neg-soft: #F0E2DD;
  --warn: #8C6320;
  --warn-soft: #EEE5D0;
  --neutral: #65645F;
  --neutral-soft: #E8E7E0;
  --shadow-sm: 0 1px 2px rgba(28,28,28,0.04), 0 0 0 0.5px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(28,28,28,0.06), 0 0 0 0.5px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(28,28,28,0.10), 0 0 0 0.5px rgba(0,0,0,0.06);
}
:root[data-theme="dark"] {
  --bg: #15161A;
  --bg-elev: #1E1F24;
  --bg-sunken: #0E0F12;
  --bg-soft: #23242A;
  --ink: #ECEAE4;
  --ink-soft: #C3C1BB;
  --ink-mute: #8A8884;
  --ink-faint: #5E5C57;
  --rule: #2B2D33;
  --rule-strong: #3A3D44;
  --accent: #D27260;
  --accent-hover: #DD826F;
  --accent-soft: #382017;
  --accent-ink: #ECB39E;
  --pos: #82B295;
  --pos-soft: #1E2A23;
  --neg: #D27260;
  --neg-soft: #382017;
  --warn: #C5A062;
  --warn-soft: #2C2418;
  --neutral: #A0A09A;
  --neutral-soft: #25272D;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 0.5px rgba(255,255,255,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4), 0 0 0 0.5px rgba(255,255,255,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 0.5px rgba(255,255,255,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-sunken);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.35s ease, color 0.35s ease;
  font-size: 14px;
  line-height: 1.55;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}
.serif { font-family: 'Source Serif 4', Georgia, serif; }
.mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }

#root {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
}

/* ============ MAC TITLE BAR (uses hiddenInset, so we add room for traffic lights) ============ */
.titlebar {
  height: 38px;
  background: var(--bg-elev);
  border-bottom: 0.5px solid var(--rule);
  -webkit-app-region: drag;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  flex-shrink: 0;
}
.titlebar-title {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 500;
}

/* ============ MASTHEAD ============ */
.masthead {
  background: var(--bg-elev);
  padding: 28px 40px 20px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  flex-shrink: 0;
}
.masthead::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 0.5px;
  background: var(--ink);
}
.brand-title {
  font-family: 'Source Serif 4', serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1;
}
.brand-meta-line {
  font-size: 10px;
  letter-spacing: 3.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 8px;
}
.date-block {
  text-align: right;
  font-family: 'Source Serif 4', serif;
}
.date-block .day {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
  font-weight: 500;
}
.date-block .date {
  font-size: 15px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ============ TOOLBAR ============ */
.toolbar {
  background: var(--bg-elev);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--rule);
  flex-shrink: 0;
}
.tab-bar { display: flex; gap: 4px; }
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  position: relative;
}
.tab:hover { color: var(--ink-soft); background: var(--bg-soft); }
.tab.active { color: var(--ink); background: var(--bg-soft); }
.tab.active::before {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  bottom: 4px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: tabSlide 0.3s ease;
}
@keyframes tabSlide {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
.tab .count {
  font-size: 10px;
  background: var(--bg-elev);
  padding: 2px 7px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  border: 0.5px solid var(--rule);
}

.toolbar-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 0.5px solid var(--rule-strong);
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: #FFF;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 0.5px solid var(--rule-strong);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  font-family: inherit;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }

/* ============ MAIN GRID ============ */
.main-grid {
  display: grid;
  grid-template-columns: 250px 1fr 360px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* v0.9.8 Stage 1 — Live tab uses single-column grid; Live brings its own rail inside .content. */
.main-grid-live {
  grid-template-columns: 1fr;
}
.main-grid-live > .content.live-tab {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.main-grid-live > .content.live-tab .live-layout {
  flex: 1;
  min-height: 0;
}

/* v0.9.12.5 — Two-column layout for non-Live tabs after the right-side
   summary panel was removed. Sidebar stays the same; content area expands
   into the freed-up space but caps at a readable max-width and centres so
   tables/lists stay scannable on wide monitors. */
.main-grid-2col {
  grid-template-columns: 250px 1fr;
}
.main-grid-2col > .content {
  /* Cap the content column's inner width so prose/tables don't sprawl on a
     27" display, while still being significantly wider than before. */
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.live-rail {
  overflow-y: auto;
  min-height: 0;
}
.live-pane {
  overflow-y: auto;
  min-height: 0;
}

/* ============ LEFT SIDEBAR ============ */
.sidebar {
  background: var(--bg-elev);
  border-right: 0.5px solid var(--rule);
  padding: 22px 18px;
  overflow-y: auto;
}
.side-section { margin-bottom: 28px; }
.side-section:last-child { margin-bottom: 0; }
.side-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  padding: 0 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.side-label .info {
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.geo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.geo-item:hover { background: var(--bg-soft); color: var(--ink); }
.geo-item .cb {
  width: 15px; height: 15px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 3.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.geo-item.checked .cb { background: var(--ink); border-color: var(--ink); }
.geo-item.checked .cb::after {
  content: '';
  width: 8px; height: 4px;
  border-left: 1.5px solid var(--bg-elev);
  border-bottom: 1.5px solid var(--bg-elev);
  transform: rotate(-45deg) translate(1px, -1px);
}
.geo-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
}
.geo-children {
  padding-left: 12px;
  margin: 4px 0 0 14px;
  border-left: 0.5px solid var(--rule);
}
.geo-children .geo-item { padding: 6px 8px; font-size: 12.5px; }
.geo-children .geo-item .cb { width: 13px; height: 13px; }

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 4px;
}
.time-chip {
  font-size: 11.5px;
  padding: 9px 8px;
  border-radius: 6px;
  background: transparent;
  border: 0.5px solid var(--rule-strong);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.time-chip:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--ink-faint); }
.time-chip.active {
  background: var(--ink);
  color: var(--bg-elev);
  border-color: var(--ink);
}
.time-chip.custom {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
  border-style: dashed;
}

.sector-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 4px;
  max-height: 290px;
  overflow-y: auto;
}
.sector-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.15s ease;
}
.sector-row:hover { background: var(--bg-soft); }
.sector-row .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.sector-row.active { color: var(--ink); font-weight: 500; }
.sector-row.active .dot { background: var(--accent); width: 7px; height: 7px; }
.sector-row .num {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
}

.sub-buckets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 5px;
  margin: 10px 4px 0;
  background: var(--accent-soft);
  border-radius: 7px;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.sub-bucket {
  font-size: 9.5px;
  padding: 6px 4px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--accent-ink);
  text-transform: uppercase;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}
.sub-bucket:hover { background: rgba(0,0,0,0.04); }
.sub-bucket.active { background: var(--accent); color: white; }

/* ============ CENTER ============ */
.content {
  background: var(--bg);
  padding: 26px 30px;
  overflow-y: auto;
}

.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-wrap {
  flex: 1;
  position: relative;
  background: var(--bg-elev);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.search-wrap:focus-within { box-shadow: var(--shadow-md); }
.search-wrap i.ti-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  font-size: 16px;
}
.search-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 13px 14px 13px 40px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.search-wrap input::placeholder { color: var(--ink-mute); }
.search-pill {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 1px;
  background: var(--bg-soft);
  color: var(--ink-mute);
  padding: 3px 7px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  border: 0.5px solid var(--rule);
}

/* Progress */
.progress-box {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.progress-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 17px;
  flex-shrink: 0;
}
.progress-icon.idle i { animation: none; }
.progress-icon i { animation: spin 2.4s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.progress-body { flex: 1; }
.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 8px;
}
.progress-top .label { font-weight: 500; color: var(--ink); }
.progress-top .source {
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.progress-track {
  height: 5px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.6s ease;
}
/* Shimmer removed in v0.5.0 — bar fills smoothly via width transition only. */
.progress-stats {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 1px;
  font-family: 'JetBrains Mono', monospace;
}
.progress-stats span { display: inline-flex; align-items: center; gap: 5px; }

/* Batch separator — sits between article groups in the feed */
.batch-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  padding: 0 2px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.batch-separator::before,
.batch-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.batch-separator.latest {
  color: var(--accent);
}
.batch-separator.latest::before,
.batch-separator.latest::after {
  background: var(--accent);
  opacity: 0.35;
}
.batch-separator .sep-label { white-space: nowrap; }
.batch-separator .sep-meta {
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: none;
  color: var(--ink-mute);
  opacity: 0.85;
}

/* Reset button (small icon) — sits next to Stop fetch / Settings */
.icon-btn.reset-btn {
  /* uses base icon-btn styles; this just exists as a hook in case theming is needed later */
}

/* Metrics */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.metric {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric::before {
  content: '';
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.metric.pos::before { background: var(--pos); }
.metric.neg::before { background: var(--neg); }
.metric.neu::before { background: var(--neutral); }
.metric.crit::before { background: var(--accent); }
.metric-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.metric-value {
  font-family: 'Source Serif 4', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.5px;
}
.metric-delta {
  font-size: 10.5px;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-mute);
}

/* Section head */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--rule);
}
.section-title {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.section-sub {
  font-size: 10.5px;
  letter-spacing: 2.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 500;
}

/* Tab row — sentiment + geography on one line */
.feed-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* Sentiment tabs */
.sent-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elev);
  padding: 4px;
  border-radius: 9px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}
.sent-tab {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-mute);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sent-tab:hover { color: var(--ink-soft); }
.sent-tab.active { background: var(--bg-soft); color: var(--ink); }
.sent-tab .badge {
  font-size: 10px;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-mute);
}
.sent-tab.active .badge { background: var(--bg-elev); color: var(--ink); }
.sent-tab.critical { color: var(--accent); }
.sent-tab.critical .badge { background: var(--accent-soft); color: var(--accent); }
.sent-tab.critical.active { background: var(--accent-soft); color: var(--accent-ink); }
.sent-tab.critical.active .badge { background: var(--accent); color: #fff; }

/* Geography tabs (mini pill group, different color from sentiment) */
.geo-tabs {
  display: flex;
  gap: 3px;
  background: var(--accent-soft);
  padding: 4px;
  border-radius: 9px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}
.geo-tab {
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent-ink);
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.geo-tab:hover { background: rgba(0,0,0,0.04); }
.geo-tab.active {
  background: var(--accent);
  color: #fff;
}
.geo-tab-count {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0;
}
.geo-tab.active .geo-tab-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* Article */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeUp 0.35s ease backwards;
}
.article:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.article-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}
.article-meta {
  font-size: 10.5px;
  letter-spacing: 1.8px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-meta .source-name { color: var(--accent); }
.article-headline {
  font-family: 'Source Serif 4', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin: 6px 0 10px;
  letter-spacing: -0.2px;
}
.article-summary {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-family: 'Source Serif 4', serif;
}
.article-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-summary-list li {
  font-family: 'Source Serif 4', serif;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  padding: 3px 0 3px 16px;
  position: relative;
}
.article-summary-list li + li { margin-top: 2px; }
.article-summary-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
.article-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tag {
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.2px;
}
.tag.sector { background: var(--neutral-soft); color: var(--ink); font-weight: 600; }
.pill {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
.pill.pos { background: var(--pos-soft); color: var(--pos); }
.pill.neg { background: var(--neg-soft); color: var(--neg); }
.pill.neu { background: var(--neutral-soft); color: var(--neutral); }
.pill.sev-high { background: var(--warn-soft); color: var(--warn); }
.pill.sev-critical { background: var(--accent-soft); color: var(--accent-ink); }
.pill.sev-low { background: var(--neutral-soft); color: var(--neutral); }
.pill.sev-medium { background: var(--neutral-soft); color: var(--neutral); }
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.right-pills { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; flex-shrink: 0; }

/* Empty state */
.empty {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 60px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.empty-icon {
  font-size: 28px;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.empty-title {
  font-family: 'Source Serif 4', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 13px;
  color: var(--ink-mute);
  max-width: 360px;
  margin: 0 auto 16px;
  line-height: 1.55;
}

/* ============ SUMMARY ============ */
.summary-panel {
  background: var(--bg-elev);
  border-left: 0.5px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.summary-head {
  padding: 22px 22px 16px;
  border-bottom: 0.5px solid var(--rule);
  flex-shrink: 0;
}
.summary-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.summary-eyebrow .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.summary-title {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.summary-meta {
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 1.5px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.summary-body {
  padding: 20px 22px;
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.summary-section { margin-bottom: 22px; }
.summary-section:last-child { margin-bottom: 0; }
.summary-section-h {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--rule);
}
.summary-section p {
  font-family: 'Source Serif 4', serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.summary-section p + p { margin-top: 10px; }
.bullet-list { list-style: none; padding: 0; }
.bullet-list li {
  font-size: 13px;
  padding: 6px 0 6px 16px;
  position: relative;
  color: var(--ink-soft);
  line-height: 1.6;
}
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 13px;
  width: 7px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
.bullet-list li b { color: var(--ink); font-weight: 600; }
.threat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 12.5px;
  border-left: 2px solid;
}
.threat-row.critical { border-color: var(--accent); }
.threat-row.high { border-color: var(--warn); }
.threat-row.medium { border-color: var(--neutral); }
.threat-row .name { color: var(--ink); font-weight: 500; }
.threat-row .level {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.threat-row.critical .level { color: var(--accent); }
.threat-row.high .level { color: var(--warn); }
.threat-row.medium .level { color: var(--neutral); }

.summary-foot {
  padding: 14px 16px;
  border-top: 0.5px solid var(--rule);
  display: flex;
  gap: 7px;
  background: var(--bg-elev);
  flex-shrink: 0;
}
.summary-foot button { flex: 1; }
.summary-foot .btn-accent { flex: 1.5; }

/* ============ STATUS BAR ============ */
.statusbar {
  background: var(--bg-elev);
  border-top: 0.5px solid var(--rule);
  padding: 8px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 1.8px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  flex-shrink: 0;
}
.statusbar .left, .statusbar .right { display: flex; gap: 22px; align-items: center; }
.statusbar span { display: inline-flex; align-items: center; gap: 6px; }
.statusbar .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pos);
  animation: pulse 2s infinite;
}

/* ============ MODALS ============ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border-radius: 14px;
  padding: 28px;
  width: 420px;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.modal.wide { width: 560px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.modal-sub {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 22px;
  font-weight: 500;
}

.dial-wrap { display: flex; justify-content: center; margin: 16px 0 22px; }
.dial { width: 220px; height: 220px; position: relative; }
.dial-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
}
.dial-mark {
  position: absolute;
  font-size: 11px;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}
.dial-hand {
  position: absolute;
  width: 3px;
  height: 90px;
  background: var(--accent);
  top: 20px;
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(120deg);
  border-radius: 2px;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.dial-center {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--ink);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.dial-readout {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, 22px);
  text-align: center;
  z-index: 3;
}
.dial-readout .num {
  font-family: 'Source Serif 4', serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -1px;
}
.dial-readout .unit {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 500;
}
.modal-toggle {
  display: flex;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 18px;
}
.modal-toggle button {
  flex: 1;
  padding: 8px;
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.modal-toggle button.active {
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.modal-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-soft);
  outline: none;
  margin: 8px 0;
}
.modal-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg-elev);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.modal-actions { display: flex; gap: 8px; margin-top: 22px; }
.modal-actions button { flex: 1; }

/* Settings */
.setting-group { margin-bottom: 22px; }
.setting-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.setting-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0.5px solid var(--rule-strong);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: all 0.15s ease;
}
.setting-input:focus { border-color: var(--accent); background: var(--bg-elev); }
.setting-help {
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-top: 6px;
  line-height: 1.5;
}

.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0.5px solid var(--rule-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.radio-row:hover { background: var(--bg-soft); }
.radio-row.active { border-color: var(--accent); background: var(--accent-soft); }
.radio-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  flex-shrink: 0;
  position: relative;
}
.radio-row.active .radio-dot { border-color: var(--accent); }
.radio-row.active .radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.radio-text { flex: 1; }
.radio-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.radio-desc { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }

/* Scrollbars */
.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar, .summary-body::-webkit-scrollbar, .sector-list::-webkit-scrollbar, .modal::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb, .summary-body::-webkit-scrollbar-thumb, .sector-list::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border-radius: 3px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: var(--bg-elev);
  padding: 11px 20px;
  border-radius: 24px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Tab content */
.placeholder-view {
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 80px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.placeholder-view .icon { font-size: 36px; color: var(--ink-faint); margin-bottom: 16px; }
.placeholder-view h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.placeholder-view p {
  font-size: 13.5px;
  color: var(--ink-mute);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============ PHASE 3 — PRINT TAB ============ */
.print-mode-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: var(--bg-elev);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
}
.print-mode-btn {
  border: none;
  background: transparent;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 110px;
  transition: all 0.2s ease;
}
.print-mode-btn:hover:not(.disabled) { background: var(--bg-soft); }
.print-mode-btn.active {
  background: var(--accent);
  color: white;
}
.print-mode-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.print-mode-label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.print-mode-sub {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
  font-family: 'JetBrains Mono', monospace;
}

.print-upload-zone {
  background: var(--bg-elev);
  border: 2px dashed var(--ink-faint);
  border-radius: 12px;
  padding: 38px 24px;
  text-align: center;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}
.print-upload-zone.dragover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.01);
}
.print-upload-icon {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 10px;
}
.print-upload-title {
  font-family: 'Source Serif 4', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.print-upload-sub {
  font-size: 13px;
  color: var(--ink-mute);
  max-width: 480px;
  margin: 0 auto 14px;
  line-height: 1.5;
}
.print-upload-progress {
  max-width: 480px;
  margin: 0 auto 12px;
}
.print-upload-progress .bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.print-upload-progress .bar .fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.print-upload-progress .meta {
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.5px;
}

.print-queue {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.print-queue-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.print-queue-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  font-size: 12.5px;
  border-bottom: 1px solid var(--bg-soft);
}
.print-queue-row:last-child { border-bottom: none; }
.pq-name { color: var(--ink); font-family: 'Source Serif 4', serif; }
.pq-meta { color: var(--ink-mute); font-size: 11px; }
.pq-status {
  font-size: 10.5px;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink-mute);
}
.print-queue-row.status-processing .pq-status { background: var(--accent-soft); color: var(--accent); }
.print-queue-row[class*="done"] .pq-status,
.pq-status[data-state="done"] { background: rgba(46, 160, 67, 0.15); color: #2EA043; }

/* Print assign modal rows */
.pa-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-soft);
}
.pa-row:last-child { border-bottom: none; }
.pa-name {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 6px;
}
.pa-inputs {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 8px;
}
.modal-input {
  background: var(--bg-soft);
  border: 1px solid var(--ink-faint);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  width: 100%;
}
.modal-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* Stop / danger button */
.btn-danger {
  background: #C53030;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}
.btn-danger:hover { background: #A52828; }

/* ============ LANGUAGE TABS (v0.4.0) ============ */
/* Same visual family as geo-tabs but a different tint to distinguish the grouping. */
.lang-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-elev);
  padding: 4px;
  border-radius: 9px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-faint);
}
.lang-tab {
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-tab:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.lang-tab.active {
  background: var(--ink);
  color: var(--bg-elev);
}
.lang-tab-count {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0;
}
.lang-tab.active .lang-tab-count {
  background: rgba(255,255,255,0.18);
  color: var(--bg-elev);
}

/* Hindi text rendering — use a Devanagari-friendly font stack with serif fallback */
.article-headline,
.article-summary-list li,
.article-summary {
  font-family: 'Source Serif 4', 'Noto Serif Devanagari', 'Noto Sans Devanagari', serif;
}

/* ============ Phase 7.1 — Filters panel, date popover, calendar icon ============ */

/* Filter badge on the Filters button */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0;
}

/* Side panel — slides in from right.
   Critical layout: head + scrollable body + footer, all visible always. */
.side-panel {
  position: fixed;
  inset: 0;
  z-index: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.side-panel.open { pointer-events: auto; opacity: 1; }
.side-panel-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
}
.side-panel-body {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-panel.open .side-panel-body { transform: translateX(0); }

/* Sticky header */
.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-elev);
}
.side-panel-head h3 {
  margin: 0;
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.side-panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scrollable body — this is THE scroll container */
.side-panel-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  min-height: 0;
}

/* Sections inside scroll body */
.fp-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.fp-section:last-child { border-bottom: none; }
.fp-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fp-label .hint {
  font-weight: 400;
  letter-spacing: 0.4px;
  text-transform: none;
  opacity: 0.7;
}

/* Sticky footer */
.side-panel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg-elev);
}
.side-panel-footer button { flex: 1; }
.side-panel-footer .btn-accent { flex: 2; }

/* Date presets */
.date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.date-preset {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.date-preset:hover { background: var(--bg-elev); }
.date-preset.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Date row */
.date-row { display: flex; gap: 12px; }
.date-field { flex: 1; }
.date-field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.date-field input[type="date"] {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
}

.btn-sm {
  font-size: 11px;
  padding: 5px 10px;
}

/* Filter chips (sentiment, language) */
.fp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fp-chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
}
.fp-chip:hover { background: var(--bg-elev); }
.fp-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 500;
}

/* Sector select */
.fp-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  cursor: pointer;
}

/* Publication search */
.fp-search {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
}
.fp-search::placeholder { color: var(--ink-mute); opacity: 0.7; }

/* Publication list */
.pub-list { margin-top: 4px; }
.pub-group { margin-bottom: 14px; }
.pub-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.pub-group-label {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.pub-group-count {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-mute);
  margin-left: 4px;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 8px;
}
.pub-group-actions {
  display: flex;
  gap: 4px;
}
.pub-mini-btn {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-mute);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.pub-mini-btn:hover {
  color: var(--ink);
  background: var(--bg-elev);
}
.pub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 12.5px;
  border-radius: 4px;
}
.pub-row:hover { background: var(--bg-soft); }
.pub-row input[type="checkbox"] { cursor: pointer; }
.pub-name { flex: 1; color: var(--ink); }
.pub-meta {
  font-size: 10px;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

/* Calendar icon next to feed tabs */
.feed-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-mute);
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.15s ease;
}
.feed-date-btn:hover {
  background: var(--bg-elev);
  color: var(--ink);
}
.feed-date-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.feed-date-btn i { font-size: 14px; }

/* Date popover */
.date-popover {
  position: fixed;
  z-index: 700;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 14px;
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.date-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.date-popover-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.date-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* ============ Phase 8 — Saved articles + Government + Archive ============ */

/* Bookmark button on article cards */
.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.15s ease;
}
.save-btn:hover {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--ink-mute);
}
.save-btn.saved {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.save-btn.saved:hover {
  opacity: 0.85;
}
.save-btn i { font-size: 14px; }

/* Saved note shown inline on saved tab cards */
.article-saved-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 9px 12px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.5;
}
.article-saved-note i { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Save block inside article modal */
.modal-save-block {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.modal-save-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.modal-save-toggle input[type="checkbox"] { cursor: pointer; }
.modal-save-toggle i { color: var(--accent); font-size: 16px; }
.modal-save-note {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  resize: vertical;
}
.modal-save-note::placeholder { color: var(--ink-mute); opacity: 0.6; }

/* Section head extension — accommodates Export CSV button */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.section-head > div:first-child { flex: 1; }

/* ============ Phase 8.2 — Collapsible separators + saved note edit + danger button ============ */

.batch-separator.clickable {
  cursor: pointer;
  user-select: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.12s ease;
}
.batch-separator.clickable:hover {
  background: var(--bg-soft);
}
.batch-separator.collapsed .sep-label {
  opacity: 0.7;
}
.batch-separator .sep-label {
  letter-spacing: 1.4px;
}

/* Note edit hover affordance */
.article-saved-note.clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}
.article-saved-note.clickable:hover {
  background: var(--bg-elev);
}
.article-saved-note .edit-icon {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: var(--ink-mute);
  font-size: 13px;
}
.article-saved-note.clickable:hover .edit-icon {
  opacity: 1;
}
.article-saved-note .note-text { flex: 1; }
.article-saved-note .note-placeholder {
  color: var(--ink-mute);
  font-style: italic;
  opacity: 0.75;
}

/* Danger button style for Purge */
.btn-ghost.danger {
  color: var(--accent);
  border-color: var(--accent);
}
.btn-ghost.danger:hover {
  background: var(--accent);
  color: #fff;
}

/* ============ Phase 9 — Daily Brief sidebar panel ============ */

.brief-panel .side-panel-body {
  width: 540px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
}

.brief-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brief-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
}

.brief-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mute);
}
.brief-empty-icon {
  font-size: 48px;
  opacity: 0.4;
  margin-bottom: 12px;
}
.brief-empty-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}
.brief-empty-sub {
  font-size: 13px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.brief-loading {
  text-align: center;
  padding: 80px 20px;
}
.brief-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.brief-loading-title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}
.brief-loading-sub {
  font-size: 12px;
  color: var(--ink-mute);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.45;
}

.brief-footer {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  align-items: center;
}
.brief-footer .btn-accent { margin-left: auto; }

/* ============ Brief content typography ============ */

.bp-masthead {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.bp-masthead .bp-date {
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.bp-masthead .bp-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 3px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bp-section { margin-bottom: 18px; }
.bp-head {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin: 0 0 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.bp-head .bp-meta {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.bp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bp-bullets li {
  font-size: 12.5px;
  line-height: 1.45;
  padding: 4px 0 4px 18px;
  text-indent: -14px;
  color: var(--ink);
}
.bp-bullets li::before {
  content: "—";
  margin-right: 6px;
  color: var(--accent);
  font-weight: 700;
}
.bp-src {
  font-size: 11px;
  color: var(--ink-mute);
  font-style: italic;
  margin-left: 4px;
}

/* Tags inside the brief panel — colored variant (vs. PDF B&W) */
.bp-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 1px 3px 1px 0;
  line-height: 1.5;
  vertical-align: 1px;
}
.bp-tag.pos { background: var(--pos-soft); color: var(--pos); border-color: var(--pos); }
.bp-tag.neg { background: var(--accent); color: #fff; border-color: var(--accent); }
.bp-tag.neu { background: var(--bg-soft); color: var(--ink-mute); border-color: var(--border); }
.bp-tag.crit { background: var(--accent); color: #fff; border-color: var(--accent); }
.bp-tag.region { background: transparent; color: var(--ink); border-style: dashed; }
.bp-tag.sector { background: transparent; color: var(--ink-mute); }

/* At a Glance grid */
.bp-glance { display: grid; grid-template-columns: 1fr; gap: 8px; }
.bp-glance-item {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 10px;
}
.bp-glance-meta {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-mute);
  margin-bottom: 3px;
}
.bp-glance-head {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.bp-tags { margin-top: 3px; }

/* Sentiment pulse */
.bp-pulse {
  display: flex;
  height: 16px;
  border: 1px solid var(--ink);
  margin: 6px 0 8px;
  border-radius: 3px;
  overflow: hidden;
}
.bp-pulse-seg {
  height: 100%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 16px;
  letter-spacing: 0.5px;
}
.bp-pulse-seg.pos { background: var(--pos); }
.bp-pulse-seg.neg { background: var(--accent); }
.bp-pulse-seg.neu { background: var(--ink-mute); }
.bp-pulse-seg.crit { background: repeating-linear-gradient(45deg, var(--accent) 0 4px, #000 4px 8px); }

/* Sector heat bars */
.bp-sectors { display: flex; flex-direction: column; gap: 4px; }
.bp-sector-row {
  display: flex;
  align-items: center;
  font-size: 12px;
}
.bp-sector-name { width: 130px; font-weight: 600; color: var(--ink); }
.bp-sector-bar {
  flex: 1;
  height: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.bp-sector-fill {
  height: 100%;
  background: var(--ink);
}
.bp-sector-count {
  width: 32px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  margin-left: 8px;
  color: var(--ink);
}

/* Lens read */
.bp-lens {
  border: 1.5px solid var(--ink);
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 4px;
}
.bp-lens p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 7px 0;
  color: var(--ink);
}
.bp-lens p:last-child { margin-bottom: 0; }
.bp-lens strong { font-weight: 700; }

/* Forecast */
.bp-forecast { display: flex; flex-direction: column; gap: 5px; }
.bp-forecast-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.bp-forecast-arrow {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
}
.bp-forecast-item strong { font-weight: 700; }

/* Watchlist table */
.bp-watch {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bp-watch th {
  text-align: left;
  border-bottom: 1.5px solid var(--ink);
  padding: 4px 8px 4px 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-mute);
}
.bp-watch td {
  border-bottom: 1px solid var(--border);
  padding: 6px 8px 6px 0;
  vertical-align: top;
  line-height: 1.35;
  color: var(--ink);
}
.bp-watch .bp-entity { font-weight: 700; width: 110px; }
.bp-sig-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 5px;
  vertical-align: middle;
}
.bp-sig-dot.medium { background: var(--ink-mute); }

/* Recommended actions */
.bp-actions {
  counter-reset: action;
  list-style: none;
  padding: 0;
  margin: 0;
}
.bp-actions li {
  counter-increment: action;
  padding: 6px 0 6px 32px;
  position: relative;
  font-size: 12.5px;
  line-height: 1.4;
  border-bottom: 1px dotted var(--border);
}
.bp-actions li:last-child { border-bottom: none; }
.bp-actions li::before {
  content: counter(action);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  text-align: center;
  line-height: 19px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ v0.9.1 — Reports dropdown, Keyword Fetch, Brief Abort ============ */

/* Dropdown menu (generic) — used for Reports menu */
.dropdown-menu {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 280px;
  z-index: 9999;
  animation: dd-fade 0.12s ease;
}
@keyframes dd-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 7px;
  color: var(--ink);
  font-family: inherit;
  transition: background 0.12s ease;
}
.dropdown-item:hover:not(.disabled):not([disabled]) {
  background: var(--bg-soft);
}
.dropdown-item.disabled, .dropdown-item[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.dropdown-item i.ti {
  font-size: 17px;
  color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}
.dropdown-item-text {
  flex: 1;
  min-width: 0;
}
.dropdown-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.dropdown-item-sub {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.3;
}

/* Reports menu — currently no special overrides beyond dropdown-menu base */
.reports-menu { /* reserved for future overrides */ }

/* Keyword Fetch input wrap — variant of .search-wrap with internal Fetch button */
.search-wrap.keyword-wrap {
  display: flex;
  align-items: center;
}
.search-wrap.keyword-wrap input {
  padding-right: 130px; /* leave room for ⓘ icon + Fetch button */
}
.search-wrap.keyword-wrap .btn-accent.btn-sm,
.search-wrap.keyword-wrap .btn-ghost.btn-sm {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  padding: 6px 12px;
  white-space: nowrap;
  z-index: 2;
}

/* ⓘ tooltip icon inside the keyword input */
.search-info {
  position: absolute;
  right: 84px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  cursor: help;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  z-index: 2;
}
.search-info i.ti {
  font-size: 15px;
}
.search-info:hover { color: var(--accent); }

/* Brief Abort button — destructive ghost variant */
.btn-danger-ghost {
  background: transparent;
  color: var(--neg, #C03A2B);
  border: 1px solid var(--neg, #C03A2B);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease;
}
.btn-danger-ghost:hover {
  background: var(--neg, #C03A2B);
  color: #fff;
}
.btn-danger-ghost i.ti { font-size: 13px; }

/* Keyword pill on article cards — small inline tag indicating Keyword Fetch origin */
.kw-match-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--accent);
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}

/* Yellow highlight for matched terms in Archive tab search results */
.kw-highlight {
  background: #FFF59D;
  color: #1C1C1C;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
[data-theme="dark"] .kw-highlight {
  background: #C9A227;
  color: #1C1C1C;
}

/* Archive: "keyword in full body, not summary" note */
.kw-in-body-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-mute);
  font-style: italic;
  padding: 4px 8px;
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Highlighted summary container (Archive search renders bullets with embedded highlights) */
.article-summary {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin: 8px 0;
}
.article-summary ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.article-summary li {
  padding: 3px 0 3px 16px;
  position: relative;
}
.article-summary li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
}

/* v0.9.1 — make the keyword fetch loader icon visibly spin */
.search-wrap.keyword-wrap .btn-ghost.btn-sm i.ti-loader-2 {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}

/* ============ v0.9.3 — Brief Keyword Modal ============ */

.brief-kw-modal-card {
  width: min(520px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.brief-kw-modal-card .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brief-kw-modal-card .modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.brief-kw-modal-card .modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-mute);
  padding: 4px;
  font-size: 18px;
}
.brief-kw-modal-card .modal-sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 6px 0 14px 0;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}
.bk-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 4px;
  max-height: 50vh;
}
.bk-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.bk-item:hover {
  background: var(--bg-soft);
  border-color: var(--accent);
}
.bk-check {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.bk-text { flex: 1; min-width: 0; }
.bk-keyword {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  word-break: break-word;
}
.bk-meta {
  font-size: 11px;
  color: var(--ink-mute);
}
.bk-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.bk-actions .btn-ghost {
  font-size: 12px;
}
.bk-actions .btn-accent {
  font-size: 13px;
  font-weight: 600;
}

/* ============ v0.9.4 — Brief History modal, radio picker, scope label ============ */

/* Dropdown divider in Reports menu */
.dropdown-divider {
  height: 1px;
  background: var(--rule);
  margin: 6px 4px;
}

/* Radio-style item in the keyword picker (single-select) */
.bk-radio-item {
  cursor: pointer;
}
.bk-radio {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.bk-radio-item:has(.bk-radio:checked) {
  background: var(--bg-soft);
  border-color: var(--accent);
}

/* Brief History modal — slightly wider, list of clickable rows */
.brief-history-modal-card {
  width: min(560px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.brief-history-modal-card .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brief-history-modal-card .modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.brief-history-modal-card .modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-mute);
  padding: 4px;
  font-size: 18px;
}
.brief-history-modal-card .modal-sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 6px 0 14px 0;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}
.bh-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 4px;
  max-height: 60vh;
}
.bh-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.bh-item:hover {
  background: var(--bg-soft);
  border-color: var(--accent);
}
.bh-left {
  flex: 1;
  min-width: 0;
}
.bh-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.bh-label {
  font-size: 13px;
  color: var(--ink);
  word-break: break-word;
}
.bh-articles {
  color: var(--ink-mute);
  font-size: 12px;
}
.bh-arrow {
  color: var(--ink-mute);
  font-size: 16px;
  flex-shrink: 0;
  margin-left: 10px;
}

/* Scope label badge in brief panel masthead */
.bp-scope-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--accent);
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ============ v0.9.5 — Brief new CJP-style format ============ */

/* Tight bullet list — used by At a Glance, Critical Alerts, Watchlist, etc. */
.bp-bullets-tight {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bp-bullets-tight li {
  position: relative;
  padding: 8px 0 8px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-soft, var(--rule));
}
.bp-bullets-tight li:last-child {
  border-bottom: none;
}
.bp-bullets-tight li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--ink-mute);
  font-weight: 600;
}

/* Critical scope tags (NATIONAL / INTERNATIONAL) */
.bp-crit-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}
.bp-crit-tag.crit-natl {
  background: rgba(255,90,90,0.15);
  color: #ff5a5a;
  border: 1px solid rgba(255,90,90,0.35);
}
.bp-crit-tag.crit-intl {
  background: rgba(110,170,255,0.15);
  color: #6eaaff;
  border: 1px solid rgba(110,170,255,0.35);
}

/* Observations — slightly more breathing room since each is a strategic thought */
.bp-observations li {
  padding: 11px 0 11px 18px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Opposition Voice — each quote a card */
.bp-opposition li {
  padding: 10px 0 10px 18px;
  font-size: 13.5px;
  line-height: 1.6;
}
.bp-opposition li em {
  color: var(--ink-mute);
  font-style: italic;
  font-weight: 400;
}

/* Forecast — arrow + headline + paragraph explanation */
.bp-new .bp-forecast {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bp-new .bp-forecast-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
}
.bp-new .bp-forecast-arrow {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
  text-align: center;
  line-height: 1.4;
}
.bp-new .bp-forecast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-new .bp-forecast-head {
  font-size: 13.5px;
  line-height: 1.4;
}
.bp-new .bp-forecast-explain {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-mute);
}

/* Watchlist — priority tags, what-to-watch */
.bp-watchlist li {
  padding: 9px 0 9px 18px;
  font-size: 13.5px;
  line-height: 1.55;
}
.bp-pr-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 3px;
  margin: 0 4px 0 4px;
  vertical-align: middle;
  text-transform: uppercase;
}
.bp-pr-tag.pr-high {
  background: rgba(255,90,90,0.15);
  color: #ff5a5a;
  border: 1px solid rgba(255,90,90,0.35);
}
.bp-pr-tag.pr-med {
  background: rgba(255,175,90,0.15);
  color: #ffaf5a;
  border: 1px solid rgba(255,175,90,0.35);
}

/* Summary — Article Links: grouped by source, list of hyperlinks */
.bp-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bp-links-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-links-source {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  margin-bottom: 2px;
}
.bp-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bp-links-list li {
  padding: 4px 0 4px 14px;
  position: relative;
  font-size: 12.5px;
  line-height: 1.45;
}
.bp-links-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--ink-mute);
}
.bp-links-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-mute);
}
.bp-links-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============ v0.9.7 — Lens (Ask AI) ============ */

.lens-content { padding: 0 !important; }
.lens-host { width: 100%; }
.lens-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 0 24px 24px 24px;
}

/* === RAIL === */
.lens-rail {
  display: flex; flex-direction: column;
  gap: 18px;
}
.lens-rail-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.lens-rail-action {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
}
.lens-rail-action:hover { border-color: var(--accent); color: var(--accent); }
.lens-rail-action i { font-size: 12px; }

.lens-scope-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 14px;
}
.lens-scope-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.lens-scope-row:last-child { border-bottom: none; }
.lens-scope-label {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.lens-scope-select {
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
}
.lens-scope-select:hover { background: var(--bg); color: var(--accent); }
.lens-scope-select option { background: var(--bg-soft); color: var(--ink); }

/* Indexing status card */
.lens-status-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
}
.lens-status-card-pending { border-color: var(--accent); }
.lens-status-title {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.lens-status-bar {
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.lens-status-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.lens-status-text {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.lens-status-btn {
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.lens-status-btn:hover { background: var(--accent-deep, #B8624E); }

/* Thread list */
.lens-thread-list {
  display: flex; flex-direction: column; gap: 2px;
}
.lens-thread-empty {
  font-size: 11px;
  color: var(--ink-mute);
  font-style: italic;
  padding: 8px 10px;
}
.lens-thread-item {
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.lens-thread-item:hover {
  background: var(--bg-soft);
  border-left-color: var(--rule);
}
.lens-thread-item.active {
  background: var(--bg-soft);
  border-left-color: var(--accent);
}
.lens-thread-title {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lens-thread-meta {
  font-size: 10px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: 0.4px;
}

/* === MAIN PANEL === */
.lens-main {
  background: var(--bg-panel, var(--bg-soft));
  border: 1px solid var(--rule);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 240px);
  overflow: hidden;
}
.lens-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
}
.lens-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.lens-subtitle {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 3px;
}
.lens-header-actions { display: flex; gap: 6px; }

.lens-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 16px 26px;
}

/* Empty state */
.lens-empty {
  text-align: center;
  padding: 30px 12px 16px;
}
.lens-empty-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.lens-empty-sub {
  color: var(--ink-mute);
  font-size: 13px;
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.55;
}
.lens-starters-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lens-starters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}
.lens-starter {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}
.lens-starter:hover {
  border-color: var(--accent);
  background: rgba(210, 114, 96, 0.04);
}
.lens-starter-cat {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 5px;
}
.lens-starter-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}

/* Messages */
.lens-msg-user {
  display: flex; justify-content: flex-end;
  margin-bottom: 18px;
}
.lens-msg-user-bubble {
  max-width: 72%;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.lens-msg-ai { margin-bottom: 22px; }
.lens-msg-ai-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.lens-msg-ai-meta::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.lens-meta-sep { opacity: 0.5; }
.lens-msg-ai-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}
.lens-msg-ai-body p { margin: 0 0 12px; }
.lens-msg-ai-body p:last-child { margin-bottom: 0; }
.lens-msg-ai-body strong { font-weight: 600; }
.lens-cite {
  display: inline-block;
  background: rgba(210, 114, 96, 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin: 0 1px;
  cursor: pointer;
  vertical-align: 1px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.lens-cite:hover { background: var(--accent); color: white; }
.lens-cursor {
  display: inline-block;
  animation: blink 1s infinite;
  color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

/* Loading dots */
.lens-loading {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-mute);
  font-size: 12.5px;
}
.lens-dots {
  display: inline-flex; gap: 4px;
}
.lens-dots span {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: lens-bounce 1.2s infinite ease-in-out;
}
.lens-dots span:nth-child(2) { animation-delay: 0.15s; }
.lens-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes lens-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Sources */
.lens-sources {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.lens-sources-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 0;
}
.lens-sources-toggle:hover { color: var(--ink); }
.lens-chev {
  font-size: 10px;
  transition: transform 0.15s ease;
}
.lens-sources-toggle.open .lens-chev { transform: rotate(90deg); }
.lens-sources-count {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
}
.lens-sources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.lens-source-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.lens-source-card:hover { border-color: var(--accent); }
.lens-source-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.lens-source-num {
  background: rgba(210, 114, 96, 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.lens-source-pub {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 600;
}
.lens-source-head {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 7px;
}
.lens-source-meta {
  display: flex; gap: 0; align-items: center;
  font-size: 10px;
  color: var(--ink-mute);
}
.lens-source-meta > span { margin-right: 4px; }
.lens-sent-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.lens-sent-dot.neg { background: var(--accent); }
.lens-sent-dot.pos { background: #5ABF8A; }
.lens-sent-dot.neu { background: var(--ink-mute); }

/* Input */
.lens-input-zone {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--rule);
}
.lens-input-wrap {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
  display: flex; align-items: center;
  padding: 6px 6px 6px 14px;
  transition: border-color 0.14s ease;
}
.lens-input-wrap:focus-within { border-color: var(--accent); }
.lens-input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  padding: 9px 0;
}
.lens-input::placeholder { color: var(--ink-mute); }
.lens-input:disabled { opacity: 0.5; cursor: not-allowed; }
.lens-send-btn {
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.12s ease;
}
.lens-send-btn:hover:not(:disabled) { background: var(--accent-deep, #B8624E); }
.lens-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.lens-send-btn i { font-size: 13px; }

/* ============ v0.9.7 Stage 2 — Action chips + category tag ============ */

.lens-category-tag {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(210, 114, 96, 0.10);
  border: 1px solid rgba(210, 114, 96, 0.25);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.lens-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
}

.lens-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 16px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}
.lens-chip:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(210, 114, 96, 0.06);
}
.lens-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lens-chip i {
  font-size: 13px;
  color: var(--ink-mute);
}
.lens-chip:hover:not(:disabled) i {
  color: var(--accent);
}
.lens-chip-primary {
  background: rgba(210, 114, 96, 0.12);
  border-color: rgba(210, 114, 96, 0.35);
  color: var(--accent);
  font-weight: 600;
}
.lens-chip-primary i {
  color: var(--accent);
}
.lens-chip-primary:hover:not(:disabled) {
  background: var(--accent);
  color: white;
}
.lens-chip-primary:hover:not(:disabled) i {
  color: white;
}

/* ============ v0.9.7 Stage 3 — Next questions, Pin, Mic, Brief modal ============ */

/* Next-question chips (proactive strategic suggestions) */
.lens-next-questions {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(210, 114, 96, 0.05);
  border: 1px solid rgba(210, 114, 96, 0.18);
  border-radius: 8px;
}
.lens-next-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.lens-next-label i { font-size: 12px; }
.lens-next-list {
  display: flex; flex-direction: column; gap: 6px;
}
.lens-next-chip {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.lens-next-chip:hover:not(:disabled) {
  border-color: var(--accent);
  background: white;
  background: var(--bg);
}
.lens-next-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.lens-next-chip i {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}
.lens-next-chip span { line-height: 1.4; }

/* Pinned thread + pin toggle */
.lens-thread-item.pinned { background: rgba(210, 114, 96, 0.04); }
.lens-thread-item.pinned .lens-thread-title::before {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.lens-thread-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.lens-thread-title-row .lens-thread-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lens-thread-pin {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.lens-thread-item:hover .lens-thread-pin,
.lens-thread-pin.pinned {
  opacity: 1;
}
.lens-thread-pin:hover { color: var(--accent); }
.lens-thread-pin.pinned { color: var(--accent); }
.lens-thread-pin i { font-size: 12px; }

/* Mic (voice input) button */
.lens-mic-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-mute);
  padding: 0 10px;
  margin-right: 6px;
  border-radius: 7px;
  cursor: pointer;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}
.lens-mic-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.lens-mic-btn.listening {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  animation: lens-pulse 1.4s ease-in-out infinite;
}
.lens-mic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.lens-mic-btn i { font-size: 16px; }
@keyframes lens-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(210, 114, 96, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(210, 114, 96, 0); }
}

/* Brief modal (from chat) */
.lens-brief-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: lens-fade-in 0.15s ease;
}
@keyframes lens-fade-in { from { opacity: 0; } to { opacity: 1; } }
.lens-brief-modal {
  background: var(--bg-panel, var(--bg-soft));
  border: 1px solid var(--rule);
  border-radius: 12px;
  width: 760px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lens-brief-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lens-brief-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.lens-brief-sub {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 3px;
}
.lens-brief-close {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-mute);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lens-brief-close:hover { color: var(--accent); border-color: var(--accent); }
.lens-brief-close i { font-size: 14px; }
.lens-brief-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
}
.lens-brief-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  margin: 18px 0 8px;
  color: var(--ink);
}
.lens-brief-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  margin: 18px 0 8px;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}
.lens-brief-body h3:first-child { margin-top: 0; }
.lens-brief-body ul {
  padding-left: 18px;
  margin: 0 0 14px 0;
}
.lens-brief-body li {
  margin-bottom: 6px;
  line-height: 1.5;
}
.lens-brief-body p { margin: 0 0 10px; }
.lens-brief-body .lens-cite {
  display: inline-block;
  background: rgba(210, 114, 96, 0.14);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin: 0 1px;
  vertical-align: 1px;
}
.lens-brief-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.lens-brief-meta {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.lens-brief-actions {
  display: flex;
  gap: 8px;
}
.lens-brief-error {
  color: var(--accent);
  font-size: 13px;
  padding: 14px;
  border: 1px solid rgba(210,114,96,0.3);
  border-radius: 8px;
  background: rgba(210,114,96,0.06);
}

/* ============ v0.9.7 Stage 4 — Brief Annexure ============ */
.lens-brief-annexure {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid var(--rule);
}
.lens-brief-annexure h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 14px 0;
  padding-bottom: 0;
  border-bottom: none;
}
.lens-brief-annexure ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 0;
}
.lens-brief-annexure li {
  margin-bottom: 11px;
  line-height: 1.45;
}
.lens-brief-annexure .ann-source {
  font-weight: 700;
  color: var(--ink);
  font-size: 12.5px;
}
.lens-brief-annexure .ann-headline {
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 1px;
}
.lens-brief-annexure .ann-url {
  display: block;
  color: var(--accent);
  font-size: 10.5px;
  margin-top: 2px;
  word-break: break-all;
  font-family: 'SF Mono', Monaco, monospace;
  cursor: pointer;
  text-decoration: none;
}
.lens-brief-annexure .ann-url:hover { text-decoration: underline; }

/* ============ v0.9.8 Stage 1 — Live tracking tab ============ */

.live-tab { display: block; padding: 0; }
.live-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 280px);
}

/* === Left rail === */
.live-rail {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}
.live-rail-label {
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.live-rail-count {
  color: var(--ink-soft); letter-spacing: 1px; font-size: 10px;
  background: var(--bg-soft); padding: 2px 6px; border-radius: 10px;
}
.live-time-pill {
  padding: 9px 12px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 7px; font-size: 12.5px; color: var(--ink-soft);
  cursor: pointer; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.live-time-pill.active {
  background: rgba(75,174,124,0.07); color: var(--ink);
  border-color: rgba(75,174,124,0.3);
}
.live-custom-dial {
  padding: 9px 12px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 7px; font-size: 12px; color: var(--ink-soft);
  margin-top: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.live-custom-dial i { font-size: 13px; }

.live-dot-tiny {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 4px; vertical-align: middle;
}
.live-dot-tiny.dim { background: var(--ink-mute); }
.live-dot-tiny.live-pulse { background: #4BAE7C; animation: live-pulse-anim 1.6s ease-in-out infinite; }
@keyframes live-pulse-anim {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(75,174,124,0.5); }
  50% { opacity: 0.65; box-shadow: 0 0 0 4px rgba(75,174,124,0); }
}

.live-watching-card {
  background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 7px;
  padding: 11px 12px;
}
.lw-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.lw-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-mute);
}
.lw-sub { font-size: 11px; color: var(--ink-mute); line-height: 1.5; }

.live-kw-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.live-kw-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; font-size: 11px;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 14px; color: var(--ink-soft); cursor: pointer;
}
.live-kw-chip.active {
  background: rgba(232,71,42,0.10);
  border-color: rgba(232,71,42,0.35);
  color: var(--accent);
}
.live-kw-badge {
  background: var(--bg-card); color: var(--ink-mute);
  font-size: 10px; padding: 0 5px; border-radius: 8px;
}
.live-kw-chip.active .live-kw-badge { background: rgba(232,71,42,0.18); color: var(--accent); }
.live-kw-chip.live-kw-add { color: var(--ink-mute); }
.live-kw-chip.live-kw-add i { font-size: 11px; }

.live-rail-input {
  width: 100%; box-sizing: border-box;
  padding: 8px 10px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 6px; color: var(--ink); font-size: 11.5px;
  font-family: inherit; outline: none;
}
.live-rail-input:focus { border-color: rgba(232,71,42,0.4); }
.live-rail-add-btns { display: flex; gap: 6px; margin-top: 6px; }
.live-rail-btn {
  flex: 1; padding: 7px 8px; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 1px solid var(--rule);
  border-radius: 6px; color: var(--ink-soft); cursor: pointer;
  font-family: inherit; font-weight: 500;
}
.live-rail-btn i { font-size: 12px; }
.live-rail-btn:hover { color: var(--ink); border-color: rgba(255,255,255,0.18); }
.live-rail-btn-primary {
  background: var(--accent); color: white; border-color: var(--accent); font-weight: 600;
}
.live-rail-btn-primary:hover { background: var(--accent); color: white; }

.live-rail-list { display: flex; flex-direction: column; gap: 1px; }
.live-rail-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 9px; border-radius: 5px;
  font-size: 12.5px; color: var(--ink-soft); cursor: pointer;
}
.live-rail-item:hover { background: rgba(255,255,255,0.03); }
.live-rail-item.active { color: var(--ink); background: rgba(255,255,255,0.04); }
.live-rail-num { color: var(--ink-mute); font-size: 11.5px; }

/* === Center pane === */
.live-pane {
  padding: 22px 32px 32px;
  overflow-y: auto;
}
.live-subnav {
  display: flex; gap: 4px; margin-bottom: 22px;
  border-bottom: 1px solid var(--rule); padding-bottom: 0;
}
.live-subnav-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; font-size: 13px;
  background: transparent; border: none;
  color: var(--ink-mute); cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit; font-weight: 500;
}
.live-subnav-tab i { font-size: 15px; }
.live-subnav-tab.active { color: var(--ink); border-bottom-color: var(--accent); }

.live-view { animation: live-fade 0.15s ease; }
@keyframes live-fade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

.live-section-head {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700; font-size: 22px;
  color: var(--ink); margin: 0 0 4px;
}
.live-section-sub {
  font-size: 10.5px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 18px; font-weight: 500;
}

/* Two-card grid (add + import) */
.live-mgr-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.live-mgr-card {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 10px; padding: 18px 20px;
}
.live-mgr-card-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700;
  color: var(--ink); margin-bottom: 4px;
}
.live-mgr-card-title i { color: var(--accent); font-size: 17px; }
.live-mgr-card-sub {
  font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 16px; font-weight: 500;
}

.live-form-field { margin-bottom: 11px; }
.live-form-field label {
  display: block; font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 5px; font-weight: 600;
}
.live-form-field input, .live-form-field select {
  width: 100%; box-sizing: border-box;
  padding: 9px 11px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 6px; color: var(--ink); font-size: 13px;
  font-family: inherit; outline: none;
}
.live-form-field input:focus, .live-form-field select:focus { border-color: rgba(232,71,42,0.4); }
.live-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-form-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

.live-btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; font-size: 13px;
  background: var(--accent); color: white;
  border: 1px solid var(--accent); border-radius: 7px;
  cursor: pointer; font-family: inherit; font-weight: 600;
}
.live-btn-primary i { font-size: 14px; }
.live-btn-primary:hover { filter: brightness(1.08); }
.live-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; font-size: 12px;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 6px;
  cursor: pointer; font-family: inherit; font-weight: 500;
}
.live-btn-secondary i { font-size: 13px; }

/* Import card */
.live-import-drop {
  border: 1.5px dashed rgba(255,255,255,0.16); border-radius: 8px;
  padding: 26px; text-align: center; cursor: pointer; margin-bottom: 14px;
  transition: border-color 0.15s ease;
}
.live-import-drop.drag { border-color: var(--accent); background: rgba(232,71,42,0.04); }
.live-import-drop i { font-size: 28px; color: var(--ink-mute); }
.live-import-text { font-size: 13px; color: var(--ink-soft); margin-top: 8px; font-weight: 500; }
.live-import-hint { font-size: 11px; color: var(--ink-mute); margin-top: 4px; }
.live-import-label {
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-bottom: 6px;
}
.live-import-format {
  background: var(--bg-card); border-radius: 6px; padding: 9px 12px;
  font-size: 11.5px; color: var(--ink-mute);
  font-family: 'SF Mono', Monaco, monospace; line-height: 1.5;
}
.live-import-format .col { color: var(--accent); }
.live-import-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; font-size: 11px; color: var(--ink-mute);
}

/* Table */
.live-table {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 9px; overflow: hidden;
}
.live-table-head, .live-table-row {
  display: grid; grid-template-columns: 2fr 2fr 1.1fr 1.2fr 0.8fr 80px;
  padding: 11px 18px; align-items: center; gap: 10px;
}
.live-table-head {
  background: var(--bg-card); font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--ink-mute); font-weight: 600;
  border-bottom: 1px solid var(--rule);
}
.live-table-row {
  border-bottom: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-soft);
}
.live-table-row:last-child { border-bottom: none; }
.live-table-row:hover { background: rgba(255,255,255,0.02); }
.live-cell-name {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 500;
}
.live-cell-name i { font-size: 14px; }
.live-cell-url {
  color: var(--ink-mute); font-family: 'SF Mono', Monaco, monospace;
  font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-cell-pri { color: var(--accent); letter-spacing: 1px; font-size: 13px; }
.live-cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn-sm {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--rule);
  border-radius: 5px; color: var(--ink-mute); cursor: pointer;
  font-family: inherit;
}
.icon-btn-sm i { font-size: 13px; }
.icon-btn-sm:hover { color: var(--accent); border-color: rgba(232,71,42,0.35); }
.live-table-empty {
  padding: 28px; text-align: center;
  font-size: 13px; color: var(--ink-mute);
}

/* Pills */
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; letter-spacing: 1.5px; padding: 3px 9px;
  border-radius: 10px; text-transform: uppercase; font-weight: 700;
}
.live-pill .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor;
}
.live-pill-live { background: rgba(75,174,124,0.18); color: #4BAE7C; }
.live-pill-offline { background: rgba(255,255,255,0.04); color: var(--ink-mute); border: 1px solid var(--rule); }
.live-pill-paused { background: rgba(255,181,71,0.15); color: #FFB547; }

/* Keywords view */
.live-kw-addbar { display: flex; gap: 8px; margin-bottom: 16px; }
.live-kw-addbar input {
  flex: 1; padding: 10px 14px;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 7px; color: var(--ink); font-size: 13px;
  font-family: inherit; outline: none;
}
.live-kw-list {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 9px; overflow: hidden;
}
.live-kw-row {
  display: grid; grid-template-columns: 1fr auto 80px;
  align-items: center; gap: 18px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--rule);
}
.live-kw-row:last-child { border-bottom: none; }
.live-kw-term { font-size: 14px; font-weight: 500; color: var(--ink); }
.live-kw-meta { font-size: 11.5px; color: var(--ink-mute); }
.live-kw-actions { display: flex; gap: 4px; justify-content: flex-end; }

.live-empty {
  padding: 36px; text-align: center;
  background: var(--bg-soft); border: 1px dashed var(--rule);
  border-radius: 9px; color: var(--ink-mute); font-size: 13px;
}

/* Settings */
.live-settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.live-settings-row:last-of-type { border-bottom: none; }
.live-settings-row > span:first-child {
  color: var(--ink-soft); font-weight: 500;
}
.live-settings-select {
  padding: 7px 10px;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 6px; color: var(--ink); font-size: 12px;
  font-family: inherit; outline: none; min-width: 280px;
}
.live-settings-note {
  margin-top: 14px; padding: 12px 14px;
  background: var(--bg-card); border-left: 2px solid var(--accent);
  border-radius: 5px;
  font-size: 11.5px; color: var(--ink-soft); line-height: 1.55;
}

/* ============ v0.9.8 Stage 1 — Live dashboard (mockup 1 default view) ============ */

/* Empty state */
.live-dash-empty {
  background: var(--bg-soft);
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 56px 30px;
  text-align: center;
}
.live-dash-empty i { font-size: 36px; color: var(--ink-mute); margin-bottom: 12px; }
.live-dash-empty .led-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 6px;
}
.live-dash-empty .led-sub { font-size: 13px; color: var(--ink-mute); max-width: 440px; margin: 0 auto; line-height: 1.5; }

/* Status row */
.live-status-row {
  display: flex; align-items: stretch;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 9px; margin-bottom: 22px; overflow: hidden;
}
.lsr-badge {
  width: 60px; display: flex; align-items: center; justify-content: center;
  background: rgba(75,174,124,0.08); border-right: 1px solid var(--rule);
}
.lsr-badge i { color: #4BAE7C; font-size: 20px; }
.lsr-body { flex: 1; padding: 13px 18px; }
.lsr-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lsr-label { font-size: 14px; font-weight: 500; color: var(--ink); }
.lsr-meta { font-size: 11.5px; color: var(--ink-mute); }
.lsr-bar { height: 4px; background: var(--bg-card); border-radius: 2px; overflow: hidden; }
.lsr-fill { height: 100%; background: #4BAE7C; transition: width 0.3s ease; }
.lsr-strip { display: flex; gap: 18px; margin-top: 10px; font-size: 11.5px; color: var(--ink-mute); flex-wrap: wrap; }
.lsr-strip span { display: inline-flex; align-items: center; gap: 5px; }
.lsr-strip i { font-size: 13px; }
.lsr-refresh {
  width: 50px; display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--rule); cursor: pointer;
}
.lsr-refresh i { color: var(--ink-mute); font-size: 16px; }

/* Priority block — video left, side card right */
.live-priority-block {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px;
  margin-bottom: 24px;
}
.live-video-frame {
  background: #000;
  border-radius: 9px;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.live-video-frame::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a1d24 0%, #0e1014 100%);
}
.lvf-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px;
}
.lvf-top { display: flex; justify-content: space-between; align-items: center; }
.lvf-live-tag {
  background: var(--accent); color: white;
  font-size: 10px; letter-spacing: 2px; padding: 4px 9px; border-radius: 3px;
  font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.lvf-live-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: white; }
.lvf-offline-tag {
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  font-size: 10px; letter-spacing: 2px; padding: 4px 9px; border-radius: 3px;
  font-weight: 700;
}
.lvf-channel-tag { color: rgba(255,255,255,0.85); font-size: 12px; font-weight: 500; }
.lvf-center { text-align: center; color: rgba(255,255,255,0.4); }
.lvf-center i { font-size: 56px; }
.lvf-bottom { display: flex; justify-content: space-between; color: rgba(255,255,255,0.7); font-size: 11px; }
.lvf-ctrl { display: inline-flex; gap: 12px; }

.live-priority-side { display: flex; flex-direction: column; gap: 12px; }
.live-priority-meta {
  background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 9px;
  padding: 13px 15px;
}
.lpm-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.lpm-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700; color: var(--ink); }
.lpm-sub { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; font-weight: 500; }
.lpm-row { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-mute); padding-top: 10px; border-top: 1px solid var(--rule); }
.lpm-row i { font-size: 12px; margin-right: 4px; vertical-align: -1px; }

.live-mini-transcript {
  background: var(--bg-card); border-radius: 6px;
  border-left: 2px solid #4BAE7C;
  padding: 10px 12px;
}
.lmt-head { display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; margin-bottom: 6px; }
.lmt-label { display: inline-flex; align-items: center; gap: 5px; }
.lmt-dot {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: #4BAE7C; animation: live-pulse-anim 1.6s ease-in-out infinite;
}
.lmt-dot.dim { background: var(--ink-mute); animation: none; }
.lmt-lag { color: var(--ink-mute); font-size: 9px; }
.lmt-placeholder { font-size: 12px; color: var(--ink-mute); line-height: 1.5; padding: 4px 0; font-style: italic; }

.live-btn-block { width: 100%; justify-content: center; padding: 10px; }

/* Live now section: filter pills */
.live-filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.live-filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 16px; font-size: 12px; color: var(--ink-soft);
  cursor: pointer; font-weight: 500;
}
.live-filter-pill i { font-size: 13px; }
.live-filter-pill .live-filter-badge {
  background: var(--bg-card); color: var(--ink-mute);
  font-size: 10.5px; padding: 0 6px; border-radius: 8px;
}
.live-filter-pill.active {
  background: rgba(232,71,42,0.10);
  border-color: rgba(232,71,42,0.35);
  color: var(--accent);
}
.live-filter-pill.active .live-filter-badge {
  background: rgba(232,71,42,0.18); color: var(--accent);
}

/* Channel grid */
.live-channel-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.live-channel-card {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 10px; padding: 14px 16px;
  cursor: pointer; transition: border-color 0.12s ease;
}
.live-channel-card:hover { border-color: rgba(255,255,255,0.18); }
.live-channel-card.is-live { border-left: 3px solid #4BAE7C; }
.lcc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.lcc-name {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.lcc-handle { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.lcc-mini-transcript {
  background: var(--bg-card); border-radius: 6px;
  border-left: 2px solid var(--ink-mute);
  padding: 8px 10px; margin-top: 10px;
}
.lcc-mini-transcript.is-live { border-left-color: #4BAE7C; }
.lcc-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--ink-mute); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.lcc-meta i { font-size: 13px; margin-right: 4px; vertical-align: -1px; }
.lcc-actions { display: flex; gap: 6px; margin-top: 12px; }
.lcc-btn {
  flex: 1; padding: 7px 8px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--rule);
  border-radius: 5px;
  font-size: 11.5px; color: var(--ink-soft); cursor: pointer;
  font-family: inherit; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.lcc-btn i { font-size: 13px; }
.lcc-btn:hover { color: var(--ink); border-color: rgba(255,255,255,0.18); }
.lcc-btn.lcc-btn-primary {
  background: rgba(232,71,42,0.10); color: var(--accent); border-color: rgba(232,71,42,0.35);
}

/* ============ v0.9.8 Stage 2 (session A) — Install cards ============ */

.live-install-ready {
  background: rgba(75,174,124,0.08);
  border: 1px solid rgba(75,174,124,0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.live-install-ready i { color: #4BAE7C; font-size: 17px; }
.live-install-ready-sub { color: var(--ink-mute); font-size: 11.5px; margin-left: auto; }

.live-install-card {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease;
}
.live-install-card.is-installed { border-color: rgba(75,174,124,0.22); }
.live-install-card .lic-head {
  display: flex; align-items: center; gap: 14px;
}
.live-install-card .lic-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: 8px;
  color: var(--ink-soft);
}
.live-install-card .lic-icon i { font-size: 20px; }
.live-install-card.is-installed .lic-icon { background: rgba(75,174,124,0.10); color: #4BAE7C; }
.live-install-card .lic-text { flex: 1; }
.live-install-card .lic-label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.live-install-card .lic-desc { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.live-install-card .lic-status { flex-shrink: 0; }

.live-install-card .lic-progress { margin-top: 14px; }
.live-install-card .lic-progress-bar {
  height: 6px; background: var(--bg-card);
  border-radius: 3px; overflow: hidden;
}
.live-install-card .lic-progress-fill {
  height: 100%; background: var(--accent);
  transition: width 0.25s ease;
  background-image: linear-gradient(90deg, var(--accent), #ff6e52);
}
.live-install-card .lic-progress-meta {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 11px; color: var(--ink-mute);
  font-family: 'SF Mono', Monaco, monospace;
}
.live-install-card .lic-progress-note {
  margin-top: 6px; font-size: 11px; color: var(--accent);
  display: flex; align-items: center; gap: 5px;
}
.live-install-card .lic-progress-note i {
  font-size: 13px;
  animation: live-spin 1.5s linear infinite;
}
@keyframes live-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.live-install-card .lic-error {
  margin-top: 12px; padding: 8px 11px;
  background: rgba(232,71,42,0.08);
  border: 1px solid rgba(232,71,42,0.22);
  border-radius: 6px;
  font-size: 12px; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.live-install-card .lic-error i { font-size: 14px; }

.live-install-card .lic-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
}
.live-install-card .lic-disk-size {
  font-size: 11px; color: var(--ink-mute);
}
.live-pill-error {
  background: rgba(232,71,42,0.15); color: var(--accent);
}

/* Indeterminate progress for brew-style installs (no byte count available) */
.lic-progress-indet {
  width: 30% !important;
  animation: lic-indet-slide 1.4s ease-in-out infinite;
}
@keyframes lic-indet-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(380%); }
}

/* ============ v0.9.8 Stage 2 (session B) — Live runtime UI ============ */

/* YouTube embedded iframe in priority block */
.live-video-frame .lvf-iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.live-video-frame .lvf-tag-overlay {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Status row when daemon is running */
.live-status-row.is-running .lsr-badge { background: rgba(75,174,124,0.15); }
.live-status-row.is-running .lsr-badge i {
  animation: live-pulse-anim 2s ease-in-out infinite;
}

/* Live transcript scrolling lines (priority block + cards) */
.live-mini-transcript .lmt-line,
.channel-mini-transcript .lmt-line,
.lcc-mini-transcript .lmt-line {
  display: flex; gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
  animation: lmt-slide-in 0.25s ease-out;
}
.live-mini-transcript .lmt-line.is-latest,
.lcc-mini-transcript .lmt-line.is-latest {
  color: var(--ink); font-weight: 500;
}
.live-mini-transcript .lmt-line.is-latest::after,
.lcc-mini-transcript .lmt-line.is-latest::after {
  content: '▍'; color: #4BAE7C;
  animation: lmt-blink 1s step-end infinite; margin-left: 4px;
}
.live-mini-transcript .lmt-ts,
.lcc-mini-transcript .lmt-ts {
  color: var(--ink-mute); font-family: 'SF Mono', Monaco, monospace;
  font-size: 10.5px; white-space: nowrap; min-width: 44px;
}
.live-mini-transcript .lmt-text,
.lcc-mini-transcript .lmt-text { flex: 1; word-break: break-word; }

@keyframes lmt-slide-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lmt-blink { 50% { opacity: 0.2; } }

/* Probe diagnostic on non-live channel cards */
.lcc-probe {
  margin: 8px 0;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(232,71,42,0.4);
  border-radius: 4px;
  font-size: 11px;
}
.lcc-probe-head {
  display: flex; align-items: center; gap: 6px;
  color: var(--ink-mute);
  margin-bottom: 3px;
}
.lcc-probe-head i { font-size: 12px; }
.lcc-probe-reason {
  color: var(--ink-soft);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 10.5px;
  word-break: break-word;
  line-height: 1.4;
}
.lcc-probe-upcoming {
  margin-left: auto;
  color: #4BAE7C;
  font-size: 10px;
  font-weight: 500;
}

/* Paste-URL modal overlay */
.paste-url-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  animation: pum-fade 0.15s ease;
}
.paste-url-modal {
  background: var(--bg-soft, #15181E);
  border: 1px solid var(--rule, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 20px 24px;
  width: 520px; max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  color: var(--ink, #e5e7eb);
  font-family: Inter, -apple-system, sans-serif;
}
.pum-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.pum-head h3 {
  margin: 0; font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: 20px; color: var(--ink);
}
.pum-close {
  background: transparent; border: 0; color: var(--ink-mute, #888);
  font-size: 22px; cursor: pointer; padding: 0 4px;
}
.pum-close:hover { color: var(--ink); }
.pum-channel { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }
.pum-help { font-size: 12px; color: var(--ink-mute); margin: 0 0 14px; line-height: 1.5; }
.pum-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'SF Mono', Monaco, monospace;
  outline: none;
  box-sizing: border-box;
}
.pum-input:focus { border-color: var(--accent, #E8472A); }
.pum-example { font-size: 11px; color: var(--ink-mute); margin: 8px 0 0; }
.pum-example code {
  background: rgba(255,255,255,0.05); padding: 2px 5px; border-radius: 3px;
  font-family: 'SF Mono', Monaco, monospace; font-size: 10.5px;
}
.pum-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 18px;
}
@keyframes pum-fade { from { opacity: 0; } to { opacity: 1; } }

/* v0.9.10 — Rolling Claude brief card */
.live-brief-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
}
.live-brief-card .lbc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.live-brief-card .lbc-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}
.live-brief-card .lbc-label i { font-size: 14px; color: var(--accent); }
.live-brief-card .lbc-tag {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  margin-left: 4px;
  letter-spacing: 0.05em;
}
.live-brief-card .lbc-updated {
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0;
}
.live-brief-card .lbc-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.live-brief-card .lbc-placeholder,
.live-brief-card .lbc-error {
  font-size: 12px;
  font-style: italic;
  color: var(--ink-mute);
  padding: 8px 0;
}
.live-brief-card .lbc-error { color: var(--neg); font-style: normal; }
.live-brief-card .lbc-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.live-brief-card .lbc-btn-refresh,
.live-brief-card .lbc-btn-report {
  flex: 1;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.live-brief-card .lbc-btn-refresh:hover:not(:disabled),
.live-brief-card .lbc-btn-report:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: var(--ink-mute);
}
.live-brief-card .lbc-btn-refresh:disabled,
.live-brief-card .lbc-btn-report:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.live-brief-card .lbc-btn-report {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.live-brief-card .lbc-btn-report:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.live-brief-card .lbc-spin {
  animation: lbc-spin 0.8s linear infinite;
}
@keyframes lbc-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
 * v0.9.11 — Layout & Typography rework for Live priority block
 * ============================================================ */

/* Bring Arimo into the renderer for the brief card.
   The same .woff2 files are bundled for main-process PDF generation;
   here we fall back to Arial which is metrically identical. */
@font-face {
  font-family: 'Arimo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Arimo'), local('Arial');
}
@font-face {
  font-family: 'Arimo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Arimo Bold'), local('Arial Bold');
}

/* Two-column priority block: LEFT = video stack, RIGHT = brief stack */
.live-priority-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 16px;
  align-items: stretch;
}

.live-priority-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.live-priority-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Slim 1-line meta row under the video */
.live-priority-meta-slim {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  font-size: 11.5px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink-soft);
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
}
.live-priority-meta-slim .lpms-name {
  font-weight: 600;
  color: var(--ink);
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-priority-meta-slim .lpms-sep { color: var(--ink-faint); }
.live-priority-meta-slim .lpms-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.live-priority-meta-slim .lpms-live {
  background: var(--pos-soft);
  color: var(--pos);
}
.live-priority-meta-slim .lpms-offline {
  background: var(--neutral-soft);
  color: var(--neutral);
}
.live-priority-meta-slim .lpms-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
}
.live-priority-meta-slim .lpms-item i { font-size: 12px; }
.live-priority-meta-slim .lpms-cat {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* v0.9.12 — "Open full stream view" button placed under the slim meta strip
   (left column) instead of below the brief card on the right. */
.live-priority-left .live-btn-primary.live-btn-block {
  margin-top: 2px;
}

/* Brief card — Arimo + 1.4 line-height + 0/8 para spacing (v0.9.11) */
.live-brief-card,
.live-brief-card .lbc-body,
.live-brief-card .lbc-label,
.live-brief-card .lbc-updated,
.live-brief-card .lbc-placeholder,
.live-brief-card .lbc-error,
.live-brief-card .lbc-btn-refresh,
.live-brief-card .lbc-btn-report {
  font-family: 'Arimo', Arial, sans-serif;
}
.live-brief-card .lbc-body {
  line-height: 1.4;
  font-size: 12.5px;
  max-height: 460px;       /* taller now that brief gets the prime spot */
}
.live-brief-card .lbc-body p {
  margin: 0 0 8px 0;       /* 0 before, 8 after */
  line-height: 1.4;
}

/* v0.9.11 — brief content typography (theme-adaptive in v0.9.12) */
.live-brief-card .lbc-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 10px 0;       /* 0 before, 10 after (slightly more for headline) */
  letter-spacing: 0.2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.live-brief-card .lbc-bullet {
  position: relative;
  padding-left: 14px;
  margin: 0 0 8px 0;        /* 0 before, 8 after */
  line-height: 1.4;
  font-size: 12.5px;
  color: var(--ink);
}
.live-brief-card .lbc-bullet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.live-brief-card .lbc-bullet.breaking {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  padding: 4px 8px 4px 14px;
  border-radius: 3px;
  margin-bottom: 6px;
}
.live-brief-card .lbc-bullet.breaking::before {
  background: var(--accent);
  left: 6px;
  top: 11px;
}
.live-brief-card .lbc-line {
  margin: 0 0 8px 0;
  line-height: 1.4;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ============================================================
 * v0.9.12 — Report Kind Chooser Modal
 * ============================================================
 * Modal dialog that opens when user clicks "Generate Report".
 * Two options: Snapshot (B&W) and Brief (Editorial Cream).
 */
.rk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.rk-modal {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 22px 18px;
  width: 460px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
  font-family: 'Arimo', Arial, sans-serif;
}
.rk-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.rk-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.rk-modal-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-mute);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rk-modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.rk-modal-close i { font-size: 16px; }
.rk-modal-sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.rk-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rk-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font-family: inherit;
}
.rk-opt:hover {
  background: var(--bg-soft);
  border-color: var(--accent);
}
.rk-opt:active { transform: translateY(1px); }
.rk-opt-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rk-opt-icon i { font-size: 20px; }
.rk-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rk-opt-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.rk-opt-desc {
  font-size: 12px;
  color: var(--ink-mute);
}

/* ============================================================
 * v0.9.12.1 — In-place progress bar for Generate Report button
 * ============================================================
 * When generating, the existing report button keeps the same width and
 * height but its content becomes a progress fill + label row. The fill
 * animates left-to-right via JS (synthetic, since the underlying Claude
 * API call doesn't stream %).
 */
.live-brief-card .lbc-btn-report.lbc-btn-progress {
  position: relative;
  overflow: hidden;
  cursor: progress;
  padding: 0;
  /* Reset hover styles so the fill is the visual feedback */
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--rule-strong);
}
.live-brief-card .lbc-btn-report.lbc-btn-progress:hover {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--rule-strong);
}
.live-brief-card .lbcp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent-soft);
  border-right: 1px solid var(--accent);
  transition: width 0.08s linear;
  z-index: 1;
}
.live-brief-card .lbcp-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 11.5px;
  font-family: 'Arimo', Arial, sans-serif;
  color: var(--ink);
  font-weight: 500;
}
.live-brief-card .lbcp-label i { font-size: 13px; color: var(--accent); }
.live-brief-card .lbcp-eta {
  font-size: 10.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

/* ============================================================
 * v0.9.12.8 — Past Streams list (Live tab, below channel grid)
 * ============================================================ */
.live-past-streams { display: block; }
.live-past-streams .lps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-past-streams .lps-loading,
.live-past-streams .lps-empty {
  color: var(--ink-mute);
  font-size: 13px;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  text-align: center;
}
.live-past-streams .lps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.live-past-streams .lps-row-main { flex: 1; min-width: 0; }
.live-past-streams .lps-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-past-streams .lps-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-mute);
}
.live-past-streams .lps-row-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.live-past-streams .lps-row-meta i { font-size: 13px; }
.live-past-streams .lps-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.live-past-streams .lps-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: 'Arimo', Arial, sans-serif;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
  min-width: 100px;
  justify-content: center;
}
.live-past-streams .lps-btn:hover:not(:disabled):not(.lbc-btn-progress) {
  background: var(--bg-soft);
  border-color: var(--ink-mute);
}
.live-past-streams .lps-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.live-past-streams .lps-btn-brief {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.live-past-streams .lps-btn-brief:hover:not(:disabled):not(.lbc-btn-progress) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
/* v0.9.12.12 — One Pager button. Neutral outline, slightly bolder weight to
   signal it's the recommended "fast" report. */
.live-past-streams .lps-btn-onepager {
  font-weight: 600;
}
.live-past-streams .lps-btn-onepager:hover:not(:disabled):not(.lbc-btn-progress) {
  background: var(--bg-soft);
  border-color: var(--ink);
}
.live-past-streams .lps-btn i { font-size: 13px; }
/* Progress-bar variant for lps-btn (reuses startInPlaceProgress helper) */
.live-past-streams .lps-btn.lbc-btn-progress {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--rule-strong);
  cursor: progress;
  padding: 0;
}

/* v0.9.12.14 — Universe toggle (toolbar, between theme + Alerts) */
.universe-toggle { transition: all 0.18s ease; }
.universe-toggle.on {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* v0.9.12.21 — clickable toast */
.toast-clickable { cursor: pointer; box-shadow: 0 0 0 1px var(--accent) inset; }
.toast-clickable:hover { filter: brightness(1.1); }

/* v0.9.12.22 — archive sort chips */
.sort-chips { display: flex; gap: 4px; align-items: center; }
.sort-chip {
  font-size: 11px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.sort-chip:hover { color: var(--ink); border-color: var(--ink-mute); }
.sort-chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
