/* Organize page-mark filters. One fixed-height row above the grid: chips first,
   then the same-text closeness slider right beside them. The min-height holds
   the strip's size while chips fill in from the background scans, so the grid
   below never moves. Hover/focus match the rest of the editor; no
   transition: all. */

.organize-filter-bar {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 46px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.organize-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.organize-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg);
  color: var(--text); font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s, background-color .15s, color .15s;
}
.organize-filter:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.organize-filter:active { transform: translateY(1px); }
.organize-filter:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.organize-filter.is-on {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.organize-filter-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--bg-soft); color: var(--text-soft);
}
.organize-filter.is-on .organize-filter-count { background: var(--primary); color: #fff; }

/* Sits right after the chips. Flush right it was nowhere near the "Same text"
   chip it re-cuts, on a wide window. */
.organize-twin-thresh {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(260px, 40vw);
}
.organize-twin-thresh-lab {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.organize-twin-thresh input[type="range"] {
  flex: 1;
  min-width: 80px;
  accent-color: var(--primary);
}
.organize-twin-thresh input[type="range"]:hover {
  filter: brightness(1.05);
}
.organize-twin-thresh input[type="range"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.organize-twin-thresh-out {
  min-width: 36px;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: right;
}

/* The split banner's standing hint, flush right over the grid it points at.
   flex-basis 0 + min-width 0 means it always shares the chips' line (it
   ellipsizes before it can wrap the strip taller), and it gives way to the
   chips first when the window narrows. */
.organize-filter-hint {
  flex: 1 1 0;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .organize-filter-bar { padding: 6px 12px; }
  .organize-twin-thresh { width: 100%; }
  .organize-filter-hint { display: none; }
}
