
/* ── Design Tokens: White / Black / Gray (app-wide as of 2026-05-14) ──
   Previously a Claude-style dark blue theme. Aaron moved the whole app
   to match the Content Studio white/gray theme. Color tokens (green,
   yellow, red) kept for state indicators but desaturated. */
:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-raised: #ececec;
  --surface-hover: #e2e2e2;
  --text: #1a1a1a;
  --text-2: #6b6b6b;
  --text-3: #9a9a9a;
  --text-4: #c8c8c8;
  --accent: #2a2a2a;
  --accent-soft: rgba(42,42,42,0.06);
  --accent-warm: #d4956a;
  --hh: #2a2a2a;
  --hh-soft: rgba(42,42,42,0.06);
  --green: #2dbe7e;
  --green-soft: rgba(45,190,126,0.12);
  --yellow: #d4956a;
  --yellow-soft: rgba(212,149,106,0.12);
  --red: #d04848;
  --red-soft: rgba(208,72,72,0.10);
  --divider: #e0e0e0;
  --radius-card: 16px;
  --radius-input: 24px;
  --radius-pill: 20px;
  --tab-height: 56px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-height) + env(safe-area-inset-bottom));
}

/* ── Layout ── */
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}
.screen.active { display: flex; flex-direction: column; }

.page-header {
  padding: calc(18px + env(safe-area-inset-top)) 20px 14px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 20;
  border-bottom: 1px solid var(--divider);
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 1px;
}

.content-area {
  flex: 1;
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Bottom Tab Bar ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: flex-start;
  padding-top: 6px;
  z-index: 50;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0 0;
  cursor: pointer;
  min-height: 44px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-item:active { opacity: 0.7; }
.tab-icon {
  font-size: 20px;
  line-height: 1;
}
.tab-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.2px;
}
.tab-item.active .tab-label { color: var(--accent); }
.tab-item.active .tab-icon { filter: drop-shadow(0 0 6px rgba(232,200,114,0.5)); }
.tab-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.card-inner {
  padding: 14px 16px;
}

/* ── Section Headers ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-3);
  padding: 8px 4px 6px;
}

/* ── Segmented Control ── */
.seg-ctrl {
  display: flex;
  background: var(--surface);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin: 0 0 4px;
}
.seg-btn {
  flex: 1;
  padding: 7px 6px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.seg-btn.active {
  background: var(--surface-raised);
  color: var(--text);
}
.seg-btn:active { opacity: 0.7; }

/* ── Score Pill ── */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}
.score-high { background: var(--green-soft); color: var(--green); }
.score-med { background: var(--yellow-soft); color: var(--yellow); }
.score-low { background: var(--accent-soft); color: var(--accent); }

/* ── Status Pill ── */
.status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.status-booked { background: var(--green-soft); color: var(--green); }
.status-convo { background: var(--accent-soft); color: var(--accent); }
.status-outreach { background: var(--yellow-soft); color: var(--yellow); }
.status-research { background: rgba(168,164,160,0.15); color: var(--text-2); }

/* ── Platform Tag ── */
.platform-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.platform-li { background: rgba(43,136,216,0.15); color: #5ba8f5; }
.platform-ig { background: rgba(232,97,137,0.15); color: #f07ba4; }
.platform-email { background: var(--hh-soft); color: var(--hh); }
.platform-sub { background: rgba(255,104,27,0.15); color: #ff9a5c; }

/* ── Age Badge ── */
.age-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.age-fresh { background: var(--green-soft); color: var(--green); }
.age-warn { background: var(--yellow-soft); color: var(--yellow); }
.age-old { background: var(--red-soft); color: var(--red); }

/* ── Row items ── */
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row-item:last-child { border-bottom: none; }
.row-item:active { opacity: 0.7; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.row-main { flex: 1; min-width: 0; }
.row-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }

/* ── Today Tab ── */
.today-greeting {
  padding: calc(20px + env(safe-area-inset-top)) 20px 12px;
}
.greeting-hi {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.greeting-date {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 2px;
}

.today-event-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.today-event-row:last-child { border-bottom: none; }
.event-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  width: 52px;
  flex-shrink: 0;
  padding-top: 2px;
}
.event-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hh);
  flex-shrink: 0;
  margin-top: 6px;
}
.event-title { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.prep-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.pulse-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.pulse-row:last-child { border-bottom: none; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pulse-dot.green { background: var(--green); }
.pulse-dot.yellow { background: var(--yellow); }
.pulse-name { font-size: 14px; font-weight: 600; flex: 1; }
.pulse-meta { font-size: 12px; color: var(--text-3); }
.pulse-age { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.content-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 2px;
  cursor: pointer;
}
.content-queue-row:active { opacity: 0.7; }

/* ── Lead Score Bar ── */
.score-bar-wrap { margin-top: 4px; }
.score-bar-track {
  height: 3px;
  background: var(--divider);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--green);
  transition: width 0.3s;
}

/* ── Contact Card (People tab) ── */
.contact-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 0;
}
.contact-card-inner {
  padding: 14px 16px;
}
.contact-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 16px; font-weight: 600; }
.contact-title { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.contact-company { font-size: 13px; color: var(--text-3); }
.contact-score-area { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.contact-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text-2);
  font-size: 11px;
}
.contact-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.btn-sm {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.btn-sm:active { opacity: 0.7; }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-secondary { background: var(--surface-raised); color: var(--text-2); }
.btn-ghost { background: transparent; color: var(--text-3); border: 1px solid var(--divider); }

/* ── Draft Card (Content tab) ── */
.draft-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 12px;
}
.draft-card:last-child { margin-bottom: 0; }
.draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--divider);
}
.draft-source { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.draft-body { padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--text); }
.draft-hashtags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 12px; }
.hashtag {
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}
.draft-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--divider);
}
.stars { display: flex; gap: 2px; font-size: 16px; color: var(--text-3); cursor: pointer; }
.stars .star { transition: color 0.12s; }
.stars .star.on { color: var(--yellow); }
.stars .star:active { transform: scale(1.2); }

