/* ============================================================
   INBOX WORKSPACE · W3
   Extends today.css + publish.css workspace shell.
   Adds inbox-specific list rows, email body, tracks, decision bar.
   ============================================================ */

:root {
  --reviewing: #d4a574;
  --reviewing-soft: rgba(212,165,116,.12);
  --reviewing-line: rgba(212,165,116,.32);
}

/* Inbox topbar tally has its own pieces */
.inbox-topbar .workspace-tally {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wt-sync {
  display: inline-flex; align-items: center; gap: 6px;
}

/* ============================================================
   LIST PANE · pitch rows + pipeline
   ============================================================ */

/* Pipeline tab strip */
.pipeline {
  display: flex;
  padding: 4px;
  margin: 10px 12px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  gap: 2px;
}
.pipe-tab {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-3);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.pipe-tab:hover { color: var(--text); }
.pipe-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 2px 4px rgba(0,0,0,.2);
}
.pipe-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary-bright);
  box-shadow: 0 0 6px var(--primary-bright);
}
.pipe-dot.reviewing { background: var(--reviewing); box-shadow: 0 0 6px var(--reviewing); }
.pipe-dot.done      { background: var(--text-mute); box-shadow: none; }
.pipe-count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.pipe-tab.active .pipe-count {
  background: var(--primary-soft);
  color: var(--primary-bright);
}
.pipe-tab[data-pipe="reviewing"].active .pipe-count {
  background: var(--reviewing-soft);
  color: var(--reviewing);
}
.pipe-tab[data-pipe="done"].active .pipe-count {
  background: var(--surface-3);
  color: var(--text-2);
}

/* List meta row */
.inbox-list .list-meta {
  gap: 6px;
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--border);
}
.list-meta-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-3);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 7px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: background .15s, color .15s;
}
.list-meta-btn:hover { background: var(--surface-3); color: var(--text); }
.list-meta-btn .icon { width: 11px; height: 11px; }

/* Bulk-select toolbar */
.bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--primary-soft);
  border-bottom: 1px solid var(--primary-line);
  animation: slide-down .2s ease-out;
}
.bulk-bar.open { display: flex; }
.bulk-info {
  display: inline-flex; align-items: center; gap: 8px;
}
.bulk-cancel {
  background: none;
  border: none;
  color: var(--primary-bright);
  cursor: pointer;
  width: 22px; height: 22px;
  border-radius: 4px;
  display: grid; place-items: center;
  transition: background .15s;
}
.bulk-cancel:hover { background: rgba(83,224,118,.18); }
.bulk-cancel .icon { width: 13px; height: 13px; }
.bulk-count {
  font-size: 11.5px;
  color: var(--primary-bright);
  font-weight: 500;
}
.bulk-count strong { font-weight: 700; }
.bulk-actions { display: flex; gap: 6px; }
.bulk-btn {
  background: var(--primary-bright);
  color: #003914;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  opacity: .5;
  pointer-events: none;
  transition: opacity .15s, filter .15s;
}
.bulk-btn:nth-child(2) {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.bulk-bar.has-selection .bulk-btn {
  opacity: 1;
  pointer-events: auto;
}
.bulk-btn:hover { filter: brightness(1.08); }
.bulk-btn .icon { width: 11px; height: 11px; }

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pitch list ─────────────────── */
.pitch-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 16px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pitch-list::-webkit-scrollbar { width: 6px; }
.pitch-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

.pitch-group {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 10px 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.pitch-group .pipe-dot { box-shadow: none; }
.group-spacer { flex: 1; }
.group-hint { color: var(--text-mute); text-transform: none; letter-spacing: 0; font-size: 9.5px; }

.pitch-row {
  display: grid;
  grid-template-columns: 0 36px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 22px 11px 10px; /* room on right for the fresh-dot indicator */
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
  transition: background .12s, padding .15s;
  overflow: hidden;
  align-items: start;
}
.pitch-row:hover { background: var(--surface-2); }
.pitch-row.selected {
  background: var(--surface-2);
}
.pitch-row.selected::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary-bright);
  border-radius: 0 2px 2px 0;
}
.pitch-row.fresh::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-bright);
  box-shadow: 0 0 6px var(--primary-bright);
}
.pitch-row.reviewing { opacity: .85; }
.pitch-row.reviewing::after {
  content: '';
  position: absolute;
  top: 14px; right: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--reviewing);
}

