/* ============================================================
   PUBLISH WORKSPACE · W2
   Extends today.css — overrides body grid for 3-pane layout
   and adds list-pane / detail-pane / diff / rules / sticky-bar
   ============================================================ */

:root {
  --list-w: 340px;
  --sticky-h: 88px;
  --gold: #c9b48d;
  --a-eden:    #ffb6e6;
  --a-maya:    #b6ff8a;
  --a-yonatan: #ffd16b;
  --a-liat:    #b48aff;
  --a-ronen:   #8affd6;
}

/* ───────── BODY GRID ─────────
   3 cols: nav | list | detail
   2 rows: topbar | content
   Full-viewport, independent scroll per pane.
*/
html, body.publish-body {
  height: 100vh;
  overflow: hidden;
}
body.publish-body {
  display: grid;
  grid-template-columns: var(--nav-w) var(--list-w) 1fr;
  grid-template-rows: var(--top-h) 1fr;
  grid-template-areas:
    "nav top    top"
    "nav list   detail";
}

/* topbar spans both list + detail cols */
.publish-topbar.topbar {
  grid-area: top;
  padding: 0 24px 0 24px;
}

/* additional artist accents for Rules/AEO */
.artist.eden    { background: rgba(255,182,230,.15); color: var(--a-eden); }
.artist.maya    { background: rgba(182,255,138,.15); color: var(--a-maya); }
.artist.yonatan { background: rgba(255,209,107,.15); color: var(--a-yonatan); }
.artist.liat    { background: rgba(180,138,255,.15); color: var(--a-liat); }
.artist.ronen   { background: rgba(138,255,214,.15); color: var(--a-ronen); }

/* ============================================================
   TOPBAR (publish variant — workspace context, not greeting)
   Shared workspace topbar rules now live in today.css
   ============================================================ */


/* ============================================================
   LIST PANE
   ============================================================ */
.list-pane {
  grid-area: list;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.list-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.list-search input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 10px 7px 32px;
  outline: none;
  transition: border-color .15s;
}
.list-search input:focus { border-color: var(--primary-line); }
.list-search input::placeholder { color: var(--text-mute); }
.search-icon {
  position: absolute;
  left: 26px;
  color: var(--text-mute);
  pointer-events: none;
}
.list-search kbd {
  font-size: 9.5px;
}

.list-filters {
  display: flex;
  gap: 2px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-tab {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s;
}
.filter-tab:hover { color: var(--text); background: var(--surface-2); }
.filter-tab.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}
.ft-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}
.filter-tab.active .ft-count { color: var(--text-2); }
.ft-icon { width: 11px; height: 11px; color: var(--primary-bright); }
.ft-bi {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--bilingual);
  direction: rtl; unicode-bidi: isolate;
}

.list-meta {
  display: flex; gap: 14px;
  padding: 8px 16px;
  font-size: 10.5px;
  color: var(--text-mute);
  border-bottom: 1px solid var(--border);
}

.playlist-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.playlist-list::-webkit-scrollbar { width: 6px; }
.playlist-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

.pl-row {
  display: grid;
  grid-template-columns: 14px 1fr 56px 12px;
  gap: 10px;
  align-items: center;
  padding: 9px 8px 9px 6px;
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
  transition: background .12s;
}
.pl-row:hover { background: var(--surface-2); }
.pl-row.selected {
  background: var(--surface-2);
}
.pl-row.selected::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary-bright);
  border-radius: 0 2px 2px 0;
}
.pl-row.dim { opacity: .55; }

.pl-marker {
  width: 14px;
  display: grid; place-items: center;
  color: var(--primary-bright);
}
.pl-marker .icon { width: 11px; height: 11px; }
.pl-row:not(.selected) .pl-marker .icon { color: var(--text-mute); }

.pl-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.pl-sub {
  font-size: 10.5px;
  color: var(--text-mute);
  margin-top: 2px;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
  overflow: hidden;
}
.pl-sub-sep {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--text-mute);
  opacity: .5;
  flex-shrink: 0;
}
.warn-text { color: var(--warning); }
.muted     { color: var(--text-mute); }

.pl-score {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 3px;
  min-width: 56px;
}
.score-num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.score-num.warn  { color: var(--warning); }
.score-num.muted { color: var(--text-mute); }
.score-bar {
  width: 36px;
  height: 3px;
  border-radius: 1.5px;
  background: var(--surface-3);
  overflow: hidden;
}
.score-bar span {
  display: block; height: 100%;
  background: var(--primary-bright);
  border-radius: 1.5px;
}
.score-bar.warn span { background: var(--warning); }