/* ── Content Studio: source posts list ── */
.source-post-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.source-post-card:active { background: var(--surface-hover); }
.source-post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.source-post-snippet {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source-post-stats {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 6px;
}

/* Review pane */
.review-header {
  display: flex;
  align-items: center;
  padding: 8px 4px 12px;
  gap: 8px;
}
.review-back {
  background: transparent;
  color: var(--accent);
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
}
.review-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}
.review-spacer { width: 60px; }

.atomize-engine-row {
  display: flex;
  gap: 6px;
  background: var(--surface-raised);
  border-radius: 10px;
  padding: 3px;
}
.engine-pill {
  flex: 1;
  padding: 7px 6px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
}
.engine-pill .engine-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 2px;
}
.engine-pill.active .engine-sub { color: var(--text-2); }
.engine-pill.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.regen-picker {
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--divider);
  margin-top: 4px;
}
.regen-label {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}
.engine-pill-sm {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--divider);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.engine-pill-sm:hover { background: var(--accent-soft); color: var(--accent); }
.regen-btn { font-size: 15px; padding: 4px 8px; }

/* ── Content Studio: scoped white/black theme (mockup v3) ─────────────────
   Overrides the app's blue/dark palette inside #screen-content only.
   Components use CSS vars throughout, so re-binding the vars cascades. */
#screen-content {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-raised: #ececec;
  --surface-hover: #e2e2e2;
  --text: #1a1a1a;
  --text-2: #6b6b6b;
  --text-3: #9a9a9a;
  --text-4: #c8c8c8;
  --accent: #2a2a2a;
  --accent-soft: rgba(42,42,42,0.06);
  --divider: #e0e0e0;
  background: #f4f4f4;
  color: #1a1a1a;
}
/* Content tab "chrome" — header + segment selector + search bar — sits on
   white to match the mockup. The card list area below uses --bg #f4f4f4. */
#screen-content .page-header,
#screen-content .sub-tabs,
#screen-content .content-search-wrap {
  background: #ffffff;
}
#screen-content .page-header { border-bottom: none; padding-bottom: 6px; }
#screen-content .sub-tabs { padding: 0 16px 0; }
#screen-content .content-search-wrap {
  /* Horizontal padding matches the inner pill bar:
     16px sub-tabs padding + 3px seg-ctrl padding = 19px so the search
     input lines up with the seg buttons, not the seg outer container.
     Vertical padding is 12px both sides — symmetric around the search bar
     and matches the gap between content cards. */
  padding: 12px 19px 12px;
  border-bottom: 1px solid var(--divider);
}
/* Tighter spacing inside the Content card area — pull the section label
   close to the chrome above. */
#screen-content .content-area { padding-top: 6px; gap: 6px; }
#screen-content .section-label { padding: 4px 4px 2px; }
#screen-content .card,
#screen-content .draft-card,
#screen-content .source-post-card {
  border: 1px solid var(--divider);
  box-shadow: none;
  background: #ffffff;
}
#screen-content .btn-primary { background: #2a2a2a; color: #ffffff; }
#screen-content .btn-primary:active { background: #1a1a1a; }
#screen-content .btn-secondary { background: #f5f5f5; color: #1a1a1a; border: 1px solid #e7e7e7; }
#screen-content .btn-ghost { background: transparent; color: #6b6b6b; border: 1px solid #e7e7e7; }
#screen-content .hashtag { background: #f0f0f0; color: #1a1a1a; }
#screen-content .seg-ctrl { background: #ececec; }
#screen-content .seg-btn.active { background: #ffffff; color: #1a1a1a; }
#screen-content .stars .star.on { color: #2a2a2a; }
#screen-content .engine-pill-sm:hover,
#screen-content .engine-pill.active { background: #ffffff; color: #1a1a1a; }
#screen-content .page-title,
#screen-content .review-title { color: #1a1a1a; }
#screen-content .empty-state strong { color: #1a1a1a; display: block; margin-bottom: 4px; }
#screen-content .empty-state { padding: 18px 16px; line-height: 1.45; }
/* Collapsible week section header */
#screen-content .week-group { margin-bottom: 14px; }
#screen-content .week-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 6px; cursor: pointer; user-select: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: #6b6b6b; text-transform: uppercase;
}
#screen-content .week-header .chev {
  font-size: 14px; color: #9a9a9a; transition: transform 0.15s;
}
#screen-content .week-header.collapsed .chev { transform: rotate(-90deg); }
#screen-content .week-header .count { color: #9a9a9a; font-weight: 500; text-transform: none; letter-spacing: 0; }
#screen-content .week-body.hidden { display: none; }
/* Atomize-in-flight badge on source cards */
#screen-content .atomize-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #2a2a2a; background: #f0f0f0;
  padding: 2px 8px; border-radius: 10px; font-weight: 500;
}
/* Collapsed derivative card (approved / published / skipped) */
#screen-content .draft-card .collapsed-summary,
#screen-content .draft-card .collapsed-actions { display: none; }
#screen-content .draft-card.is-collapsed .draft-expanded { display: none; }
#screen-content .draft-card.is-collapsed .collapsed-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer;
}
#screen-content .draft-card.is-collapsed .collapsed-actions {
  display: flex; gap: 8px;
  padding: 0 12px 10px; border-top: 1px solid var(--divider);
  padding-top: 8px;
}
#screen-content .collapsed-snippet {
  flex: 1; font-size: 13px; color: #6b6b6b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#screen-content .collapsed-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  white-space: nowrap;
}
#screen-content .badge-approved { background: #e8f5ec; color: #2dbe7e; }
#screen-content .badge-skipped  { background: #f0f0f0; color: #9a9a9a; }
#screen-content .draft-card.is-collapsed { opacity: 0.85; }
#screen-content .draft-card.is-collapsed:hover { opacity: 1; }