/* Bulk mode reveals the checkbox */
.pitch-check {
  width: 0;
  height: 16px;
  opacity: 0;
  pointer-events: none;
  transition: width .2s, opacity .2s, margin-right .2s;
  accent-color: var(--primary-bright);
  margin: 4px 0 0;
  align-self: flex-start;
}
.inbox-list.bulk-mode .pitch-row {
  grid-template-columns: 18px 36px 1fr;
}
.inbox-list.bulk-mode .pitch-check {
  width: 16px;
  opacity: 1;
  pointer-events: auto;
}

.pitch-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.liran-grad   { background: linear-gradient(135deg, #c97a4a, #7a3a1a); }
.noa-grad     { background: linear-gradient(135deg, #6a4ec9, #2a2a8e); }
.gidi-grad    { background: linear-gradient(135deg, #4ac9a4, #1a7a6a); }
.avi-grad     { background: linear-gradient(135deg, #c94a8e, #7a1a4a); }
.lital-grad   { background: linear-gradient(135deg, #4a8ec9, #1a4a7a); }
.eden-grad    { background: linear-gradient(135deg, #c94a4a, #7a1a1a); }
.maya-grad    { background: linear-gradient(135deg, #8ec94a, #4a7a1a); }
.yonatan-grad { background: linear-gradient(135deg, #c9a44a, #7a5a1a); }
.liat-grad    { background: linear-gradient(135deg, #8e4ac9, #4a1a7a); }
.ronen-grad   { background: linear-gradient(135deg, #4ac9c9, #1a7a7a); }

.pitch-body { min-width: 0; padding-right: 14px; }
.pitch-line1 {
  display: flex; align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
  min-width: 0;
  flex-wrap: wrap;
}
.pitch-curator {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.curator-hint {
  color: var(--text-mute);
  font-weight: 400;
  font-style: italic;
  font-size: 11px;
}
.pitch-domain {
  font-size: 10px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pitch-time {
  font-size: 10.5px;
  color: var(--text-mute);
  flex-shrink: 0;
}
.thread-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px 1px 4px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-bright);
  border: 1px solid var(--primary-line);
  letter-spacing: .02em;
  flex-shrink: 0;
}
.thread-pill .icon { width: 9px; height: 9px; }

.pitch-snippet {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  overflow: hidden;
  max-height: 3.2em; /* roughly 2 lines */
}
.pitch-snippet .snippet-text {
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  unicode-bidi: isolate;
}

.pitch-snippet .bi-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bilingual-soft);
  color: var(--bilingual);
  border: 1px solid var(--bilingual-line);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
}

.pitch-line3 {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: 10px;
  color: var(--text-3);
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.meta-chip.target {
  color: var(--text);
  background: var(--surface-3);
  font-weight: 600;
}
.meta-chip.history {
  color: var(--text-3);
  font-family: var(--mono);
}
.meta-chip.history.good {
  color: var(--primary-bright);
  background: var(--primary-soft);
  border-color: var(--primary-line);
  display: inline-flex; align-items: center; gap: 3px;
}
.meta-chip.history.good .icon { width: 9px; height: 9px; }
.meta-chip.history.new {
  color: var(--info);
  background: var(--info-soft);
  border-color: var(--info-line);
  display: inline-flex; align-items: center; gap: 3px;
}
.meta-chip.history.new .icon { width: 9px; height: 9px; }
.meta-chip.state {
  color: var(--reviewing);
  background: var(--reviewing-soft);
  border-color: var(--reviewing-line);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 9px;
  font-weight: 700;
}


/* ============================================================
   DETAIL HEAD · curator card
   ============================================================ */
.inbox-head {
  padding: 16px 32px 0;
}
.ih-actions {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px;
}
.ih-nav {
  width: 26px; height: 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ih-nav:hover { background: var(--surface-3); color: var(--text); }
.ih-nav .icon { width: 13px; height: 13px; }
.ih-pos {
  font-size: 11px;
  color: var(--text-mute);
  margin-left: 4px;
}
.ih-spacer { flex: 1; }
.ih-action {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .15s, color .15s, border-color .15s;
}
.ih-action:hover { background: var(--surface-3); color: var(--text); border-color: var(--surface-4); }
.ih-action.on {
  background: var(--info-soft);
  color: var(--info);
  border-color: var(--info-line);
}
.ih-action .icon { width: 13px; height: 13px; }

.curator-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: flex-start;
  padding: 4px 0 18px;
}
.cc-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .04em;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border);
}
.cc-main { min-width: 0; }
.cc-line1 {
  display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.cc-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.018em;
  color: var(--text);
  margin: 0;
}
.cc-role {
  font-size: 12px;
  color: var(--text-3);
}
.cc-verified {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #003914;
}
.cc-verified .icon { width: 10px; height: 10px; }
.cc-line2 {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-mute);
  flex-wrap: wrap;
}
.cc-sep { opacity: .5; }
.cc-icon { width: 11px; height: 11px; vertical-align: -2px; margin-right: 2px; }

.cc-history {
  display: flex; gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cc-thread-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--primary-bright);
  border: 1px solid var(--primary-line);
}
.cc-thread-pill .icon { width: 11px; height: 11px; }
.cc-stat {
  font-size: 11.5px;
  color: var(--text-3);
}
.cc-stat strong {
  color: var(--text);
  font-weight: 700;
  font-family: var(--mono);
  margin-right: 2px;
}
.cc-stat.highlight {
  color: var(--primary-bright);
  font-weight: 500;
}
.cc-stat.highlight strong { color: var(--primary-bright); }

.cc-aside {
  display: flex; flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  padding-top: 4px;
}
.cc-priority {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.cc-priority.high {
  background: var(--primary-soft);
  color: var(--primary-bright);
  border: 1px solid var(--primary-line);
}
.cc-priority .icon { width: 12px; height: 12px; }
.cc-priority-sub {
  font-size: 10px;
  color: var(--text-mute);
}

/* Subject row */
.ih-subject {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  align-items: baseline;
}
.ih-subj-label {
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.ih-subj-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.005em;
  unicode-bidi: isolate;
}


/* ============================================================
   EMAIL CARD
   ============================================================ */
.email-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 16px;
  position: relative;
}
.email-meta {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-mute);
}
.email-meta-sep { width: 2px; height: 2px; border-radius: 50%; background: var(--text-mute); opacity: .5; }
.email-body {
  padding: 16px 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  unicode-bidi: isolate;
}
.email-body p { margin: 0 0 12px; }
.email-body p:last-child { margin-bottom: 0; }
.email-body strong { color: var(--primary-bright); font-weight: 700; }

/* Translation overlay */
.email-translation {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--info-soft);
  border: 1px solid var(--info-line);
  border-radius: var(--r-sm);
  direction: ltr;
}
.email-translation.open { display: block; animation: fade-in .2s; }
.et-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--info);
  margin-bottom: 8px;
}
.et-head .icon { width: 12px; height: 12px; }
.et-confidence {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--text-mute);
  letter-spacing: 0;
  text-transform: none;
}
.et-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}
.et-body p { margin: 0 0 10px; }
.et-body p:last-child { margin-bottom: 0; }
.et-body strong { color: var(--info); font-weight: 700; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Attachment row */
.email-attachments {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  direction: ltr;
}
.ea-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  display: grid; place-items: center;
  color: var(--text-2);
}
.ea-icon .icon { width: 14px; height: 14px; }
.ea-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  flex: 1;
}
.ea-size { font-size: 11px; color: var(--text-mute); }
.ea-btn {
  background: var(--surface-3);
  border: 1px solid var(--surface-4);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.ea-btn:hover { background: var(--surface-4); }


/* ============================================================
   INSIGHTS CARD
   ============================================================ */
.insights-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px 18px;
  margin-bottom: 16px;
}
.insights-card .commits-eyebrow { margin-bottom: 12px; }
.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.insight {
  background: var(--surface-1);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.insight-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.022em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--mono);
}
.insight-sub-inline {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 500;
  font-family: var(--sans);
}
.insight-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.insight-sub {
  font-size: 11px;
  color: var(--text-3);
}

@media (max-width: 1180px) {
  .insights-grid { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   TRACKS CARD
   ============================================================ */
.tracks-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.tracks-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
}
.tracks-title {
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--text);
}
.tracks-head-actions { display: flex; gap: 6px; }

.tracks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-row {
  display: grid;
  grid-template-columns: 28px 16px 44px 1fr 88px 50px 22px;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.track-row:hover { background: var(--surface-3); }
.track-row.selected {
  border-color: var(--primary-line);
  background: linear-gradient(90deg, rgba(83,224,118,.05), var(--surface-2) 30%);
}
.track-pos {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.track-row.selected .track-pos { color: var(--primary-bright); }
.track-check {
  accent-color: var(--primary-bright);
  cursor: pointer;
}
.track-art {
  width: 44px; height: 44px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.track-play {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  border: none;
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.track-play .icon { width: 16px; height: 16px; margin-left: 2px; }
.track-row:hover .track-play { opacity: 1; }

.track-info { min-width: 0; }
.track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.track-artist {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
}
.track-album { color: var(--text-mute); }
.track-meta {
  display: flex; flex-direction: column;
  gap: 2px;
}
.track-pop {
  display: flex; align-items: center; gap: 6px;
}
.tp-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tp-bar {
  width: 50px; height: 3px;
  background: var(--surface-3);
  border-radius: 1.5px;
  overflow: hidden;
}
.tp-bar span {
  display: block; height: 100%;
  background: var(--primary-bright);
}
.track-meta-sub {
  font-size: 9px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.track-time {
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.track-link {
  color: var(--text-mute);
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.track-link:hover { color: var(--primary-bright); background: var(--surface-3); }
.track-link .icon { width: 13px; height: 13px; }

.tracks-foot {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-3);
}


/* ============================================================
   REPLY CARD
   ============================================================ */
.reply-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
  overflow: hidden;
}
.reply-head {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  display: grid;
  grid-template-columns: 18px 1fr auto 14px;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: background .15s;
}
.reply-head:hover { background: var(--surface-2); }
.reply-head .icon:first-child { color: var(--primary-bright); width: 16px; height: 16px; }
.reply-head-title {
  font-size: 13.5px;
  font-weight: 600;
}
.reply-head-meta {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--mono);
}
.reply-chev {
  color: var(--text-3);
  width: 14px; height: 14px;
  transition: transform .2s;
}
.reply-card.open .reply-chev { transform: rotate(180deg); }
.reply-body {
  display: none;
  padding: 4px 20px 16px;
  border-top: 1px solid var(--border);
}
.reply-card.open .reply-body { display: block; animation: fade-in .2s; }
.reply-templates {
  display: flex; gap: 6px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.reply-template {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.reply-template:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--surface-4);
}
.rt-icon {
  width: 18px; height: 18px;
  border-radius: 4px;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--text);
}
.rt-icon .icon { width: 11px; height: 11px; }
.rt-shortcut { color: var(--text-mute); font-size: 10px; }
.reply-input {
  width: 100%;
  min-height: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  margin-top: 4px;
  line-height: 1.5;
}
.reply-input:focus { border-color: var(--primary-line); }
.reply-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--text-mute);
}
.reply-send {
  background: var(--primary);
  color: #003914;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.reply-send:hover { filter: brightness(1.08); }


/* ============================================================
   STICKY DECISION BAR
   ============================================================ */
.inbox-sticky .sb-btn.primary.accept {
  background: linear-gradient(180deg, var(--primary-bright), var(--primary));
  display: inline-flex; align-items: center; gap: 8px;
}
.accept-target {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px;
  background: rgba(0,0,0,.18);
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.accept-target .icon { width: 10px; height: 10px; }
.route-hl { color: var(--text); font-weight: 700; }
.inbox-sticky .sb-summary {
  border-left: 1px solid var(--border);
  padding-left: 6px;
  margin-left: 4px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1400px) {
  .inbox-head { padding-left: 24px; padding-right: 24px; }
  .cc-name { font-size: 20px; }
}
@media (max-width: 1180px) {
  .cc-aside { display: none; }
  .track-row { grid-template-columns: 24px 16px 40px 1fr 50px 22px; }
  .track-meta { display: none; }
}
@media (max-width: 960px) {
  body.publish-body.inbox-body { grid-template-columns: 64px var(--list-w) 1fr; }
}


/* ============================================================
   ════════════════════════════════════════════════════════════
   V3 INBOX ADDITIONS · pass 4 (ported from design bundle)
   ════════════════════════════════════════════════════════════
   ============================================================ */

/* Generic 10-swatch curator gradient palette (audit #26).
   Lives in today.css in the design bundle; mirrored here so the
   inbox page can use them without bumping today.css. Curators are
   hashed into grad-a..j by name. */
:root {
  --grad-a: linear-gradient(135deg, #c97a4a, #7a3a1a);
  --grad-b: linear-gradient(135deg, #6a4ec9, #2a2a8e);
  --grad-c: linear-gradient(135deg, #4ac9a4, #1a7a6a);
  --grad-d: linear-gradient(135deg, #c94a8e, #7a1a4a);
  --grad-e: linear-gradient(135deg, #4a8ec9, #1a4a7a);
  --grad-f: linear-gradient(135deg, #c94a4a, #7a1a1a);
  --grad-g: linear-gradient(135deg, #8ec94a, #4a7a1a);
  --grad-h: linear-gradient(135deg, #c9a44a, #7a5a1a);
  --grad-i: linear-gradient(135deg, #4ac9c9, #1a7a7a);
  --grad-j: linear-gradient(135deg, #8e4ac9, #4a1a7a);
}
.grad-a { background: var(--grad-a); }
.grad-b { background: var(--grad-b); }
.grad-c { background: var(--grad-c); }
.grad-d { background: var(--grad-d); }
.grad-e { background: var(--grad-e); }
.grad-f { background: var(--grad-f); }
.grad-g { background: var(--grad-g); }
.grad-h { background: var(--grad-h); }
.grad-i { background: var(--grad-i); }
.grad-j { background: var(--grad-j); }

/* ── Primary-button hierarchy fix (audit #23) ──────────────
   Sync Gmail is the recurring action. */
.list-foot-btn.primary {
  background: var(--primary);
  color: var(--surface);
  border: none;
  font-weight: 700;
}
.list-foot-btn.primary:hover { filter: brightness(1.08); }
.list-foot-btn .lfb-kbd {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  background: rgba(0,0,0,.25);
  color: inherit;
  border-radius: 3px;
  margin-left: 4px;
  opacity: .8;
}

/* ── Bulk-action sticky surface (audit #24) ────────────────
   Becomes a sticky primary-tinted toolbar on selection. */
.bulk-bar.open {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin: 8px 16px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  gap: 14px;
}
.bulk-link {
  background: transparent;
  border: none;
  color: var(--primary-bright);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}
.bulk-link:hover { color: var(--text); }
.bulk-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.bulk-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.bulk-btn:hover { background: var(--surface-3); color: var(--text); }
.bulk-btn .icon { width: 12px; height: 12px; }
.bulk-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}
.bulk-btn.primary:hover { filter: brightness(1.08); }
.bulk-btn.ghost {
  background: transparent;
  border-color: var(--surface-4);
  color: var(--text-3);
}
.bulk-btn.ghost:hover { color: var(--text); background: var(--surface-2); }

/* ── Per-row expand affordance + canonical expansion (audit #25) ─
   In-table slide-down. The button toggles .pitch-row.expanded;
   .pitch-expanded panel is a direct grid child spanning all cols. */
/* Base .pitch-list is already display:flex column (line 177); only need to
   stop rows from shrinking when one sibling expands to ~600px. Pre-existing
   latent bug surfaced by audit #25 row expansion — see chat6 fix. */
.pitch-row { flex-shrink: 0; }

.pitch-expand {
  display: inline-flex;
  align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-3);
  width: 22px; height: 22px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: transform .15s, color .15s, background .15s;
}
.pitch-expand:hover { background: var(--surface-3); color: var(--text); }
.pitch-expand .icon { width: 13px; height: 13px; }
.pitch-row.expanded .pitch-expand .icon { transform: rotate(180deg); }

.pitch-row.expanded {
  overflow: visible;
  align-items: start;
}
.pitch-expanded {
  grid-column: 1 / -1;
  display: none;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pitch-row.expanded .pitch-expanded {
  display: block;
  animation: pe-slide-down .2s ease-out;
}
@keyframes pe-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pe-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pe-eyebrow {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.pe-tracks { list-style: none; padding: 0; margin: 0; }
.pe-tracks li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px dashed var(--border);
}
.pe-tracks li:last-child { border-bottom: none; }
.pe-track-n { color: var(--text-mute); font-size: 10px; }
.pe-track-name { color: var(--text); font-weight: 500; }
.pe-track-meta { color: var(--text-3); font-size: 10.5px; }

.pe-quick { display: flex; flex-direction: column; gap: 6px; }
.pe-quick-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer;
  text-align: left;
}
.pe-quick-btn:hover { background: var(--surface-3); color: var(--text); }
.pe-quick-btn .icon { width: 12px; height: 12px; }
.pe-quick-btn.primary { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.pe-quick-btn.primary:hover { filter: brightness(1.08); }
.pe-quick-btn.ghost { background: transparent; }

.pe-history { display: flex; gap: 10px; flex-wrap: wrap; }
.pe-hist-stat {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 11px;
  color: var(--text-3);
}
.pe-hist-stat strong { color: var(--text); font-weight: 700; font-family: var(--mono); }
.pe-hist-stat.ok strong   { color: var(--primary-bright); }
.pe-hist-stat.warn strong { color: var(--warning); }

/* ── Parser-source expandable (audit #21) ──────────────────
   Nested <details> inside .pitch-expanded. */
.parser-source {
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.parser-source[open] { border-color: var(--info-line); }
.parser-source > summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--text-3);
  user-select: none;
}
.parser-source > summary::-webkit-details-marker { display: none; }
.parser-source > summary > span:first-of-type { font-weight: 600; color: var(--text-2); }
.parser-source > summary .icon:first-child { width: 12px; height: 12px; color: var(--text-mute); }
.parser-source[open] > summary { border-bottom: 1px solid var(--border); }
.parser-source .ps-meta { color: var(--text-mute); margin-left: 4px; font-size: 10.5px; }
.parser-source .ps-chevron { margin-left: auto; transition: transform .2s; width: 12px; height: 12px; color: var(--text-3); }
.parser-source[open] .ps-chevron { transform: rotate(180deg); }

.ps-grid {
  display: flex; flex-direction: column;
  padding: 6px 0;
}
.ps-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 14px;
  font-size: 12px;
  border-bottom: 1px dashed var(--border);
}
.ps-row:last-child { border-bottom: none; }
.ps-row.warn { background: var(--warning-soft); }
.ps-k {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  text-transform: lowercase;
  letter-spacing: 0;
}
.ps-v { color: var(--text); font-weight: 500; }
.ps-from { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.ps-src {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--text-3);
  white-space: nowrap;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis;
}
.ps-src.email   { background: var(--info-soft); color: var(--info-bright); }
.ps-src.sheet   { background: var(--primary-soft); color: var(--primary-bright); }
.ps-src.derived { background: var(--warning-soft); color: var(--warning); }
.ps-confidence { font-size: 10px; min-width: 36px; text-align: right; }
.ps-confidence.ok   { color: var(--primary-bright); }
.ps-confidence.warn { color: var(--warning); }
.ph-warn { color: var(--warning); margin-left: 4px; }
.ps-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-mute);
  background: var(--surface);
}
.ps-link { color: var(--text-3); text-decoration: none; }
.ps-link:hover { color: var(--text); text-decoration: underline; }
.ps-reparse {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-3); font-family: inherit; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
}
.ps-reparse:hover { background: var(--surface-3); color: var(--text); }
.ps-reparse .icon { width: 11px; height: 11px; }

@media (max-width: 1100px) {
  .pe-cols { grid-template-columns: 1fr; }
  .ps-row { grid-template-columns: 100px 1fr; }
  .ps-from { grid-column: 1 / -1; justify-content: flex-start; padding-top: 4px; }
}


/* ============================================================
   Gmail / submissions status banner (audit  token-dead recovery)
   Renders at top of .inbox-list when /api/inbox#gmail_auth_dead
   or when there''s a recent error. Hidden by default.
   ============================================================ */
.inbox-status-banner {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 10px 12px 6px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.inbox-status-banner[data-state=error] {
  border-color: rgba(255, 180, 171, 0.45);
  background: rgba(255, 180, 171, 0.06);
}
.inbox-status-banner[data-state=warn] {
  border-color: rgba(255, 200, 100, 0.45);
}
.inbox-status-banner .isb-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-3, #1a1a1a);
  color: var(--text-2);
}
.inbox-status-banner[data-state=error] .isb-icon { color: #ffb4ab; }
.inbox-status-banner .isb-body { min-width: 0; }
.inbox-status-banner .isb-title { font-size: 13px; font-weight: 600; color: var(--text); }
.inbox-status-banner .isb-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; word-break: break-word; }
.inbox-status-banner .isb-stats { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.inbox-status-banner .isb-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.isb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-3, #1a1a1a);
  color: var(--text);
}
.isb-btn:hover { background: var(--surface-2); }
.isb-btn.primary {
  background: var(--accent, #5b9aff);
  border-color: var(--accent, #5b9aff);
  color: #0a0a0a;
}
.isb-btn.primary:hover { filter: brightness(1.08); }
.isb-btn.ghost { background: transparent; }
.isb-btn[disabled] { opacity: 0.5; pointer-events: none; }
.isb-btn .icon { width: 14px; height: 14px; }