.pl-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: block;
}
.pl-status .dot.success { background: var(--primary-bright); box-shadow: 0 0 6px rgba(83,224,118,.4); }
.pl-status .dot.warn    { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.pl-status .dot.idle    { background: var(--surface-4); }

.list-foot {
  display: flex; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}
.list-foot-btn {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, color .15s, border-color .15s;
}
.list-foot-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--surface-4); }
.list-foot-btn .icon { width: 13px; height: 13px; }
.list-foot-btn.ghost { color: var(--text-3); }


/* ============================================================
   DETAIL PANE
   ============================================================ */
.detail-pane {
  grid-area: detail;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* ── Detail header (sticky) ─────────────────── */
.detail-head {
  padding: 22px 32px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: background .25s;
}
.detail-head.shimmer {
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--surface) 50%);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dt-marker {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(83,224,118,.15), rgba(83,224,118,.04));
  border: 1px solid var(--primary-line);
  display: grid; place-items: center;
  color: var(--primary-bright);
  flex-shrink: 0;
}
.dt-pin { width: 18px; height: 18px; }
.dt-titles { flex: 1; min-width: 0; }
.dt-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.018em;
  margin: 0;
  color: var(--text);
}
.dt-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-mute);
}
.dt-id {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dt-link {
  color: var(--text-3);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  transition: color .15s;
}
.dt-link:hover { color: var(--primary-bright); }
.dt-link .icon { width: 12px; height: 12px; }

.dt-actions {
  display: flex; gap: 6px;
  align-items: center;
}

/* ── Statbar ─────────────────── */
.detail-statbar {
  display: flex; align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.dts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dts-num {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.018em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.dts-unit, .dts-of {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mute);
  letter-spacing: 0;
}
.dts-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.dts-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 2px 0;
}
.dts-trend {
  display: inline-flex; align-items: center; gap: 1px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--mono);
  padding: 1px 5px 1px 3px;
  border-radius: 3px;
  letter-spacing: 0;
}
.dts-trend.up { color: var(--primary-bright); background: var(--primary-soft); }
.dts-trend .icon { width: 10px; height: 10px; }
.spark-lg { display: block; }


/* ── Tabs ─────────────────── */
.detail-tabs {
  display: flex; align-items: center; gap: 4px;
  margin-top: 4px;
  position: relative;
}
.detail-tab {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  padding: 12px 14px 14px;
  cursor: pointer;
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s;
}
.detail-tab:hover { color: var(--text-2); }
.detail-tab.active { color: var(--text); }
.detail-tab.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--primary-bright);
  border-radius: 1px;
}
.tab-icon { width: 14px; height: 14px; }
.detail-tab.active .tab-icon { color: var(--primary-bright); }
.tab-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.detail-tab.active .tab-count { background: var(--primary-soft); color: var(--primary-bright); }
.promoted-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 1px 5px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  color: #003914;
}
.detail-tab.promoted { color: var(--text-2); }
.detail-tabs-spacer { flex: 1; }
.tab-shortcut {
  font-size: 9.5px;
  color: var(--text-mute);
  background: transparent;
  border: none;
  padding: 2px 0;
}


/* ── Detail body (scrolling region) ──────── */
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px calc(var(--sticky-h) + 28px) 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.detail-body::-webkit-scrollbar { width: 10px; }
.detail-body::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; border: 2px solid var(--surface); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }


/* ============================================================
   COMMITS CARD
   ============================================================ */
.commits-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.commits-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.commits-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.commits-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-3);
}
.state-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-4);
}
.state-dot.fresh {
  background: var(--primary-bright);
  box-shadow: 0 0 0 0 rgba(83,224,118,.45);
  animation: pulse-ring 2.4s ease-in-out infinite;
}
.state-dot.stale { background: var(--warning); }

.commits-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.commits-row:last-child { border-bottom: none; padding-bottom: 4px; }
.commits-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.commits-control { display: flex; flex-direction: column; gap: 8px; }
.commits-control.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.commits-helper {
  font-size: 11.5px;
  color: var(--text-3);
}
.commits-helper strong { color: var(--text); font-weight: 600; }

/* Strategy select + chips */
.select {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s;
}
.select:hover { border-color: var(--surface-4); }
.select-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.select-sub {
  font-size: 11px;
  color: var(--text-3);
  flex: 1;
}
.select-chevron { width: 13px; height: 13px; color: var(--text-3); }