/* Linkified URLs inside draft body */
#screen-content .draft-body a {
  color: #2a6cdf;
  text-decoration: underline;
  word-break: break-all;
}

/* Library archive */
#screen-content .library-filters {
  display: flex; gap: 6px; padding: 4px 0 12px; overflow-x: auto;
}
#screen-content .lib-chip {
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  background: #ffffff; color: #6b6b6b;
  border: 1px solid #e7e7e7; border-radius: 18px;
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#screen-content .lib-chip.active {
  background: #2a2a2a; color: #ffffff; border-color: #2a2a2a;
}

/* ── Option A filter strip (slim segmented + theme) ── */
#screen-content .lib-filter-strip {
  display: flex; flex-direction: column; gap: 6px;
  padding: 2px 0 10px;
}
#screen-content .seg-row {
  display: flex; gap: 3px; padding: 3px;
  background: #ececec; border-radius: 10px;
}
#screen-content .seg-row .seg {
  flex: 1; min-width: 0;
  padding: 6px 4px; font-size: 12.5px; font-weight: 500;
  color: #6b6b6b; background: transparent;
  border: none; border-radius: 7px;
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
#screen-content .seg-row .seg.active {
  background: #ffffff; color: #1a1a1a; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
#screen-content .seg-row-icons .seg { font-size: 12px; }
#screen-content .lib-theme-row {
  display: flex; justify-content: flex-start;
}
#screen-content .lib-theme-btn {
  padding: 5px 11px 5px 13px; font-size: 12px; font-weight: 500;
  color: #4a4a4a; background: #ffffff;
  border: 1px solid #e0e0e0; border-radius: 14px;
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
#screen-content .lib-theme-btn.has-theme {
  color: #1a5fbf; background: #e8f1fd; border-color: #b8d4f5;
}

/* ── Source posts filter row (same slim pattern) ── */
#screen-content .source-filter-row {
  display: flex; gap: 3px; padding: 3px; margin: 0 0 12px;
  background: #ececec; border-radius: 10px;
}
#screen-content .src-chip {
  flex: 1; min-width: 0;
  padding: 6px 4px; font-size: 12.5px; font-weight: 500;
  color: #6b6b6b; background: transparent;
  border: none; border-radius: 7px;
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
#screen-content .src-chip.active {
  background: #ffffff; color: #1a1a1a; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
#screen-content .lib-group { margin-bottom: 20px; }
#screen-content .lib-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 0 2px 8px;
}
#screen-content .lib-group-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px;
}
#screen-content .lib-group-count {
  font-size: 12px; color: #9a9a9a; font-weight: 500;
}
#screen-content .lib-card {
  background: #ffffff; border: 1px solid #e7e7e7;
  border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px;
}
#screen-content .lib-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
#screen-content .lib-date {
  font-size: 11px; color: #9a9a9a; font-weight: 500;
}
#screen-content .lib-snippet {
  font-size: 13px; color: #1a1a1a; line-height: 1.45;
}
#screen-content .lib-stars {
  font-size: 12px; color: #2a2a2a; margin-top: 4px; letter-spacing: 1px;
}
/* Library card: meta row above the action row */
#screen-content .lib-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  gap: 8px;
}
#screen-content .lib-source-link {
  background: transparent; border: none; padding: 0;
  font-size: 12px; font-weight: 500; color: #6b6b6b; cursor: pointer;
  font-family: inherit;
}
#screen-content .lib-source-link:hover { color: #2a2a2a; text-decoration: underline; }

/* Library card action row — all buttons same flex=1 width */
#screen-content .lib-actions {
  display: flex; align-items: stretch; gap: 6px;
  margin-top: 8px;
}
#screen-content .lib-actions .btn-sm,
#screen-content .lib-actions a.btn-sm {
  flex: 1 1 0; min-width: 0;
  padding: 7px 8px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 8px;
}

/* Source post card: footer with stats + expand toggle */
#screen-content .source-post-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #f2f2f2;
  gap: 8px;
}
#screen-content .source-expand-btn,
#screen-content .lib-expand-btn {
  background: transparent; border: none;
  font-size: 11px; font-weight: 600; color: #6b6b6b;
  padding: 2px 6px; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
#screen-content .source-expand-btn:hover,
#screen-content .lib-expand-btn:hover { color: #1a1a1a; }
#screen-content .source-post-full {
  font-size: 13px; color: #1a1a1a; line-height: 1.5;
  padding: 8px 0; word-break: break-word;
}
#screen-content .lib-full {
  font-size: 13px; color: #1a1a1a; line-height: 1.5;
  padding: 6px 0; word-break: break-word;
}
#screen-content .lib-full a { color: #2a6cdf; text-decoration: underline; }

/* Expanded draft card: right-side header cluster (badge + stars + collapse) */
#screen-content .draft-header-right {
  display: flex; align-items: center; gap: 8px;
}
#screen-content .collapse-toggle {
  background: transparent; border: none;
  font-size: 14px; color: #9a9a9a; padding: 2px 8px;
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
#screen-content .collapse-toggle:hover { color: #1a1a1a; }

/* Unified Content header */
#screen-content .content-header {
  display: flex; align-items: flex-start;
  gap: 8px; position: relative;
  flex-wrap: nowrap;
}
#screen-content .content-header-titles { flex: 1; min-width: 0; }
#screen-content .content-back-btn {
  background: transparent; border: none;
  color: #2a2a2a; font-size: 15px; font-weight: 500;
  padding: 4px 4px 4px 0; cursor: pointer;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
  margin-top: 4px; white-space: nowrap;
}
#screen-content .content-back-btn:hover { color: #1a1a1a; }
#screen-content .content-menu-btn {
  background: transparent; border: none;
  color: #6b6b6b; font-size: 22px; line-height: 1;
  padding: 0 6px; cursor: pointer;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
  margin-top: 4px;
}
#screen-content .content-menu-btn:hover { color: #1a1a1a; }
#screen-content .profile-switcher {
  align-self: center; margin-top: 4px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: #2a2a2a; background: #f2f2f4;
  border: 1px solid #e2e2e6; border-radius: 8px;
  padding: 5px 8px; cursor: pointer; max-width: 44vw;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 430px) {
  #screen-content .content-header {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  #screen-content .content-header-titles {
    flex: 1 0 100%;
    padding-right: 32px;
  }
  #screen-content .profile-switcher {
    max-width: calc(100% - 44px);
    margin-top: 0;
  }
  #screen-content .content-menu-btn {
    margin-left: auto;
    margin-top: 0;
  }
}