.strategy-chips {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.schip {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.schip:hover { color: var(--text); border-color: var(--surface-4); }
.schip.on {
  background: var(--primary-soft);
  color: var(--primary-bright);
  border-color: var(--primary-line);
}

/* Slider */
.slider { padding-top: 4px; }
.slider-track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}
.slider-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  border-radius: 2px;
}
.slider-thumb {
  position: absolute;
  top: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-bright);
  color: #003914;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(83,224,118,.18), 0 2px 6px rgba(0,0,0,.3);
  cursor: ew-resize;
}
.slider-ticks {
  display: flex; justify-content: space-between;
  padding: 14px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-mute);
}

/* Toggles */
.toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  user-select: none;
}
.toggle-dot {
  position: relative;
  width: 28px; height: 16px;
  border-radius: 8px;
  background: var(--surface-3);
  transition: background .15s;
  flex-shrink: 0;
}
.toggle-dot::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform .15s, background .15s;
}
.toggle.on .toggle-dot {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary-line);
}
.toggle.on .toggle-dot::after {
  background: var(--primary-bright);
  transform: translateX(12px);
}
.toggle-lbl {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}
.toggle.on .toggle-lbl { color: var(--text); }
.toggle.big .toggle-dot { width: 34px; height: 19px; border-radius: 10px; }
.toggle.big .toggle-dot::after { width: 15px; height: 15px; }
.toggle.big.on .toggle-dot::after { transform: translateX(15px); }


/* ============================================================
   DIFF CARD
   ============================================================ */
.diff-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.diff-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.diff-title {
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--text);
}
.diff-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}
.leg { display: inline-flex; align-items: center; gap: 4px; }
.leg-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-mute);
  display: inline-block;
}
.leg-dot.protected { background: var(--primary-bright); box-shadow: 0 0 0 1.5px var(--primary-line); }
.leg-mv {
  width: 14px; height: 14px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  display: inline-grid; place-items: center;
}
.leg-mv.eq   { background: var(--surface-3); color: var(--text-mute); }
.leg-mv.up   { background: var(--primary-soft); color: var(--primary-bright); }
.leg-mv.down { background: var(--surface-3); color: var(--text-3); }
.leg-mv .icon { width: 8px; height: 8px; }

.diff-col-head {
  display: grid;
  grid-template-columns: 28px 14px 1fr 56px;
  gap: 12px;
  padding: 0 8px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.dch-num { text-align: left; }
.dch-move { text-align: right; }

.diff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.diff-row {
  display: grid;
  grid-template-columns: 28px 14px 1fr 56px;
  gap: 12px;
  align-items: center;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.diff-row:hover {
  background: var(--surface-3);
  border-color: var(--surface-4);
}
.diff-row.protected {
  border-color: var(--primary-line);
  background: linear-gradient(90deg, rgba(83,224,118,.06), var(--surface-2) 30%);
}
.diff-row.protected:hover {
  background: linear-gradient(90deg, rgba(83,224,118,.10), var(--surface-3) 30%);
}
.diff-pos {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.diff-row.protected .diff-pos { color: var(--primary-bright); }

.diff-dot {
  display: grid; place-items: center;
}
.dot-inner {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface-4);
}
.dot-inner.protected {
  background: var(--primary-bright);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.diff-body { min-width: 0; }
.diff-track {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex; align-items: center; gap: 8px;
}
.diff-artist {
  display: flex; align-items: center; gap: 8px;
  margin-top: 3px;
  font-size: 11px;
}
.diff-meta { color: var(--text-mute); }

.diff-move {
  display: inline-flex; align-items: center; gap: 2px;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.diff-move.eq   { background: var(--surface-3); color: var(--text-mute); }
.diff-move.up   { background: var(--primary-soft); color: var(--primary-bright); }
.diff-move.down { background: var(--surface-3); color: var(--text-3); }
.diff-move.new  { background: var(--info-soft); color: var(--info); }
.diff-move .icon { width: 11px; height: 11px; }

.diff-expand {
  width: 100%;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 10px;
  margin-top: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, color .15s, border-color .15s;
}
.diff-expand:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--surface-4);
}
.diff-expand .icon { width: 13px; height: 13px; }


/* ============================================================
   OUTCOME STRIP
   ============================================================ */
.outcome-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.outcome {
  background: var(--surface-1);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.outcome-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.outcome-val {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
}
.outcome-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.022em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.outcome-of {
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 500;
}
.outcome-sub {
  font-size: 11px;
  color: var(--text-3);
}
.outcome-sub-muted {
  font-size: 10.5px;
  color: var(--text-mute);
}
.outcome-trend {
  display: inline-flex; align-items: center; gap: 1px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-bright);
  padding: 1px 6px 1px 3px;
  border-radius: 3px;
  background: var(--primary-soft);
}
.outcome-trend .icon { width: 10px; height: 10px; }
.outcome-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.outcome-bar span {
  display: block; height: 100%;
  background: var(--primary-bright);
}
.outcome-meter {
  position: relative;
  height: 22px;
  margin-top: 2px;
}
.meter-bar {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 1.5px;
  background: var(--surface-3);
}
.meter-tick {
  position: absolute;
  top: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
  transform: translateX(-50%);
}
.meter-tick::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 10px;
  background: var(--text-mute);
}
.meter-tick.now { color: var(--primary-bright); top: 13px; }
.meter-tick.now::before { background: var(--primary-bright); bottom: auto; top: -7px; }
.bi-row { display: flex; gap: 3px; flex-wrap: wrap; }
.bi-chip {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bilingual-soft);
  color: var(--bilingual);
  border: 1px solid var(--bilingual-line);
  letter-spacing: .04em;
  text-transform: uppercase;
}


/* ============================================================
   STICKY ACTION BAR
   ============================================================ */
.sticky-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(13,14,15,.85), var(--surface));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 24px;
  min-height: var(--sticky-h);
  z-index: 5;
}
.sb-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.sb-title strong { font-weight: 700; }
.sb-icon { width: 16px; height: 16px; color: var(--primary-bright); }
.sb-summary {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  padding-left: 6px;
  border-left: 1px solid var(--border);
  margin-left: 4px;
}
.sb-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}
.sb-meta-sep {
  width: 2px; height: 2px; border-radius: 50%;
  background: var(--text-mute);
  opacity: .5;
}
.sb-right { display: flex; gap: 8px; }
.sb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.sb-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--surface-4); }
.sb-btn .icon { width: 14px; height: 14px; }
.sb-btn kbd {
  font-size: 9.5px;
  border-color: var(--surface-4);
}
.sb-btn.primary {
  background: linear-gradient(180deg, var(--primary-bright), var(--primary));
  color: #003914;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 0 16px rgba(83,224,118,.25);
}
.sb-btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 0 24px rgba(83,224,118,.4);
}
.sb-btn.primary kbd {
  background: rgba(0,0,0,.18);
  color: #002a0e;
  border-color: rgba(0,0,0,.25);
}
.sb-btn.focused {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(83,224,118,.25);
}
.sb-btn.firing {
  animation: fire 1.1s ease-out;
}
@keyframes fire {
  0%   { transform: scale(1); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 0 16px rgba(83,224,118,.25); }
  20%  { transform: scale(.96); }
  50%  { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(83,224,118,.35), 0 0 36px rgba(83,224,118,.6); }
  100% { transform: scale(1); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 0 16px rgba(83,224,118,.25); }
}


/* ============================================================
   RULES TAB
   ============================================================ */
.rules-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(83,224,118,.06), transparent 60%);
  border: 1px solid var(--primary-line);
  border-radius: var(--r-sm);
  margin-bottom: 18px;
}
.rules-banner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary-bright);
  box-shadow: 0 0 8px var(--primary-bright);
}
.rules-banner-text {
  font-size: 12.5px;
  color: var(--text-2);
}
.rules-banner-text strong { color: var(--text); font-weight: 600; }
.rules-banner-text a {
  color: var(--primary-bright);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}
.rules-banner-text a:hover { text-decoration: underline; }
.rules-banner-close {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 4px;
  border-radius: 4px;
}
.rules-banner-close:hover { color: var(--text); background: var(--surface-2); }
.rules-banner-close .icon { width: 12px; height: 12px; }

.rules-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.rules-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.rules-card-title {
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--text);
}
.rules-card-aux {
  font-size: 11px;
  color: var(--text-3);
  align-self: center;
}