/* Menu sheet (action sheet style) */
#screen-content .content-menu-sheet {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.18);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 56px 12px 0;
}
#screen-content .content-menu-card {
  background: #fff; border-radius: 14px;
  border: 1px solid #e7e7e7;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  min-width: 220px; padding: 6px 0;
}
#screen-content .content-menu-section {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  color: #9a9a9a; text-transform: uppercase;
  padding: 12px 16px 4px;
}
#screen-content .content-menu-section:first-child { padding-top: 8px; }
#screen-content .content-menu-item {
  display: block;
  padding: 10px 16px; font-size: 14px; color: #1a1a1a;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  border-top: 1px solid #f2f2f2;
}
/* No top border on the first item under a section header */
#screen-content .content-menu-section + .content-menu-item { border-top: none; }
#screen-content .content-menu-item:hover { background: #f5f5f5; }

/* Editing banner — top of card in edit mode */
#screen-content .edit-banner {
  background: #f5f5f5; padding: 8px 14px;
  font-size: 11px; font-weight: 600; color: #2a2a2a;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid #e7e7e7;
  display: flex; justify-content: space-between; align-items: center;
}
#screen-content .edit-banner .save-status {
  color: #6b6b6b; font-size: 10px; text-transform: none;
  letter-spacing: 0; font-weight: 500;
}

/* Editable hashtag row */
#screen-content .editable-tags .hashtag.tag-edit {
  outline: none; cursor: text;
}
#screen-content .editable-tags .hashtag.tag-edit:focus {
  background: #fff; border: 1px solid #2a2a2a;
}
/* "+ add tag" — same dimensions as a .hashtag pill so the row stays aligned;
   dashed border indicates the affordance. */
#screen-content .editable-tags .add-tag {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  border: 1px dashed #c8c8c8;
  background: transparent;
  color: #6b6b6b;
  cursor: pointer;
  font-family: inherit;
}
#screen-content .editable-tags .add-tag:active { opacity: 0.7; }

/* Inline edit mode — derivative card becomes editable */
#screen-content .draft-card.is-editing {
  border-color: #2a2a2a;
  box-shadow: 0 0 0 1px #2a2a2a;
}
#screen-content .draft-body.editable {
  outline: none;
  background: #fafafa;
  border-top: 1px dashed #e7e7e7;
  border-bottom: 1px dashed #e7e7e7;
  cursor: text;
  min-height: 80px;
}
#screen-content .draft-body.editable:focus {
  background: #fff;
}
#screen-content .draft-card.is-editing .draft-actions { display: none; }
#screen-content .draft-card.is-editing .regen-picker { display: none; }
#screen-content .edit-chrome { background: #fafafa; border-top: 1px solid #e7e7e7; }
/* Assist pills — reuse .btn-sm.btn-secondary; just override flex so they
   size to content instead of filling the row. Same look as Edit / Copy etc. */
#screen-content .assist-row {
  display: flex; gap: 8px; padding: 10px 14px;
  flex-wrap: wrap;
}
#screen-content .assist-row .assist-pill {
  flex: 1 1 auto; min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #f5f5f5; color: #1a1a1a;
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#screen-content .assist-row .assist-pill:active { opacity: 0.7; }

#screen-content .critic-panel {
  border-top: 1px solid #f0f0f0; padding: 10px 14px;
}
#screen-content .critic-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; color: #6b6b6b;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px;
}
/* Re-run critic — uses the same .btn-sm.btn-ghost pattern */
#screen-content .critic-run {
  padding: 6px 12px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: transparent; color: #6b6b6b;
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  text-transform: none; letter-spacing: 0;
}
#screen-content .critic-run:active { opacity: 0.7; }
#screen-content .critic-items { display: flex; flex-direction: column; gap: 4px; }
#screen-content .critic-item {
  display: flex; gap: 8px; font-size: 12px; color: #1a1a1a; line-height: 1.5;
}
#screen-content .critic-item .dot { color: #d4956a; font-weight: 700; margin-top: 1px; }
#screen-content .critic-item.ok .dot { color: #2dbe7e; }
#screen-content .critic-item .label-bold { font-weight: 600; }
#screen-content .edit-actions-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px; border-top: 1px solid #e7e7e7;
  background: #fff;
}
#screen-content .edit-actions-row .btn-sm { flex: 1; }

/* ── Composer (full-page sheet) ───────────────────────────────────── */
.composer-sheet {
  position: fixed; left: 0; right: 0; top: 0; bottom: 0;
  z-index: 100;
  background: #ffffff;
  display: flex; flex-direction: column;
  max-width: 414px; margin: 0 auto;
  transition: transform 220ms ease, height 220ms ease, top 220ms ease, bottom 220ms ease;
}

/* Minimized: sits above tab-bar as a 48px pill. Body + assist hidden. */
.composer-sheet.minimized {
  top: auto;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 8px);
  left: 8px; right: 8px;
  max-width: calc(430px - 16px);
  margin: 0 auto;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
  z-index: 120;
  overflow: hidden;
  cursor: pointer;
}
.composer-sheet.minimized .composer-body,
.composer-sheet.minimized .composer-assist-bar,
.composer-sheet.minimized .composer-title-input-wrap {
  display: none !important;
}
.composer-sheet.minimized .composer-bar {
  padding: 8px 14px;
  border-bottom: none;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.composer-sheet.minimized .composer-title {
  font-size: 13px; text-align: left;
}
.composer-sheet.minimized .composer-title-meta {
  font-size: 10px; color: #b45309;
}
.composer-sheet.minimized .composer-cancel { font-size: 18px; padding: 4px 8px; color: #888; }
.composer-sheet.minimized .composer-save { display: none; }
.composer-sheet.minimized::before {
  content: "✍︎";
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: #b45309;
}
.composer-sheet.minimized .composer-bar { padding-left: 38px; }
.composer-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e7e7e7;
  background: #ffffff;
}
.composer-cancel, .composer-save {
  background: transparent; border: none;
  color: #2a2a2a; font-size: 15px;
  padding: 4px 8px; cursor: pointer;
  font-family: inherit;
}
.composer-save { font-weight: 600; }
.composer-cancel:active, .composer-save:active { opacity: 0.7; }
.composer-title {
  flex: 1; text-align: center;
  font-weight: 700; font-size: 14px;
  color: #1a1a1a;
}
.composer-title-meta {
  font-size: 11px; color: #6b6b6b; font-weight: 400; margin-top: 1px;
}
.composer-title-input-wrap {
  padding: 8px 14px 4px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}
.composer-title-input {
  width: 100%; border: none; outline: none;
  font-size: 14px; font-weight: 500;
  color: #1a1a1a; font-family: inherit;
  background: transparent;
  padding: 4px 0;
}
.composer-title-input::placeholder { color: #b8b8b8; font-weight: 400; }
.composer-theme-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0 6px;
}
.composer-theme-lbl { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.composer-theme-chip {
  font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 12px;
  background: #f0f0f0; color: #4a4a4a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.composer-theme-chip.has-theme {
  background: #e8f1fd; color: #1a5fbf;
}
.composer-body {
  flex: 1; overflow-y: auto;
  padding: 14px 16px;
  background: #fafafa;
}
.composer-editor-wrap {
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 14px 16px;
}
.composer-editor {
  width: 100%; border: none; outline: none;
  font-size: 16px; line-height: 1.6;
  color: #1a1a1a; font-family: inherit;
  background: transparent;
  min-height: 240px;
}
.composer-editor[contenteditable="true"] { white-space: pre-wrap; word-break: break-word; }
.composer-editor[contenteditable="true"]:focus { outline: none; }
.composer-editor[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #c8c8c8;
  white-space: pre-line;
  pointer-events: none;
}
.composer-editor b, .composer-editor strong { font-weight: 700; }
.composer-editor i, .composer-editor em { font-style: italic; }
.composer-editor ul, .composer-editor ol { margin: 8px 0; padding-left: 22px; }
.composer-editor li { margin: 2px 0; }
.composer-editor p { margin: 0 0 12px; }

.composer-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #9a9a9a;
  margin-top: 8px;
}
.composer-copy-rich {
  background: transparent; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: 4px 9px; font-size: 11px; color: #4a4a4a; cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.composer-copy-rich:active { opacity: 0.7; }

/* Formatting toolbar */
.composer-format-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  border-top: 1px solid #ececec;
  background: #f7f7f7;
  overflow-x: auto;
}
.composer-format-bar .fmt-btn {
  flex: 0 0 auto;
  padding: 6px 10px; font-size: 14px;
  background: transparent; color: #2a2a2a;
  border: none; border-radius: 7px;
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  min-width: 32px;
}
.composer-format-bar .fmt-btn:active,
.composer-format-bar .fmt-btn.is-active {
  background: #d4d4d4; color: #000;
}
.composer-format-bar .fmt-divider {
  width: 1px; height: 18px; background: #d4d4d4; margin: 0 4px;
}
.composer-critic {
  margin-top: 14px;
  background: #ffffff; border: 1px solid #e7e7e7; border-radius: 12px;
  padding: 10px 14px;
}
.composer-critic:empty { display: none; }
.composer-critic .critic-head {
  font-size: 11px; font-weight: 600; color: #6b6b6b;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.composer-critic .critic-items { display: flex; flex-direction: column; gap: 6px; }
.composer-critic .critic-item { display: flex; gap: 8px; font-size: 13px; color: #1a1a1a; line-height: 1.5; }
.composer-critic .critic-item .dot { color: #d4956a; font-weight: 700; margin-top: 1px; }
.composer-critic .critic-item.ok .dot { color: #2dbe7e; }
.composer-critic .label-bold { font-weight: 600; }
.composer-assist-bar {
  display: flex; gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #e7e7e7;
  background: #ffffff;
  overflow-x: auto;
}
.composer-assist-bar .btn-sm {
  flex: 0 0 auto;
  padding: 8px 12px;
  white-space: nowrap;
}

/* Performance dashboard */
.perf-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.perf-stat {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 12px;
  padding: 14px 16px;
}
.perf-num { font-size: 24px; font-weight: 700; color: #1a1a1a; }
.perf-lbl { font-size: 11px; color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.perf-period { font-size: 12px; color: #6b6b6b; padding: 2px 4px 12px; }
.perf-delta { display: inline-block; font-size: 10px; font-weight: 700; margin-left: 4px; letter-spacing: 0.2px; }
.perf-delta.up   { color: #2dbe7e; }
.perf-delta.down { color: #d94747; }
.perf-delta.flat { color: #9a9a9a; }
.perf-insight {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; margin-bottom: 14px;
  background: linear-gradient(180deg,#fff8e1 0%,#fff3c4 100%);
  border-left: 3px solid #e8c872; border-radius: 10px;
}
.perf-insight-lbl { font-size: 10px; font-weight: 700; color: #b45309; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; padding-top: 2px; }
.perf-insight-txt { font-size: 13px; color: #2a2a2a; line-height: 1.45; }
.perf-theme-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: #e8f1fd; color: #1a5fbf; margin-left: 8px; letter-spacing: 0.2px; }
.perf-card {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
}
.perf-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.perf-card-stats { font-size: 11px; color: #6b6b6b; font-weight: 500; }
.perf-snippet { font-size: 13px; color: #1a1a1a; line-height: 1.45; }

/* Composed source-card badge — amber while drafting, green once posted */
#screen-content .composed-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 1px 8px; border-radius: 8px;
  background: #fef3c7; color: #b45309;
  margin-left: 8px;
  letter-spacing: 0.2px;
}
#screen-content .composed-badge.is-posted {
  background: #e8f5ec; color: #2dbe7e;
}

/* Theme picker overlay */
.theme-picker-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.theme-picker-sheet {
  width: 100%; max-width: 430px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px 22px;
  max-height: 70vh; overflow-y: auto;
  animation: theme-picker-up 180ms ease-out;
}
@keyframes theme-picker-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.theme-picker-title { font-size: 13px; font-weight: 700; color: #1a1a1a; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 12px; }
.theme-picker-list { display: flex; flex-direction: column; gap: 4px; }
.theme-opt {
  text-align: left; padding: 12px 14px;
  background: #f6f6f6; color: #1a1a1a;
  border: none; border-radius: 10px;
  font-size: 15px; font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-opt.is-current { background: #e8f1fd; color: #1a5fbf; font-weight: 600; }
.theme-picker-cancel {
  margin-top: 12px; width: 100%; padding: 13px;
  background: #ececec; color: #1a1a1a;
  border: none; border-radius: 11px;
  font-size: 15px; font-weight: 600; font-family: inherit;
}

/* Library status group tags — colored by state */
#screen-content .lib-group-tag.lib-tag-approved   { background: #e8f5ec; color: #2dbe7e; }
#screen-content .lib-group-tag.lib-tag-published  { background: #e8f1fd; color: #1a5fbf; }
#screen-content .lib-group-tag.lib-tag-posted     { background: #e8f1fd; color: #1a5fbf; }
#screen-content .lib-group-tag.lib-tag-skipped    { background: #f0f0f0; color: #888; }
#screen-content .lib-group-tag.lib-tag-drafts     { background: #fef3c7; color: #b45309; }

/* Floating toast pill (Copy feedback, etc) — used app-wide */
.hh-toast {
  position: fixed;
  left: 50%; bottom: 90px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20,20,20,0.94); color: #fff;
  padding: 9px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  z-index: 1000;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.hh-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Unified search bar */
#screen-content .content-search-wrap { padding: 8px 4px 4px; }
#screen-content .content-search-input {
  width: 100%; background: #fff; border: 1px solid #e7e7e7;
  border-radius: 12px; padding: 9px 14px;
  color: #1a1a1a; font-size: 14px; font-family: inherit; outline: none;
}

/* ── Calendar ── */
.cal-week-header {
  display: flex;
  padding: 0 0 10px;
  gap: 6px;
}
.cal-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cal-day-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}
.cal-day-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.cal-day-num.today {
  background: var(--accent);
  color: #ffffff;
}
.cal-event-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.cal-posts-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}
.cal-post-chip {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ── Pipeline Board ── */
.pipeline-board {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pipeline-board::-webkit-scrollbar { display: none; }
.board-col {
  min-width: 220px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.board-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.board-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
}
.board-count {
  background: var(--surface-raised);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
}
.conf-card {
  background: var(--surface-raised);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-left: 3px solid transparent;
}
.conf-card:active { opacity: 0.8; }
.conf-card.stale { border-left-color: var(--yellow); }
.conf-card.fresh { border-left-color: var(--green); }
.conf-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.conf-meta { font-size: 11px; color: var(--text-3); }
.conf-action { font-size: 11px; color: var(--text-2); margin-top: 6px; }

/* ── Go Cold section ── */
.cold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.cold-row:last-child { border-bottom: none; }
.cold-left { display: flex; align-items: center; gap: 10px; }
.cold-days {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
}
.cold-30 { background: var(--yellow-soft); color: var(--yellow); }
.cold-60 { background: rgba(232, 97, 137, 0.14); color: #f07ba4; }
.cold-90 { background: var(--red-soft); color: var(--red); }

/* ── Content Library ── */
.asset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.asset-row:last-child { border-bottom: none; }
.asset-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.asset-name { font-size: 14px; font-weight: 500; }
.asset-type { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.copy-btn {
  padding: 6px 12px;
  background: var(--surface-raised);
  border: none;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.copy-btn:active { opacity: 0.7; }

/* ── Progress ring ── */
.progress-bar-full {
  background: var(--surface-raised);
  border-radius: 6px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar-inner {
  height: 100%;
  background: var(--green);
  border-radius: 6px;
}

/* ── Floating action elements ── */
.sticky-header {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Utilities ── */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap8 { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.chevron { color: var(--text-3); font-size: 14px; }

/* ── Tabs sub-switcher ── */
.sub-tabs {
  padding: 0 16px 12px;
  position: sticky;
  top: 61px;
  background: var(--bg);
  z-index: 15;
}

/* ── Programs tab ── */
.program-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.program-name { font-size: 16px; font-weight: 700; }
.program-row { display: flex; gap: 16px; }
.program-stat { flex: 1; }
.program-stat-num { font-size: 20px; font-weight: 700; }
.program-stat-label { font-size: 11px; color: var(--text-3); }

/* ── Enrollment fill bar ── */
.enrollment-bar { margin-top: 4px; }
.enrollment-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ══════════════════════════════════════════════
   CONFERENCE PIPELINE — Pipeline tab UI
══════════════════════════════════════════════ */

/* Refresh button in page-header */
.conf-refresh-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: none; color: var(--text-3);
  cursor: pointer; border-radius: 10px;
  -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.conf-refresh-btn:active { opacity: 0.7; }
.conf-refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }

/* Action metric chips */
.conf-action-chips {
  display: flex; gap: 6px; padding: 0 16px 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-shrink: 0;
}
.conf-action-chips::-webkit-scrollbar { display: none; }
.ac-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
  border-radius: 8px; font-size: 12px; font-weight: 500; white-space: nowrap;
  min-height: 30px; background: var(--surface); color: var(--text-3); flex-shrink: 0;
}
.ac-chip .ac-count { font-weight: 700; font-size: 13px; color: var(--text); }
.ac-chip.ready .ac-count { color: var(--green); }
.ac-chip.cfp .ac-count { color: var(--yellow); }
.ac-chip.needs .ac-count { color: var(--red); }

/* Search bar */
.conf-search-wrap { padding: 4px 16px 6px; flex-shrink: 0; }
.conf-search-bar { position: relative; width: 100%; }
.conf-search-input {
  width: 100%; background: var(--surface); border: 1px solid var(--divider);
  border-radius: 10px; color: var(--text); font-size: 14px; font-family: inherit;
  padding: 9px 36px 9px 34px; outline: none; min-height: 38px; -webkit-appearance: none;
}
.conf-search-input::placeholder { color: var(--text-4); }
.conf-search-input:focus { border-color: var(--accent); }
.conf-search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: none; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-3); cursor: pointer;
  font-size: 18px; border-radius: 50%; -webkit-tap-highlight-color: transparent;
}
.conf-search-clear.visible { display: flex; }
.conf-search-clear:active { opacity: 0.7; }

/* CFP deadline pills */
.cfp-pill {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.cfp-pill.urgent { background: var(--red-soft); color: var(--red); }
.cfp-pill.soon { background: var(--yellow-soft); color: var(--yellow); }
.cfp-pill.open { background: var(--green-soft); color: var(--green); }
.cfp-pill.rolling { background: var(--surface-raised); color: var(--text-3); }
.cfp-pill.tbd { background: var(--accent-soft); color: var(--accent); }
.cfp-pill.closed { background: var(--surface-raised); color: var(--text-4); }

/* Sort pills */
.conf-sort-row {
  display: flex; gap: 6px; padding: 4px 16px 4px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-shrink: 0;
}
.conf-sort-row::-webkit-scrollbar { display: none; }
.conf-sort-pill {
  background: var(--surface); border: none; color: var(--text-2); padding: 6px 12px;
  border-radius: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  min-height: 36px; display: inline-flex; align-items: center; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.conf-sort-pill:active { opacity: 0.7; }
.conf-sort-pill.active { background: var(--accent-soft); color: var(--accent); }

/* List pane wrapper */
.conf-list-pane { display: flex; flex-direction: column; flex: 1; }

/* Expandable conference cards */
.conf-card-exp {
  background: var(--surface); border-radius: 12px; margin-bottom: 8px; overflow: hidden;
}
.conf-card-exp.past { opacity: 0.55; }
.conf-card-exp-header {
  padding: 14px 16px; cursor: pointer; min-height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  -webkit-tap-highlight-color: transparent;
}
.conf-card-exp-header:active { opacity: 0.7; }
.conf-card-exp-left { flex: 1; min-width: 0; }
.conf-card-exp-name {
  font-size: 15px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.conf-card-exp-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.conf-card-exp-meta {
  display: flex; gap: 6px; margin-top: 6px; align-items: center; flex-wrap: wrap;
}
.conf-card-exp-chevron {
  color: var(--text-3); font-size: 13px; transition: transform 0.3s ease;
  flex-shrink: 0; line-height: 1;
}
.conf-card-exp.expanded .conf-card-exp-chevron { transform: rotate(180deg); }
.conf-card-exp-body {
  max-height: 0; overflow: hidden; transition: max-height 300ms ease;
  border-top: 1px solid transparent;
}
.conf-card-exp.expanded .conf-card-exp-body {
  max-height: 2000px; border-top: 1px solid var(--divider);
}
.conf-card-exp-content { padding: 12px 16px 14px; }

/* Status badge on cards */
.conf-status-badge {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 600; text-transform: capitalize;
}
.conf-status-badge.researching { background: rgba(168,164,160,0.15); color: var(--text-2); }
.conf-status-badge.outreach,
.conf-status-badge.active_outreach { background: var(--accent-soft); color: var(--accent); }
.conf-status-badge.applied { background: var(--yellow-soft); color: var(--yellow); }
.conf-status-badge.in_conversation { background: var(--hh-soft); color: var(--hh); }
.conf-status-badge.negotiating { background: var(--yellow-soft); color: var(--yellow); }
.conf-status-badge.confirmed,
.conf-status-badge.booked { background: var(--green-soft); color: var(--green); }
.conf-status-badge.completed { background: var(--green-soft); color: var(--green); opacity: 0.7; }
.conf-status-badge.passed,
.conf-status-badge.declined,
.conf-status-badge.no_response { background: var(--surface-raised); color: var(--text-4); }

/* NEW badge on recently added cards */
.conf-new-badge {
  background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700;
  text-transform: uppercase; padding: 2px 5px; border-radius: 4px;
  margin-left: 7px; letter-spacing: 0.5px;
}

/* Status group headers (Pipeline view) */
.conf-status-group { margin-bottom: 2px; }
.conf-status-group-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 4px 6px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; min-height: 44px;
}
.conf-status-group-header:active { opacity: 0.7; }
.conf-status-group-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  font-weight: 600; color: var(--text-3);
}
.conf-status-group-count {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--surface); color: var(--text-3);
}
.conf-status-group-chevron {
  font-size: 15px; color: var(--text-4); transition: transform 0.2s; margin-left: auto;
}
.conf-status-group.collapsed .conf-status-group-chevron { transform: rotate(-90deg); }
.conf-status-group.collapsed .conf-status-group-cards { display: none; }
.conf-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.conf-status-dot.researching { background: var(--text-3); }
.conf-status-dot.outreach,
.conf-status-dot.active_outreach { background: var(--accent); }
.conf-status-dot.applied { background: var(--yellow); }
.conf-status-dot.in_conversation { background: var(--hh); }
.conf-status-dot.negotiating { background: var(--yellow); }
.conf-status-dot.confirmed,
.conf-status-dot.booked { background: var(--green); }
.conf-status-dot.completed { background: var(--green); opacity: 0.6; }
.conf-status-dot.passed,
.conf-status-dot.closed,
.conf-status-dot.declined,
.conf-status-dot.no_response { background: var(--text-4); }

/* Today view action cards */
.conf-today-card {
  background: var(--surface); border-radius: 10px; padding: 13px 14px; margin-bottom: 6px;
  cursor: pointer; min-height: 44px; border-left: 3px solid var(--divider);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  -webkit-tap-highlight-color: transparent;
}
.conf-today-card:active { opacity: 0.7; }
.conf-today-card.urgent { border-left-color: var(--red); }
.conf-today-card.week { border-left-color: var(--yellow); }
.conf-today-card.coming { border-left-color: var(--green); }
.conf-today-card-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conf-today-card-reason { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.conf-today-card-status { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.conf-countdown {
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px;
  white-space: nowrap; flex-shrink: 0;
}
.conf-countdown.overdue { background: var(--red-soft); color: var(--red); }
.conf-countdown.urgent { background: var(--red-soft); color: var(--red); }
.conf-countdown.week { background: var(--yellow-soft); color: var(--yellow); }
.conf-countdown.coming { background: var(--green-soft); color: var(--green); }

/* Metrics row (Today view) */
.conf-metrics-row { display: flex; gap: 8px; flex-shrink: 0; }
.conf-metric-chip {
  flex: 1; background: var(--surface); border-radius: 10px; padding: 11px 8px; text-align: center;
}
.conf-metric-count { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.conf-metric-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-3); margin-top: 2px; }

/* Pipeline health grid (Today view) */
.conf-health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.conf-health-stat { background: var(--surface); border-radius: 10px; padding: 10px 6px; text-align: center; }
.conf-health-count { font-size: 18px; font-weight: 700; color: var(--accent); }
.conf-health-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-3); margin-top: 2px; }

/* Detail rows inside expanded cards */
.conf-detail-row {
  display: flex; justify-content: space-between; padding: 6px 0; gap: 12px;
  align-items: center; min-height: 32px; border-bottom: 1px solid var(--divider);
}
.conf-detail-row:last-child { border-bottom: none; }
.conf-detail-label { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.conf-detail-value { font-size: 13px; text-align: right; word-break: break-all; flex: 1; min-width: 0; color: var(--text-2); }
.conf-detail-value a { color: var(--accent); text-decoration: none; }

/* Activity timeline in expanded cards */
.conf-activity-item {
  padding: 9px 0 9px 22px; border-bottom: 1px solid var(--divider);
  position: relative; min-height: 36px;
}
.conf-activity-item:last-child { border-bottom: none; }
.conf-activity-item::before {
  content: ''; position: absolute; left: 5px; top: 0; bottom: 0;
  width: 2px; background: var(--divider);
}
.conf-activity-item:last-child::before { bottom: 50%; }
.conf-activity-item::after {
  content: ''; position: absolute; left: 1px; top: 13px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-raised); border: 2px solid var(--text-4);
}
.conf-activity-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.conf-activity-date { font-size: 11px; color: var(--text-4); }

/* Toast notification */
.conf-toast {
  position: fixed; bottom: calc(62px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); background: var(--surface-raised); color: var(--text);
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
  z-index: 300; opacity: 0; transition: opacity 0.2s; pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.conf-toast.show { opacity: 1; }

/* ── Expandable card header/body (matches JS-generated structure) ── */
.conf-card-header {
  padding: 12px 14px;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.conf-card-header:active { opacity: 0.7; }
.conf-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.conf-card-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conf-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
}
.conf-card-body {
  overflow: hidden;
  transition: max-height 300ms ease;
  border-top: 1px solid transparent;
}
.conf-card-exp.expanded .conf-card-body { border-top-color: var(--divider); }
.conf-card-body-inner { padding: 10px 14px 12px; }

/* Chevron used in both card expand and group toggle */
.conf-chevron {
  font-size: 13px;
  color: var(--text-3);
  margin-left: auto;
  flex-shrink: 0;
}

/* Status dot colors for pipeline stage keys */
.conf-status-dot-booked   { background: var(--green); }
.conf-status-dot-convo    { background: var(--hh); }
.conf-status-dot-outreach { background: var(--accent); }
.conf-status-dot-research { background: var(--text-3); }
.conf-status-dot-other    { background: var(--text-4); }

/* Additional conf-status-badge variants */
.conf-status-badge.not_a_target,
.conf-status-badge.unknown { background: var(--surface-raised); color: var(--text-4); }


/* Humanity Gate — critic score header + per-check breakdown */
.humanity-head { display:flex; align-items:baseline; gap:8px; margin:2px 0 6px; }
.humanity-score { font-weight:700; font-size:15px; letter-spacing:.2px; }
.humanity-score small { font-weight:500; opacity:.6; font-size:11px; }
.humanity-score.good { color:#1a7f4b; }
.humanity-score.mid  { color:#b8860b; }
.humanity-score.low  { color:#b23b3b; }
.humanity-score.muted { color:#888; font-weight:600; }
.humanity-sub { font-size:11px; color:#8a8a8a; }
.humanity-breakdown { margin:0 0 8px; display:flex; flex-direction:column; gap:3px; }
.humanity-row { display:flex; align-items:center; gap:6px; font-size:11px; }
.humanity-row.muted { opacity:.5; }
.humanity-k { flex:0 0 82px; text-transform:capitalize; color:#555; }
.humanity-bar { flex:1; height:5px; background:#eee; border-radius:3px; overflow:hidden; }
.humanity-bar > span { display:block; height:100%; background:#4a90d9; }
.humanity-v { flex:0 0 34px; text-align:right; color:#666; font-variant-numeric:tabular-nums; }
.critic-item.muted { opacity:.6; }