/* Artist chips */
.artist-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.artist-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px 4px 4px 10px;
  font-size: 11px;
  cursor: default;
}
.artist-chip button {
  background: none;
  border: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.artist-chip button:hover { background: var(--surface-3); color: var(--text); }
.artist-chip.add {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-3);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.artist-chip.add:hover {
  border-color: var(--primary-line);
  color: var(--primary-bright);
  background: var(--primary-soft);
}
.artist-chip.add .icon { width: 12px; height: 12px; }
.artist-chip.add.suggest {
  border-style: solid;
  border-color: var(--primary-line);
  color: var(--primary-bright);
  background: var(--primary-soft);
}


/* Placement cards */
.placement-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.placement-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  position: relative;
}
.placement-card:hover { background: var(--surface-3); border-color: var(--surface-4); }
.placement-card input[type=radio] { display: none; }
.placement-card.selected {
  border-color: var(--primary-line);
  background: linear-gradient(180deg, rgba(83,224,118,.06), var(--surface-2) 50%);
}
.placement-card.selected::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary-bright);
  box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 3px var(--primary-bright);
}
.placement-card:not(.selected)::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--surface-4);
}
.pc-head {
  display: flex; align-items: baseline; gap: 8px;
}
.pc-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.pc-shortcut {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-bright);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--primary-soft);
}
.pc-desc {
  font-size: 11.5px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.45;
}
.pc-desc strong { color: var(--text); font-weight: 600; }
.pc-mini {
  display: flex; gap: 3px;
  margin-top: 4px;
}
.mini-slot {
  width: 18px; height: 8px;
  border-radius: 2px;
  background: var(--surface-4);
}
.mini-slot.protected {
  background: var(--primary-bright);
  box-shadow: 0 0 0 0 rgba(83,224,118,0);
}


/* Source playlists */
.source-list { display: flex; flex-direction: column; gap: 4px; }
.source-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.source-row:hover { background: var(--surface-3); }
.source-name {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.source-icon {
  width: 16px; height: 16px;
  color: var(--primary-bright);
  flex-shrink: 0;
}
.src-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.src-sub {
  font-size: 10.5px;
  color: var(--text-mute);
  margin-top: 2px;
}
.source-stat {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.ss-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.ss-lbl {
  font-size: 9.5px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.source-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--surface-4);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s;
}
.source-btn:hover { background: var(--surface-4); }
.source-btn .icon { width: 12px; height: 12px; }
.source-btn.warn {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: var(--warning-line);
}
.source-btn.warn:hover { background: var(--warning); color: #3a2a00; }


/* Rules two-col (SEO overrides + Rebuild) */
.rules-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 1300px) {
  .rules-two-col { grid-template-columns: 1fr; }
}

.seo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.seo-row:last-child { border-bottom: none; padding-bottom: 4px; }
.seo-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.seo-desc {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.45;
}
.seo-desc code {
  font-family: var(--mono);
  font-size: 10.5px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-2);
}
.seo-row.warn .seo-name { color: var(--warning); }

.rules-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  padding: 10px 4px;
  font-size: 11.5px;
  color: var(--text-3);
}
.rules-history-link {
  color: var(--text-3);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s;
}
.rules-history-link:hover { color: var(--primary-bright); }
.rules-history-link .icon { width: 13px; height: 13px; }


/* ============================================================
   SEO TAB
   ============================================================ */
.seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.seo-edit { margin-bottom: 0; }
.seo-field {
  display: grid;
  grid-template-columns: 100px 1fr 80px;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.seo-field.tall { align-items: flex-start; }
.seo-field:last-child { border-bottom: none; }
.seo-field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.seo-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 38px;
  line-height: 1.5;
  transition: border-color .15s;
}
.seo-input:focus { border-color: var(--primary-line); }
.seo-input.rtl { direction: rtl; unicode-bidi: isolate; text-align: right; }
textarea.seo-input { min-height: 76px; }
.seo-field.tall .seo-field-label { padding-top: 10px; }
.seo-field.tall .seo-field-meter { padding-top: 10px; }
.seo-field-meter {
  text-align: right;
  font-size: 11px;
  color: var(--text-mute);
}
.aeo-card .commits-head { margin-bottom: 10px; padding-bottom: 10px; }


/* ============================================================
   HISTORY-IN-DETAIL TWEAKS
   ============================================================ */
.history-feed .feed-row {
  padding-left: 14px;
  padding-right: 14px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1400px) {
  :root { --list-w: 300px; }
  .detail-statbar { gap: 16px; }
}
@media (max-width: 1180px) {
  .outcome-strip { grid-template-columns: 1fr 1fr; }
  .placement-options { grid-template-columns: 1fr; }
  .detail-statbar { flex-wrap: wrap; row-gap: 8px; }
  .dts-sep { display: none; }
}
@media (max-width: 960px) {
  :root { --list-w: 260px; }
  body.publish-body { grid-template-columns: 64px var(--list-w) 1fr; }
  .detail-body { padding: 16px; }
  .detail-head { padding: 16px 16px 0; }
  .sticky-bar { padding: 12px 16px; }
}

/* ── Filter-from-Today animations ── */
@keyframes pulse-warn-fade {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
  50%  { box-shadow: 0 0 0 6px rgba(245,158,11,.15); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
.pl-row.pulse-warn { animation: pulse-warn-fade 1.2s ease 2; }
